- 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:
@@ -212,6 +212,7 @@ export const shared_consts = {
|
|||||||
TAB_COUNTRY: 'countries',
|
TAB_COUNTRY: 'countries',
|
||||||
TAB_CITIES: 'cities',
|
TAB_CITIES: 'cities',
|
||||||
TAB_PROVINCES: 'provinces',
|
TAB_PROVINCES: 'provinces',
|
||||||
|
TAB_CARDS: 'cards',
|
||||||
TAB_PHONES: 'phones',
|
TAB_PHONES: 'phones',
|
||||||
TAB_SITES: 'sites',
|
TAB_SITES: 'sites',
|
||||||
TAB_SETTINGS: 'settings',
|
TAB_SETTINGS: 'settings',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="tools.isUserOk() || noaut">
|
<div v-if="tools.isUserOk() || noaut">
|
||||||
|
|
||||||
<div v-if="circuit">
|
<div v-if="circuit">
|
||||||
<q-item
|
<q-item
|
||||||
:class="
|
:class="
|
||||||
@@ -108,7 +107,6 @@
|
|||||||
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
|
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
|
||||||
lines="1"
|
lines="1"
|
||||||
>
|
>
|
||||||
|
|
||||||
<CSaldo
|
<CSaldo
|
||||||
v-if="tools.isUserOk() && username === myusername() && account"
|
v-if="tools.isUserOk() && username === myusername() && account"
|
||||||
:account="account"
|
:account="account"
|
||||||
@@ -120,36 +118,42 @@
|
|||||||
</CSaldo>
|
</CSaldo>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label
|
<q-item-label
|
||||||
lines="4"
|
lines="4"
|
||||||
v-if="
|
v-if="
|
||||||
tools.isUserOk() &&
|
tools.isUserOk() &&
|
||||||
username === myusername() &&
|
username === myusername() &&
|
||||||
!account &&
|
!account &&
|
||||||
visu !== costanti.ENTER_TO_THE_CIRCUIT
|
visu !== costanti.ENTER_TO_THE_CIRCUIT
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="centermydiv text-center">
|
<div class="centermydiv text-center">
|
||||||
<q-banner inline-actions class="bg-blue text-white">
|
<q-banner
|
||||||
<span v-html="$t('circuit.non_entrato')"></span>
|
v-if="!circuitStore.SonoDentroAdAlmeno1CircuitoConFido()"
|
||||||
<template v-slot:action>
|
inline-actions
|
||||||
<q-btn
|
class="bg-blue text-white"
|
||||||
v-if="
|
>
|
||||||
!userStore.IsMyCircuitByName(circuit.name) &&
|
<span v-html="$t('circuit.entra_italia_solo_dopo_aver_fido')"></span>
|
||||||
!userStore.IsAskedCircuitByName(circuit.name) &&
|
</q-banner>
|
||||||
!userStore.IsRefusedCircuitByName(circuit.name)
|
<q-banner v-else inline-actions class="bg-blue text-white">
|
||||||
"
|
<span v-html="$t('circuit.non_entrato')"></span>
|
||||||
color="positive"
|
<template v-slot:action>
|
||||||
:label="$t('circuit.apri')"
|
<q-btn
|
||||||
@click="
|
v-if="
|
||||||
requestToEnterCircuit = true;
|
!userStore.IsMyCircuitByName(circuit.name) &&
|
||||||
groupnameSel = null;
|
!userStore.IsAskedCircuitByName(circuit.name) &&
|
||||||
"
|
!userStore.IsRefusedCircuitByName(circuit.name)
|
||||||
/>
|
"
|
||||||
</template>
|
color="positive"
|
||||||
</q-banner>
|
:label="$t('circuit.apri')"
|
||||||
</div>
|
@click="
|
||||||
</q-item-label>
|
requestToEnterCircuit = true;
|
||||||
|
groupnameSel = null;
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-banner>
|
||||||
|
</div>
|
||||||
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section
|
<q-item-section
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { defineComponent, onMounted, PropType, ref, watch, computed } from 'vue'
|
import { defineComponent, onMounted, PropType, ref, watch, computed } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
import { ICircuit, IImgGallery, IUserFields, IUserProfile } from 'model'
|
import { ICircuit, IImgGallery, IUserFields, IUserProfile } from 'model'
|
||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
@@ -53,6 +54,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const circuitStore = useCircuitStore()
|
const circuitStore = useCircuitStore()
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const $router = useRouter()
|
const $router = useRouter()
|
||||||
@@ -107,6 +109,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(() => strProv.value, (newval: string, oldval: string) => {
|
watch(() => strProv.value, (newval: string, oldval: string) => {
|
||||||
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
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) => {
|
watch(() => card.value, (newval: string, oldval: string) => {
|
||||||
@@ -432,7 +439,7 @@ export default defineComponent({
|
|||||||
if (circuitStore.SonoDentroAdAlmeno1CircuitoConFido())
|
if (circuitStore.SonoDentroAdAlmeno1CircuitoConFido())
|
||||||
arrStep.value.push({ ...stepCircItalia, indstep: numindstep.value })
|
arrStep.value.push({ ...stepCircItalia, indstep: numindstep.value })
|
||||||
|
|
||||||
arrStep.value.push({ ...stepFine, indstep: numindstep.value })
|
// arrStep.value.push({ ...stepFine, indstep: numindstep.value })
|
||||||
|
|
||||||
if (userStore.isUserOk()) {
|
if (userStore.isUserOk()) {
|
||||||
updatestart()
|
updatestart()
|
||||||
@@ -553,6 +560,7 @@ export default defineComponent({
|
|||||||
usersList,
|
usersList,
|
||||||
userstoverify,
|
userstoverify,
|
||||||
numStepCompleted,
|
numStepCompleted,
|
||||||
|
globalStore,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,11 +9,14 @@
|
|||||||
class="q-pa-none"
|
class="q-pa-none"
|
||||||
:title="
|
:title="
|
||||||
!progressStep
|
!progressStep
|
||||||
? $t('tutorial.title', { indstep, numindstep }) +
|
? $t('tutorial.title', { indstep: indstep + 1, numindstep }) +
|
||||||
` (` +
|
` (` +
|
||||||
progressLabel +
|
progressLabel +
|
||||||
`)`
|
`)`
|
||||||
: $t('tutorial.title_completed', { indstep, numindstep }) +
|
: $t('tutorial.title_completed', {
|
||||||
|
indstep: indstep + 1,
|
||||||
|
numindstep,
|
||||||
|
}) +
|
||||||
` (` +
|
` (` +
|
||||||
progressLabel +
|
progressLabel +
|
||||||
`)`
|
`)`
|
||||||
@@ -84,6 +87,22 @@
|
|||||||
:db_rec="contact"
|
:db_rec="contact"
|
||||||
>
|
>
|
||||||
</CMySelectCity>
|
</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>
|
</q-banner>
|
||||||
<div v-else-if="step === STEP_NAME_SURNAME">
|
<div v-else-if="step === STEP_NAME_SURNAME">
|
||||||
<q-banner>
|
<q-banner>
|
||||||
@@ -125,7 +144,7 @@
|
|||||||
outlined
|
outlined
|
||||||
v-model="circuitsel"
|
v-model="circuitsel"
|
||||||
:options="mylistcircuits"
|
:options="mylistcircuits"
|
||||||
label="Circuito"
|
label="SCegli il Circuito della tua Zona:"
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
@@ -250,7 +269,9 @@
|
|||||||
<span v-html="$t('tutorial.utenti_da_verificare')"></span>
|
<span v-html="$t('tutorial.utenti_da_verificare')"></span>
|
||||||
<template v-slot:action>
|
<template v-slot:action>
|
||||||
<q-btn
|
<q-btn
|
||||||
:label="userstoverify.length + ' ' + $t('tutorial.utenti_da_verif_btn')"
|
:label="
|
||||||
|
userstoverify.length + ' ' + $t('tutorial.utenti_da_verif_btn')
|
||||||
|
"
|
||||||
class="q-my-sm"
|
class="q-my-sm"
|
||||||
rounded
|
rounded
|
||||||
icon="fas fa-users"
|
icon="fas fa-users"
|
||||||
@@ -293,14 +314,19 @@
|
|||||||
|
|
||||||
<q-card-section class="inset-shadow">
|
<q-card-section class="inset-shadow">
|
||||||
<q-list>
|
<q-list>
|
||||||
<span v-for="(rec, index) in userstoverify" :key="index" class="q-my-sm rounded-borders" clickable>
|
<span
|
||||||
<CMyUser
|
v-for="(rec, index) in userstoverify"
|
||||||
:mycontact="rec"
|
:key="index"
|
||||||
:visu="costanti.ASK_TRUST"
|
class="q-my-sm rounded-borders"
|
||||||
@setCmd="tools.setCmd"
|
clickable
|
||||||
>
|
>
|
||||||
</CMyUser>
|
<CMyUser
|
||||||
</span>
|
:mycontact="rec"
|
||||||
|
:visu="costanti.ASK_TRUST"
|
||||||
|
@setCmd="tools.setCmd"
|
||||||
|
>
|
||||||
|
</CMyUser>
|
||||||
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
value2: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: { CMySelect },
|
components: { CMySelect },
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
:label="label"
|
:label="label"
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
:pickup="false"
|
:pickup="false"
|
||||||
:addnone="true"
|
:addnone="value2 ? false : true"
|
||||||
:dense="false"
|
:dense="false"
|
||||||
:tablesel="table"
|
:tablesel="table"
|
||||||
:myclass="myclass"
|
:myclass="myclass"
|
||||||
:optval="fieldsTable.getKeyByTable(jointable)"
|
:optval="fieldsTable.getKeyByTable(jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(jointable)"
|
:optlab="fieldsTable.getLabelByTable(jointable)"
|
||||||
:options="globalStore.getTableJoinByName(jointable, false, false, '')"
|
:options="globalStore.getTableJoinByName(jointable, false, !!value2, null, value2)"
|
||||||
:useinput="false"
|
:useinput="false"
|
||||||
:dark="$q.dark.isActive"
|
:dark="$q.dark.isActive"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
|
|||||||
@@ -40,6 +40,10 @@
|
|||||||
><em>{{ contact.profile.qualifica }}</em></q-item-label
|
><em>{{ contact.profile.qualifica }}</em></q-item-label
|
||||||
>
|
>
|
||||||
<q-item-label caption lines="1"></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"
|
<q-item-label v-if="labelFooter" lines="1"
|
||||||
><em>{{ labelFooter }}</em></q-item-label
|
><em>{{ labelFooter }}</em></q-item-label
|
||||||
>
|
>
|
||||||
@@ -431,7 +435,7 @@
|
|||||||
<q-icon color="positive" name="fas fa-user-plus" />
|
<q-icon color="positive" name="fas fa-user-plus" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
{{ $t('circuit.accept') }}
|
{{ $t('circuit.add_to_circuit') }}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
@@ -784,7 +788,6 @@
|
|||||||
rounded
|
rounded
|
||||||
dense
|
dense
|
||||||
icon="fas fa-ellipsis-h"
|
icon="fas fa-ellipsis-h"
|
||||||
:color="!contact.verified_by_aportador ? 'red' : 'white'"
|
|
||||||
>
|
>
|
||||||
<!-- </q-btn></q-btn>:icon="
|
<!-- </q-btn></q-btn>:icon="
|
||||||
userStore.IsMyFriendByUsername(contact.username)
|
userStore.IsMyFriendByUsername(contact.username)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
"
|
"
|
||||||
:label="$t('movement.viewpendingtransaction')"
|
:label="$t('movement.viewpendingtransaction')"
|
||||||
@click="visuTransac = true"
|
@click="visuTransac = true"
|
||||||
|
dense
|
||||||
icon="fas fa-info"
|
icon="fas fa-info"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|||||||
@@ -1,16 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row text-center justify-evenly items-center">
|
<div class="row text-center justify-evenly items-center">
|
||||||
<div class="q-mb-sm">
|
<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>
|
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="fas fa-download"
|
icon="fas fa-download"
|
||||||
color="accent"
|
color="accent"
|
||||||
@@ -20,6 +10,16 @@
|
|||||||
@click="tools.receiveRis($q, $t)"
|
@click="tools.receiveRis($q, $t)"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
|
<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>
|
<div class="q-mb-sm"></div>
|
||||||
|
|
||||||
<CUserInfoAccount
|
<CUserInfoAccount
|
||||||
|
|||||||
@@ -116,16 +116,16 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="positive" :label="$t('circuit.accept')"
|
color="positive" :label="$t('circuit.accept')"
|
||||||
@click="tools.addToMyCircuits(q, notif.sender, notif.extrafield)"
|
@click="tools.addFidoToMyCircuits(q, notif.sender, notif.extrafield)"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<!--<q-btn
|
||||||
dense
|
dense
|
||||||
rounded
|
rounded
|
||||||
size="sm"
|
size="sm"
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
color="negative" :label="$t('shared.refuse_ask')"
|
color="negative" :label="$t('shared.refuse_ask')"
|
||||||
@click="tools.refuseReqCircuit(q, notif.sender, notif.extrafield)"
|
@click="tools.refuseReqCircuit(q, notif.sender, notif.extrafield)"
|
||||||
/>
|
/>-->
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2"
|
<q-item-label caption lines="2"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -107,7 +107,24 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
SonoDentroAdAlmeno1CircuitoConFido() {
|
SonoDentroAdAlmeno1CircuitoConFido(): boolean {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
if (userStore.my.profile.useraccounts) {
|
||||||
|
const accountsConFido = userStore.my.profile.useraccounts.filter((rec: IAccount) => rec.fidoConcesso > 0)
|
||||||
|
|
||||||
|
for (const account of accountsConFido) {
|
||||||
|
const mycircuit = this.listcircuits.find((circ: ICircuit) => circ._id === account.circuitId)
|
||||||
|
if (mycircuit && !mycircuit.showAlways) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
get1CircuitoConFido() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
if (userStore.my.profile.useraccounts) {
|
if (userStore.my.profile.useraccounts) {
|
||||||
@@ -157,9 +174,13 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
|
|
||||||
getCircuitsNameByProvince(prov: string): ICircuit[] {
|
getCircuitsNameByProvince(prov: string): ICircuit[] {
|
||||||
const filterarr = this.listcircuits.filter((rec: ICircuit) => rec.strProv === prov)
|
const filterarr = this.listcircuits.filter((rec: ICircuit) => rec.strProv === prov)
|
||||||
return filterarr.map((subArray: any) => {
|
let arrcirc = filterarr.map((subArray: any) => {
|
||||||
return subArray.name;
|
return subArray.name;
|
||||||
})
|
})
|
||||||
|
if (arrcirc.length > 1)
|
||||||
|
return ['[Nessuno]', ...arrcirc]
|
||||||
|
else
|
||||||
|
return arrcirc
|
||||||
},
|
},
|
||||||
|
|
||||||
getCircuitByCircuitId(circuitId: string): ICircuit | null | undefined {
|
getCircuitByCircuitId(circuitId: string): ICircuit | null | undefined {
|
||||||
|
|||||||
@@ -325,6 +325,11 @@ const colTableWhere = [
|
|||||||
AddCol({ name: 'whereicon', label_trans: 'where.whereicon' }),
|
AddCol({ name: 'whereicon', label_trans: 'where.whereicon' }),
|
||||||
AddCol(DeleteRec),
|
AddCol(DeleteRec),
|
||||||
]
|
]
|
||||||
|
const colTableCard = [
|
||||||
|
AddCol({ name: 'label', label_trans: 'label' }),
|
||||||
|
AddCol({ name: 'card', label_trans: 'card' }),
|
||||||
|
AddCol(DeleteRec),
|
||||||
|
]
|
||||||
|
|
||||||
export const colTableProducer = [
|
export const colTableProducer = [
|
||||||
AddCol({ name: 'name', label_trans: 'producer.name' }),
|
AddCol({ name: 'name', label_trans: 'producer.name' }),
|
||||||
@@ -3944,6 +3949,13 @@ export const fieldsTable = {
|
|||||||
collabel: 'descr',
|
collabel: 'descr',
|
||||||
remote: true,
|
remote: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'cards',
|
||||||
|
label: 'Zone',
|
||||||
|
columns: colTableCard,
|
||||||
|
colkey: 'card',
|
||||||
|
collabel: 'label',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'countries',
|
value: 'countries',
|
||||||
label: 'Nazione',
|
label: 'Nazione',
|
||||||
|
|||||||
@@ -3055,6 +3055,11 @@ export const tools = {
|
|||||||
if (mytimestamp) return date.formatDate(mytimestamp, 'DD/MM/YYYY')
|
if (mytimestamp) return date.formatDate(mytimestamp, 'DD/MM/YYYY')
|
||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
getstrDateShort(mytimestamp: Date | number | string | undefined) {
|
||||||
|
// console.log('getstrDate', mytimestamp)
|
||||||
|
if (mytimestamp) return date.formatDate(mytimestamp, 'DD/MM/YY')
|
||||||
|
return ''
|
||||||
|
},
|
||||||
getstrMonth(mytimestamp: Date | number | string | undefined) {
|
getstrMonth(mytimestamp: Date | number | string | undefined) {
|
||||||
// console.log('getstrDate', mytimestamp)
|
// console.log('getstrDate', mytimestamp)
|
||||||
if (mytimestamp) return date.formatDate(mytimestamp, 'MMMM YYYY')
|
if (mytimestamp) return date.formatDate(mytimestamp, 'MMMM YYYY')
|
||||||
@@ -5585,9 +5590,9 @@ export const tools = {
|
|||||||
userStore.my.profile.userstoverify = userStore.my.profile.userstoverify.filter((rec: any) => rec.username !== usernameDest)
|
userStore.my.profile.userstoverify = userStore.my.profile.userstoverify.filter((rec: any) => rec.username !== usernameDest)
|
||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
tools.showPositiveNotif($q, t('db.trusted', {username: usernameDest}))
|
tools.showPositiveNotif($q, t('db.enabled_to_app', {username: usernameDest}))
|
||||||
else
|
else
|
||||||
tools.showNegativeNotif($q, t('db.rejected', {username: usernameDest}))
|
tools.showNegativeNotif($q, t('db.rejected_to_app', {username: usernameDest}))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -7334,6 +7339,9 @@ export const tools = {
|
|||||||
if (tablejoin === 'provinces') {
|
if (tablejoin === 'provinces') {
|
||||||
ris = 'profile.resid_province'
|
ris = 'profile.resid_province'
|
||||||
}
|
}
|
||||||
|
if (tablejoin === 'cards') {
|
||||||
|
ris = 'profile.resid_card'
|
||||||
|
}
|
||||||
if (tablejoin === 'regions') {
|
if (tablejoin === 'regions') {
|
||||||
ris = 'mycities.reg'
|
ris = 'mycities.reg'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import {
|
import {
|
||||||
ICfgServer, ICity,
|
ICfgServer, ICity, IProvince,
|
||||||
IColGridTable,
|
IColGridTable,
|
||||||
IConfig,
|
IConfig,
|
||||||
IDataToSet,
|
IDataToSet,
|
||||||
@@ -263,12 +263,17 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isPresenteCardsByProv: (state: IGlobalState) => (myprov: string) => {
|
||||||
|
const arrprov: any[] = state.provinces.filter((prov: IProvince) => prov.prov === myprov && (!!prov.card))
|
||||||
|
return arrprov && arrprov.length > 0
|
||||||
|
},
|
||||||
|
|
||||||
getRespByUsername: (state: IGlobalState) => (username: string) => {
|
getRespByUsername: (state: IGlobalState) => (username: string) => {
|
||||||
const rec = state.resps.find((recin: any) => recin.username === username)
|
const rec = state.resps.find((recin: any) => recin.username === username)
|
||||||
return !!rec ? rec.name + ' ' + rec.surname : ''
|
return !!rec ? rec.name + ' ' + rec.surname : ''
|
||||||
},
|
},
|
||||||
|
|
||||||
getListByTable: (state: IGlobalState) => (table: string): any => {
|
getListByTable: (state: IGlobalState) => (table: string, value2?: any): any => {
|
||||||
let ris: any = []
|
let ris: any = []
|
||||||
|
|
||||||
const calendarStore = useCalendarStore()
|
const calendarStore = useCalendarStore()
|
||||||
@@ -345,7 +350,17 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
else if (table === 'catgrps')
|
else if (table === 'catgrps')
|
||||||
return state.catgrps
|
return state.catgrps
|
||||||
else if (table === 'provinces')
|
else if (table === 'provinces')
|
||||||
return state.provinces
|
return state.provinces.filter((prov: IProvince) => (!prov.card))
|
||||||
|
else if (table === 'cards') {
|
||||||
|
const arrprov: any[] = state.provinces.filter((prov: IProvince) => prov.prov === value2 && (!!prov.card))
|
||||||
|
if (arrprov) {
|
||||||
|
// const idCardArray: { _id: number, card: string }[] = arrprov.map(({ _id, card }) => ({ _id, card }));
|
||||||
|
const idCardArray: { card: string, label: string }[] = arrprov.map(({ card }) => ({ card, label: card }));
|
||||||
|
return idCardArray
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
return ris
|
return ris
|
||||||
}
|
}
|
||||||
@@ -1607,6 +1622,17 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return recprov ? recprov.descr : ''
|
return recprov ? recprov.descr : ''
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getArrCardByProv(provstr: string): string[] {
|
||||||
|
|
||||||
|
const recprov = this.provinces.filter((rec: any) => rec.prov === provstr)
|
||||||
|
|
||||||
|
const cardArray: string[] = recprov.map((prov: IProvince) => prov.card);
|
||||||
|
|
||||||
|
return cardArray
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async sendEmailTest({ previewonly }: { previewonly: any }) {
|
async sendEmailTest({ previewonly }: { previewonly: any }) {
|
||||||
@@ -1770,7 +1796,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return arr
|
return arr
|
||||||
},
|
},
|
||||||
|
|
||||||
getTableJoinByName(table: string, addall?: boolean, addnone?: boolean, filter?: any) {
|
getTableJoinByName(table: string, addall?: boolean, addnone?: boolean, filter?: any, value2?: any) {
|
||||||
|
|
||||||
let myarr: any = []
|
let myarr: any = []
|
||||||
if (table === 'permissions') myarr = [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Facilitatore, shared_consts.Permissions.Editor, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
|
if (table === 'permissions') myarr = [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Facilitatore, shared_consts.Permissions.Editor, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
|
||||||
@@ -1801,7 +1827,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
else if (table === toolsext.TABUNITS) myarr = shared_consts.Units_Of_Measure_ListBox
|
else if (table === toolsext.TABUNITS) myarr = shared_consts.Units_Of_Measure_ListBox
|
||||||
else if (table === 'usernotifs') myarr = shared_consts.UsersNotif_Adv_List
|
else if (table === 'usernotifs') myarr = shared_consts.UsersNotif_Adv_List
|
||||||
else if (table === 'typenotifs') myarr = shared_consts.TypeNotifs_Arr
|
else if (table === 'typenotifs') myarr = shared_consts.TypeNotifs_Arr
|
||||||
else myarr = this.getListByTable(table)
|
else myarr = this.getListByTable(table, value2)
|
||||||
|
|
||||||
if (costanti.TABLES_ARRAY.includes(table)) {
|
if (costanti.TABLES_ARRAY.includes(table)) {
|
||||||
const newarr = []
|
const newarr = []
|
||||||
@@ -1825,7 +1851,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
if (addnone) {
|
if (addnone) {
|
||||||
const mykey = fieldsTable.getKeyByTable(table)
|
const mykey = fieldsTable.getKeyByTable(table)
|
||||||
const collab = fieldsTable.getLabelByTable(table)
|
const collab = fieldsTable.getLabelByTable(table)
|
||||||
const obj: any = {}
|
let obj: any = {}
|
||||||
obj[mykey] = costanti.FILTER_NESSUNO
|
obj[mykey] = costanti.FILTER_NESSUNO
|
||||||
obj[collab] = '[Nessuno]'
|
obj[collab] = '[Nessuno]'
|
||||||
|
|
||||||
@@ -1835,6 +1861,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
obj.idSector = []
|
obj.idSector = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (table === 'cards') {
|
||||||
|
obj = {card: '', label: '[Nessuna]'}
|
||||||
|
}
|
||||||
myarr = [obj, ...myarr]
|
myarr = [obj, ...myarr]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ export default defineComponent({
|
|||||||
t,
|
t,
|
||||||
userStore,
|
userStore,
|
||||||
site: globalStore.site,
|
site: globalStore.site,
|
||||||
|
globalStore,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -178,6 +178,21 @@
|
|||||||
:db_rec="userStore.my"
|
:db_rec="userStore.my"
|
||||||
>
|
>
|
||||||
</CMySelectCity>
|
</CMySelectCity>
|
||||||
|
<CMySelectCity
|
||||||
|
v-if="globalStore.isPresenteCardsByProv(userStore.my.profile.resid_province)"
|
||||||
|
:label="$t('reg.resid_card')"
|
||||||
|
table="users"
|
||||||
|
jointable="cards"
|
||||||
|
v-model="userStore.my.profile.resid_card"
|
||||||
|
myclass="selectorwide text-white"
|
||||||
|
:db_type="costanti.FieldType.string"
|
||||||
|
db_field="profile"
|
||||||
|
db_subfield="resid_card"
|
||||||
|
:db_id="userStore.my._id"
|
||||||
|
:db_rec="userStore.my"
|
||||||
|
:value2="userStore.my.profile.resid_province"
|
||||||
|
>
|
||||||
|
</CMySelectCity>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="myrow">
|
<div class="myrow">
|
||||||
|
|||||||
@@ -144,13 +144,16 @@
|
|||||||
v-close-popup
|
v-close-popup
|
||||||
></q-btn>
|
></q-btn>
|
||||||
</q-bar>
|
</q-bar>
|
||||||
<q-card-section class="q-px-xs inset-shadow">
|
<q-card-section class="q-px-xs inset-shadow">
|
||||||
<q-option-group
|
<q-option-group
|
||||||
v-model="showwhommov"
|
v-model="showwhommov"
|
||||||
:options="optionsmov"
|
:options="optionsmov"
|
||||||
color="primary"
|
color="primary"
|
||||||
/>
|
/>
|
||||||
<q-toggle v-model="tabellare" label="Formato Tabella"></q-toggle>
|
<q-toggle
|
||||||
|
v-model="tabellare"
|
||||||
|
label="Formato Tabella"
|
||||||
|
></q-toggle>
|
||||||
|
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
v-if="tabellare && !loading"
|
v-if="tabellare && !loading"
|
||||||
@@ -274,6 +277,41 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
|
<q-banner
|
||||||
|
v-if="
|
||||||
|
circuitStore.isCircuitNational(circuit.name) &&
|
||||||
|
!circuitStore.SonoDentroAdAlmeno1CircuitoConFido()
|
||||||
|
"
|
||||||
|
inline-actions
|
||||||
|
class="bg-blue text-white"
|
||||||
|
>
|
||||||
|
<template v-slot:avatar>
|
||||||
|
<q-icon name="fas fa-info" color="red" size="sm" />
|
||||||
|
</template>
|
||||||
|
<span
|
||||||
|
v-html="$t('circuit.entra_italia_solo_dopo_aver_fido')"
|
||||||
|
></span>
|
||||||
|
</q-banner>
|
||||||
|
<q-banner
|
||||||
|
v-if="circuitStore.IsNationalAndNotEnterInLocal(circuit.name)"
|
||||||
|
rounded
|
||||||
|
class="bg-red text-white"
|
||||||
|
style="text-align: center"
|
||||||
|
>
|
||||||
|
<template v-slot:avatar>
|
||||||
|
<q-icon
|
||||||
|
class="vertical-align center"
|
||||||
|
name="fas fa-info"
|
||||||
|
color="white"
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<em style="font-weight: bold">{{
|
||||||
|
$t('circuit.beforeentertolocalcircuit')
|
||||||
|
}}</em
|
||||||
|
><br />
|
||||||
|
</q-banner>
|
||||||
<q-banner
|
<q-banner
|
||||||
v-if="
|
v-if="
|
||||||
userStore.my.profile &&
|
userStore.my.profile &&
|
||||||
@@ -285,7 +323,7 @@
|
|||||||
style="text-align: center"
|
style="text-align: center"
|
||||||
>
|
>
|
||||||
<template v-slot:avatar>
|
<template v-slot:avatar>
|
||||||
<q-icon name="fas fa-info" color="red" size="sm" />
|
<q-icon name="fas fa-info" color="white" size="sm" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<em style="font-weight: bold">{{
|
<em style="font-weight: bold">{{
|
||||||
@@ -314,33 +352,15 @@
|
|||||||
><br />
|
><br />
|
||||||
</q-banner>
|
</q-banner>
|
||||||
|
|
||||||
<q-banner
|
|
||||||
v-if="circuitStore.IsNationalAndNotEnterInLocal(circuit.name)"
|
|
||||||
rounded
|
|
||||||
class="bg-red text-white"
|
|
||||||
style="text-align: center"
|
|
||||||
>
|
|
||||||
<template v-slot:avatar>
|
|
||||||
<q-icon
|
|
||||||
class="vertical-align center"
|
|
||||||
name="fas fa-info"
|
|
||||||
color="red"
|
|
||||||
size="sm"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<em style="font-weight: bold">{{
|
|
||||||
$t('circuit.beforeentertolocalcircuit')
|
|
||||||
}}</em
|
|
||||||
><br />
|
|
||||||
</q-banner>
|
|
||||||
|
|
||||||
<div class="centermydiv q-mt-md">
|
<div class="centermydiv q-mt-md">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
!userStore.IsMyCircuitByName(circuit.name) &&
|
!userStore.IsMyCircuitByName(circuit.name) &&
|
||||||
!userStore.IsAskedCircuitByName(circuit.name) &&
|
!userStore.IsAskedCircuitByName(circuit.name) &&
|
||||||
!userStore.IsRefusedCircuitByName(circuit.name)
|
!userStore.IsRefusedCircuitByName(circuit.name) &&
|
||||||
|
(!circuitStore.isCircuitNational(circuit.name) ||
|
||||||
|
(circuitStore.isCircuitNational(circuit.name) &&
|
||||||
|
circuitStore.SonoDentroAdAlmeno1CircuitoConFido()))
|
||||||
"
|
"
|
||||||
:disable="circuitStore.IsNationalAndNotEnterInLocal(circuit.name)"
|
:disable="circuitStore.IsNationalAndNotEnterInLocal(circuit.name)"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
|
|||||||
@@ -689,6 +689,15 @@
|
|||||||
"
|
"
|
||||||
label="Provincia"
|
label="Provincia"
|
||||||
/>
|
/>
|
||||||
|
<CLabel
|
||||||
|
v-if="!!userStore.userprofile.profile.resid_card"
|
||||||
|
v-bind="$attrs"
|
||||||
|
:copy="false"
|
||||||
|
:value="
|
||||||
|
userStore.userprofile.profile.resid_card
|
||||||
|
"
|
||||||
|
label="Zona"
|
||||||
|
/>
|
||||||
<CDateTime
|
<CDateTime
|
||||||
v-if="
|
v-if="
|
||||||
checkifShow('profile.dateofbirth') &&
|
checkifShow('profile.dateofbirth') &&
|
||||||
|
|||||||
Reference in New Issue
Block a user