- Entri in Circuito Italia solo se hai il fido nel circuito provinciale

- Aggiunta Zona, oltre alla provincia, per visualizzare i vari circuiti della prov
This commit is contained in:
Surya Paolo
2023-12-06 00:42:02 +01:00
parent 7f716b82b6
commit a0fbddde39
19 changed files with 273 additions and 106 deletions

View File

@@ -1,6 +1,5 @@
<template>
<div v-if="tools.isUserOk() || noaut">
<div v-if="circuit">
<q-item
:class="
@@ -108,7 +107,6 @@
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
lines="1"
>
<CSaldo
v-if="tools.isUserOk() && username === myusername() && account"
:account="account"
@@ -120,36 +118,42 @@
</CSaldo>
</q-item-label>
<q-item-label
lines="4"
v-if="
tools.isUserOk() &&
username === myusername() &&
!account &&
visu !== costanti.ENTER_TO_THE_CIRCUIT
"
>
<div class="centermydiv text-center">
<q-banner inline-actions class="bg-blue text-white">
<span v-html="$t('circuit.non_entrato')"></span>
<template v-slot:action>
<q-btn
v-if="
!userStore.IsMyCircuitByName(circuit.name) &&
!userStore.IsAskedCircuitByName(circuit.name) &&
!userStore.IsRefusedCircuitByName(circuit.name)
"
color="positive"
:label="$t('circuit.apri')"
@click="
requestToEnterCircuit = true;
groupnameSel = null;
"
/>
</template>
</q-banner>
</div>
</q-item-label>
lines="4"
v-if="
tools.isUserOk() &&
username === myusername() &&
!account &&
visu !== costanti.ENTER_TO_THE_CIRCUIT
"
>
<div class="centermydiv text-center">
<q-banner
v-if="!circuitStore.SonoDentroAdAlmeno1CircuitoConFido()"
inline-actions
class="bg-blue text-white"
>
<span v-html="$t('circuit.entra_italia_solo_dopo_aver_fido')"></span>
</q-banner>
<q-banner v-else inline-actions class="bg-blue text-white">
<span v-html="$t('circuit.non_entrato')"></span>
<template v-slot:action>
<q-btn
v-if="
!userStore.IsMyCircuitByName(circuit.name) &&
!userStore.IsAskedCircuitByName(circuit.name) &&
!userStore.IsRefusedCircuitByName(circuit.name)
"
color="positive"
:label="$t('circuit.apri')"
@click="
requestToEnterCircuit = true;
groupnameSel = null;
"
/>
</template>
</q-banner>
</div>
</q-item-label>
</q-item-section>
<q-item-section

View File

@@ -1,5 +1,6 @@
import { defineComponent, onMounted, PropType, ref, watch, computed } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { ICircuit, IImgGallery, IUserFields, IUserProfile } from 'model'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
@@ -53,6 +54,7 @@ export default defineComponent({
const userStore = useUserStore()
const circuitStore = useCircuitStore()
const globalStore = useGlobalStore()
const $q = useQuasar()
const { t } = useI18n()
const $router = useRouter()
@@ -107,6 +109,11 @@ export default defineComponent({
watch(() => strProv.value, (newval: string, oldval: string) => {
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
if (!globalStore.isPresenteCardsByProv(strProv.value)) {
if (contact.value && contact.value.profile.resid_card) {
contact.value.profile.resid_card = ''
}
}
})
watch(() => card.value, (newval: string, oldval: string) => {
@@ -432,7 +439,7 @@ export default defineComponent({
if (circuitStore.SonoDentroAdAlmeno1CircuitoConFido())
arrStep.value.push({ ...stepCircItalia, indstep: numindstep.value })
arrStep.value.push({ ...stepFine, indstep: numindstep.value })
// arrStep.value.push({ ...stepFine, indstep: numindstep.value })
if (userStore.isUserOk()) {
updatestart()
@@ -553,6 +560,7 @@ export default defineComponent({
usersList,
userstoverify,
numStepCompleted,
globalStore,
}
},
})

View File

@@ -9,11 +9,14 @@
class="q-pa-none"
:title="
!progressStep
? $t('tutorial.title', { indstep, numindstep }) +
? $t('tutorial.title', { indstep: indstep + 1, numindstep }) +
` (` +
progressLabel +
`)`
: $t('tutorial.title_completed', { indstep, numindstep }) +
: $t('tutorial.title_completed', {
indstep: indstep + 1,
numindstep,
}) +
` (` +
progressLabel +
`)`
@@ -84,6 +87,22 @@
:db_rec="contact"
>
</CMySelectCity>
<CMySelectCity
v-if="globalStore.isPresenteCardsByProv(contact.profile.resid_province)"
:label="$t('reg.resid_card')"
table="users"
jointable="cards"
v-model="contact.profile.resid_card"
myclass="selectorwide text-white"
:db_type="costanti.FieldType.string"
db_field="profile"
db_subfield="resid_card"
:db_id="contact._id"
:db_rec="contact"
:value2="contact.profile.resid_province"
>
</CMySelectCity>
</q-banner>
<div v-else-if="step === STEP_NAME_SURNAME">
<q-banner>
@@ -125,7 +144,7 @@
outlined
v-model="circuitsel"
:options="mylistcircuits"
label="Circuito"
label="SCegli il Circuito della tua Zona:"
>
</q-select>
@@ -250,7 +269,9 @@
<span v-html="$t('tutorial.utenti_da_verificare')"></span>
<template v-slot:action>
<q-btn
:label="userstoverify.length + ' ' + $t('tutorial.utenti_da_verif_btn')"
:label="
userstoverify.length + ' ' + $t('tutorial.utenti_da_verif_btn')
"
class="q-my-sm"
rounded
icon="fas fa-users"
@@ -293,14 +314,19 @@
<q-card-section class="inset-shadow">
<q-list>
<span v-for="(rec, index) in userstoverify" :key="index" class="q-my-sm rounded-borders" clickable>
<CMyUser
:mycontact="rec"
:visu="costanti.ASK_TRUST"
@setCmd="tools.setCmd"
<span
v-for="(rec, index) in userstoverify"
:key="index"
class="q-my-sm rounded-borders"
clickable
>
</CMyUser>
</span>
<CMyUser
:mycontact="rec"
:visu="costanti.ASK_TRUST"
@setCmd="tools.setCmd"
>
</CMyUser>
</span>
</q-list>
</q-card-section>
</q-card>

View File

@@ -72,6 +72,11 @@ export default defineComponent({
required: false,
default: null,
},
value2: {
type: String,
required: false,
default: undefined,
},
},
components: { CMySelect },
setup(props, { emit }) {

View File

@@ -5,13 +5,13 @@
:label="label"
v-model="myvalue"
:pickup="false"
:addnone="true"
:addnone="value2 ? false : true"
:dense="false"
:tablesel="table"
:myclass="myclass"
:optval="fieldsTable.getKeyByTable(jointable)"
:optlab="fieldsTable.getLabelByTable(jointable)"
:options="globalStore.getTableJoinByName(jointable, false, false, '')"
:options="globalStore.getTableJoinByName(jointable, false, !!value2, null, value2)"
:useinput="false"
:dark="$q.dark.isActive"
@update:value="changevalRec"

View File

@@ -40,6 +40,10 @@
><em>{{ contact.profile.qualifica }}</em></q-item-label
>
<q-item-label caption lines="1"></q-item-label>
<div v-if="visu === costanti.ASK_TRUST">
<span class="text-italic">Reg: {{ tools.getstrDateShort(contact.date_reg) }}</span>
</div>
<q-item-label v-if="labelFooter" lines="1"
><em>{{ labelFooter }}</em></q-item-label
>
@@ -431,7 +435,7 @@
<q-icon color="positive" name="fas fa-user-plus" />
</q-item-section>
<q-item-section>
{{ $t('circuit.accept') }}
{{ $t('circuit.add_to_circuit') }}
</q-item-section>
</q-item>
<q-item
@@ -784,7 +788,6 @@
rounded
dense
icon="fas fa-ellipsis-h"
:color="!contact.verified_by_aportador ? 'red' : 'white'"
>
<!-- </q-btn></q-btn>:icon="
userStore.IsMyFriendByUsername(contact.username)

View File

@@ -40,6 +40,7 @@
"
:label="$t('movement.viewpendingtransaction')"
@click="visuTransac = true"
dense
icon="fas fa-info"
>
</q-btn>

View File

@@ -1,16 +1,6 @@
<template>
<div class="row text-center justify-evenly items-center">
<div class="q-mb-sm">
<q-btn
icon="fas fa-upload"
color="positive"
size="md"
rounded
:label="$t('circuit.sendcoins_toso')"
@click="sendCoinsToClick"
>
</q-btn>
&nbsp;
<q-btn
icon="fas fa-download"
color="accent"
@@ -20,6 +10,16 @@
@click="tools.receiveRis($q, $t)"
>
</q-btn>
&nbsp;
<q-btn
icon="fas fa-upload"
color="positive"
size="md"
rounded
:label="$t('circuit.sendcoins_toso')"
@click="sendCoinsToClick"
>
</q-btn>
<div class="q-mb-sm"></div>
<CUserInfoAccount