- tutorial Circuito Ris Italia
- Invia RIS (visibile per tutti)
This commit is contained in:
@@ -1827,6 +1827,7 @@ export const shared_consts = {
|
|||||||
'profile.mycircuits': 1,
|
'profile.mycircuits': 1,
|
||||||
'profile.qualifica': 1,
|
'profile.qualifica': 1,
|
||||||
'profile.resid_province': 1,
|
'profile.resid_province': 1,
|
||||||
|
'profile.resid_card': 1,
|
||||||
'profile.username_telegram': 1,
|
'profile.username_telegram': 1,
|
||||||
'profile.favorite': 1,
|
'profile.favorite': 1,
|
||||||
'profile.bookmark': 1,
|
'profile.bookmark': 1,
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ export default defineComponent({
|
|||||||
function load() {
|
function load() {
|
||||||
non_hai_circuito_nazionale.value = !circuitStore.sonoDentroAlCircuitoNazionale()
|
non_hai_circuito_nazionale.value = !circuitStore.sonoDentroAlCircuitoNazionale()
|
||||||
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoNazionale(props.to_user)
|
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoNazionale(props.to_user)
|
||||||
|
if (userStore.getMyCircuitsInCommonByUser(props.to_user).length > 0) {
|
||||||
|
destin_non_ha_circuito_naz.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(load)
|
onMounted(load)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="row q-ma-sm shadow justify-center"
|
class="row q-ma-sm shadow justify-center"
|
||||||
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
||||||
|
|||||||
@@ -503,6 +503,7 @@ export default defineComponent({
|
|||||||
'profile.mygroups': 1,
|
'profile.mygroups': 1,
|
||||||
'profile.qualifica': 1,
|
'profile.qualifica': 1,
|
||||||
'profile.resid_province': 1,
|
'profile.resid_province': 1,
|
||||||
|
'profile.resid_card': 1,
|
||||||
'mycities.reg': 1,
|
'mycities.reg': 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -106,6 +106,7 @@
|
|||||||
@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"
|
||||||
|
|||||||
@@ -20,9 +20,12 @@ import { useI18n } from '@/boot/i18n'
|
|||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useCircuitStore } from '@store/CircuitStore'
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
|
|
||||||
const STEP_CIRCUIT = 2
|
const STEP_CITY = 100
|
||||||
const STEP_NAME_SURNAME = 20
|
const STEP_CIRCUIT = 200
|
||||||
const STEP_FOTO = 50
|
const STEP_CIRCUIT_ITALIA = 210
|
||||||
|
const STEP_FINE = 400
|
||||||
|
const STEP_NAME_SURNAME = 401
|
||||||
|
const STEP_FOTO = 402
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyProfileTutorial',
|
name: 'CMyProfileTutorial',
|
||||||
@@ -54,12 +57,16 @@ export default defineComponent({
|
|||||||
const $route = useRoute()
|
const $route = useRoute()
|
||||||
|
|
||||||
const showAccountInfo = ref(false)
|
const showAccountInfo = ref(false)
|
||||||
|
const indstep = ref(0)
|
||||||
const step = ref(1)
|
const step = ref(1)
|
||||||
const nascondiavviso = ref(false)
|
const nascondiavviso = ref(false)
|
||||||
|
|
||||||
const username = ref('')
|
const username = ref('')
|
||||||
const showsendCoinTo = ref(false)
|
const showsendCoinTo = ref(false)
|
||||||
|
const circuitsel = ref('')
|
||||||
const mycircuit = ref(<ICircuit | undefined | null>null)
|
const mycircuit = ref(<ICircuit | undefined | null>null)
|
||||||
|
const circuititalia = ref(<ICircuit | undefined | null>null)
|
||||||
|
const mylistcircuits = ref(<ICircuit[] | undefined>[])
|
||||||
|
|
||||||
const contact = ref(<IUserFields | null>null)
|
const contact = ref(<IUserFields | null>null)
|
||||||
|
|
||||||
@@ -81,57 +88,38 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const card = computed(() => {
|
||||||
|
|
||||||
|
if (contact.value && contact.value.profile.resid_card) {
|
||||||
|
return contact.value.profile.resid_card
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
watch(() => strProv.value, (newval: string, oldval: string) => {
|
watch(() => strProv.value, (newval: string, oldval: string) => {
|
||||||
mycircuit.value = circuitStore.getCircuitByProvince(strProv.value)
|
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => step.value, (newval: number, oldval: number) => {
|
watch(() => card.value, (newval: string, oldval: string) => {
|
||||||
|
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
||||||
if (step.value > userStore.my.profile.stepTutorial)
|
})
|
||||||
userStore.my.profile.stepTutorial = step.value
|
|
||||||
|
|
||||||
userStore.saveStepTutorial(step.value)
|
|
||||||
if (step.value >= numstep.value) {
|
|
||||||
tools.scrollToTop()
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((step.value === STEP_CIRCUIT )) {
|
|
||||||
mycircuit.value = circuitStore.getCircuitByProvince(strProv.value)
|
|
||||||
console.log('isAskedToCircuit()', isAskedToCircuit())
|
|
||||||
// userStore.savenoCircuit(isAskedToCircuit())
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step.value === STEP_NAME_SURNAME + 1) {
|
|
||||||
let index = step.value
|
|
||||||
console.log('Salva ', arrStep[index])
|
|
||||||
if ((contact.value ? !!contact.value.name : false) && contact.value!.name) {
|
|
||||||
// nome esistente
|
|
||||||
userStore.savenoNameSurname(false)
|
|
||||||
} else {
|
|
||||||
userStore.savenoNameSurname(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (step.value === STEP_FOTO + 1) {
|
|
||||||
let index = step.value
|
|
||||||
if (userStore.my.profile.img) {
|
|
||||||
// foto esistente
|
|
||||||
userStore.savenoFoto(false)
|
|
||||||
} else {
|
|
||||||
userStore.savenoFoto(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
watch(() => circuitsel.value, (newval: string, oldval: string) => {
|
||||||
|
if (circuitsel.value)
|
||||||
|
mycircuit.value = circuitStore.getCircuitByName(circuitsel.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const arrStep = [
|
let arrStep = ref([
|
||||||
{
|
{
|
||||||
step: 1,
|
indstep: 0,
|
||||||
|
step: STEP_CITY,
|
||||||
title: t('tutorial.step_residence_title'),
|
title: t('tutorial.step_residence_title'),
|
||||||
extratitle: function () { return ': ' + contact.value!.profile.resid_province },
|
extratitle: function () { return ': ' + contact.value!.profile.resid_province },
|
||||||
label: t('tutorial.step_residence'),
|
label: t('tutorial.step_residence'),
|
||||||
checkOk: function () { return contact.value ? !!contact.value.profile.resid_province : false },
|
checkOk: function (): boolean { return contact.value ? !!contact.value.profile.resid_province : false },
|
||||||
checkOkReal: function () { return this.checkOk() },
|
checkOkReal: function (): boolean { return this.checkOk() },
|
||||||
icon: 'house',
|
icon: 'house',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
@@ -146,6 +134,7 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
},*/
|
},*/
|
||||||
{
|
{
|
||||||
|
indstep: 1,
|
||||||
step: STEP_CIRCUIT,
|
step: STEP_CIRCUIT,
|
||||||
title: t('tutorial.step_circuito_title'),
|
title: t('tutorial.step_circuito_title'),
|
||||||
extratitle: function () { return mycircuit.value ? ': ' + mycircuit.value.name : '' },
|
extratitle: function () { return mycircuit.value ? ': ' + mycircuit.value.name : '' },
|
||||||
@@ -192,26 +181,105 @@ export default defineComponent({
|
|||||||
icon: 'fas fa-tshirt',
|
icon: 'fas fa-tshirt',
|
||||||
required: false,
|
required: false,
|
||||||
},*/
|
},*/
|
||||||
{
|
])
|
||||||
step: 3,
|
|
||||||
title: t('tutorial.step_fine_title'),
|
const numindstep = computed(() => arrStep.value.length)
|
||||||
extratitle: function () { return '' },
|
|
||||||
label: t('tutorial.step_fine'),
|
watch(() => indstep.value, (newval: number, oldval: number) => {
|
||||||
checkOk: function () {
|
if (indstep.value >= 0)
|
||||||
return true
|
step.value = arrStep.value[indstep.value].step
|
||||||
},
|
else
|
||||||
checkOkReal: function () { return this.checkOk() },
|
step.value = 0
|
||||||
icon: 'fas fa-tshirt',
|
|
||||||
required: false,
|
if (indstep.value > userStore.my.profile.stepTutorial)
|
||||||
},
|
userStore.my.profile.stepTutorial = indstep.value
|
||||||
]
|
|
||||||
|
userStore.saveStepTutorial(indstep.value)
|
||||||
|
if (indstep.value >= numindstep.value) {
|
||||||
|
tools.scrollToTop()
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((step.value === STEP_CIRCUIT)) {
|
||||||
|
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
||||||
|
|
||||||
|
mylistcircuits.value = circuitStore.getCircuitsNameByProvince(strProv.value)
|
||||||
|
console.log('isAskedToCircuit()', isAskedToCircuit())
|
||||||
|
// userStore.savenoCircuit(isAskedToCircuit())
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((step.value === STEP_CIRCUIT_ITALIA)) {
|
||||||
|
mylistcircuits.value = []
|
||||||
|
circuititalia.value = circuitStore.getCircuitByPath('ris_italia')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (step.value === STEP_NAME_SURNAME + 1) {
|
||||||
|
let index = indstep.value
|
||||||
|
console.log('Salva ', arrStep.value[index])
|
||||||
|
if ((contact.value ? !!contact.value.name : false) && contact.value!.name) {
|
||||||
|
// nome esistente
|
||||||
|
userStore.savenoNameSurname(false)
|
||||||
|
} else {
|
||||||
|
userStore.savenoNameSurname(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (step.value === STEP_FOTO + 1) {
|
||||||
|
let index = indstep.value
|
||||||
|
if (userStore.my.profile.img) {
|
||||||
|
// foto esistente
|
||||||
|
userStore.savenoFoto(false)
|
||||||
|
} else {
|
||||||
|
userStore.savenoFoto(true)
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const stepFine = {
|
||||||
|
step: STEP_FINE,
|
||||||
|
title: t('tutorial.step_fine_title'),
|
||||||
|
extratitle: function () { return '' },
|
||||||
|
label: t('tutorial.step_fine'),
|
||||||
|
checkOk: function () {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
checkOkReal: function () { return this.checkOk() },
|
||||||
|
icon: 'fas fa-tshirt',
|
||||||
|
required: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const stepCircItalia =
|
||||||
|
{
|
||||||
|
step: STEP_CIRCUIT_ITALIA,
|
||||||
|
title: t('tutorial.step_circuito_italia_title'),
|
||||||
|
extratitle: function () { return circuititalia.value ? ': ' + circuititalia.value.name : '' },
|
||||||
|
label: circuitStore.SonoDentroAdAlmeno1CircuitoConFido() ? t('tutorial.step_circuito_italia') : t('tutorial.non_sono_dentro_al_mio_circuito'),
|
||||||
|
label_ok: t('tutorial.step_circuito_italia_ok'),
|
||||||
|
checkOk: function () {
|
||||||
|
if (circuititalia.value) {
|
||||||
|
return ((userStore.IsMyCircuitByName(circuititalia.value.name) ||
|
||||||
|
userStore.IsAskedCircuitByName(circuititalia.value.name))) || userStore.my.profile.noCircIta
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
checkOkReal: function () {
|
||||||
|
if (circuititalia.value) {
|
||||||
|
return ((userStore.IsMyCircuitByName(circuititalia.value.name) ||
|
||||||
|
userStore.IsAskedCircuitByName(circuititalia.value.name)))
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
icon: 'img: images/1ris_rosso_100.png',
|
||||||
|
required: false,
|
||||||
|
}
|
||||||
|
|
||||||
const numstep = computed(() => arrStep.length)
|
|
||||||
|
|
||||||
const prStep = computed(() => {
|
const prStep = computed(() => {
|
||||||
|
|
||||||
let num = 0
|
let num = 0
|
||||||
for (const mystep of arrStep) {
|
for (const mystep of arrStep.value) {
|
||||||
if (mystep.checkOk())
|
if (mystep.checkOk())
|
||||||
num++
|
num++
|
||||||
}
|
}
|
||||||
@@ -220,8 +288,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
const progressStep = computed(() => {
|
const progressStep = computed(() => {
|
||||||
|
|
||||||
if (numstep.value > 0)
|
if (numindstep.value > 0)
|
||||||
return prStep.value / numstep.value
|
return prStep.value / numindstep.value
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
})
|
})
|
||||||
@@ -253,22 +321,24 @@ export default defineComponent({
|
|||||||
username.value = props.mycontact.username
|
username.value = props.mycontact.username
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mylistcircuits.value = circuitStore.getCircuitsNameByProvince(strProv.value)
|
||||||
|
|
||||||
mycircuit.value = circuitStore.getCircuitByProvince(strProv.value)
|
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
||||||
|
|
||||||
if (contact.value)
|
if (contact.value)
|
||||||
filtroutente.value = [{ userId: contact.value._id }]
|
if (contact.value)
|
||||||
|
filtroutente.value = [{ userId: contact.value._id }]
|
||||||
|
|
||||||
userStore.my.profile.stepTutorial = getFirstStepToFill()
|
userStore.my.profile.stepTutorial = getFirstStepToFill()
|
||||||
|
|
||||||
step.value = userStore.my.profile.stepTutorial ? userStore.my.profile.stepTutorial : 1
|
indstep.value = userStore.my.profile.stepTutorial ? userStore.my.profile.stepTutorial : 1
|
||||||
if (step.value > numstep.value)
|
if (indstep.value > numindstep.value)
|
||||||
step.value = numstep.value
|
indstep.value = numindstep.value
|
||||||
|
|
||||||
// circuit.value = circuitStore.getCircuitByName(props.circuitname)
|
// circuit.value = circuitStore.getCircuitByName(props.circuitname)
|
||||||
|
|
||||||
if (!userStore.my.profile.stepTutorial || userStore.my.profile.stepTutorial === 0) {
|
if (!userStore.my.profile.stepTutorial || userStore.my.profile.stepTutorial === 0) {
|
||||||
userStore.my.profile.stepTutorial = 1
|
userStore.my.profile.stepTutorial = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -276,8 +346,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
|
|
||||||
function getFirstStepToFill() {
|
function getFirstStepToFill() {
|
||||||
let num = 1
|
let num = 0
|
||||||
for (const mystep of arrStep) {
|
for (const mystep of arrStep.value) {
|
||||||
if (mystep.checkOk())
|
if (mystep.checkOk())
|
||||||
num++
|
num++
|
||||||
else
|
else
|
||||||
@@ -308,23 +378,23 @@ export default defineComponent({
|
|||||||
|
|
||||||
const checkifDisabled = computed(() => {
|
const checkifDisabled = computed(() => {
|
||||||
let ret = true
|
let ret = true
|
||||||
let mystep = step.value
|
let mystep = indstep.value
|
||||||
if (mystep > 0) {
|
if (mystep > 0) {
|
||||||
return !arrStep[mystep - 1].checkOk()
|
return !arrStep.value[mystep].checkOk()
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function clickFinish() {
|
function clickFinish() {
|
||||||
userStore.my.profile.stepTutorial = numstep.value + 1
|
userStore.my.profile.stepTutorial = numindstep.value + 1
|
||||||
step.value = numstep.value + 1
|
indstep.value = numindstep.value + 1
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isNextDisable() {
|
function isNextDisable() {
|
||||||
try {
|
try {
|
||||||
return arrStep[step.value - 1].required && !arrStep[step.value - 1].checkOk()
|
return arrStep.value[indstep.value - 1].required && !arrStep.value[indstep.value - 1].checkOk()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -334,7 +404,7 @@ export default defineComponent({
|
|||||||
return prStep.value
|
return prStep.value
|
||||||
}
|
}
|
||||||
function completed() {
|
function completed() {
|
||||||
return prStep.value === numstep.value
|
return prStep.value === numindstep.value
|
||||||
}
|
}
|
||||||
|
|
||||||
function getColorTutorial() {
|
function getColorTutorial() {
|
||||||
@@ -348,7 +418,14 @@ export default defineComponent({
|
|||||||
return 'primary'
|
return 'primary'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
|
|
||||||
|
if (circuitStore.SonoDentroAdAlmeno1CircuitoConFido())
|
||||||
|
arrStep.value.push({ ...stepCircItalia, indstep: numindstep.value })
|
||||||
|
|
||||||
|
arrStep.value.push({ ...stepFine, indstep: numindstep.value })
|
||||||
|
|
||||||
if (userStore.isUserOk()) {
|
if (userStore.isUserOk()) {
|
||||||
updatestart()
|
updatestart()
|
||||||
}
|
}
|
||||||
@@ -359,13 +436,44 @@ export default defineComponent({
|
|||||||
return !!(mycircuit.value && ((!userStore.IsMyCircuitByName(mycircuit.value.name) && !userStore.IsAskedCircuitByName(mycircuit.value.name))))
|
return !!(mycircuit.value && ((!userStore.IsMyCircuitByName(mycircuit.value.name) && !userStore.IsAskedCircuitByName(mycircuit.value.name))))
|
||||||
}
|
}
|
||||||
|
|
||||||
function isSalta() {
|
function isAskedToCircuitItalia(): boolean {
|
||||||
return step.value === STEP_CIRCUIT && (mycircuit.value && isAskedToCircuit())
|
return !!(circuititalia.value && ((!userStore.IsMyCircuitByName(circuititalia.value.name) && !userStore.IsAskedCircuitByName(circuititalia.value.name))))
|
||||||
}
|
}
|
||||||
|
|
||||||
function askToConfirmSkip() {
|
function isSalta(step: number) {
|
||||||
|
return (step === STEP_CIRCUIT && (mycircuit.value && isAskedToCircuit())) ||
|
||||||
|
(step === STEP_CIRCUIT_ITALIA && (circuititalia.value && isAskedToCircuitItalia()))
|
||||||
|
}
|
||||||
|
|
||||||
|
function askToConfirmSkip(mystep: number) {
|
||||||
|
if (mystep === STEP_CIRCUIT) {
|
||||||
|
return $q.dialog({
|
||||||
|
message: t('circuit.skipentercircuit'),
|
||||||
|
html: true,
|
||||||
|
ok: {
|
||||||
|
label: t('dialog.yes'),
|
||||||
|
push: false,
|
||||||
|
},
|
||||||
|
title: '',
|
||||||
|
cancel: true,
|
||||||
|
persistent: false,
|
||||||
|
}).onOk(() => {
|
||||||
|
if ((step.value === STEP_CIRCUIT)) {
|
||||||
|
userStore.savenoCircuit(isAskedToCircuit())
|
||||||
|
}
|
||||||
|
indstep.value++
|
||||||
|
return true
|
||||||
|
}).onCancel(() => {
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
} else if (mystep === STEP_CIRCUIT_ITALIA) {
|
||||||
|
askToConfirmSkipItalia(mystep)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function askToConfirmSkipItalia(mystep: number) {
|
||||||
return $q.dialog({
|
return $q.dialog({
|
||||||
message: t('circuit.skipentercircuit'),
|
message: t('circuit.skipentercircuit_italia'),
|
||||||
html: true,
|
html: true,
|
||||||
ok: {
|
ok: {
|
||||||
label: t('dialog.yes'),
|
label: t('dialog.yes'),
|
||||||
@@ -375,15 +483,18 @@ export default defineComponent({
|
|||||||
cancel: true,
|
cancel: true,
|
||||||
persistent: false,
|
persistent: false,
|
||||||
}).onOk(() => {
|
}).onOk(() => {
|
||||||
step.value++
|
if ((mystep === STEP_CIRCUIT_ITALIA)) {
|
||||||
|
userStore.savenoCircIta(isAskedToCircuitItalia())
|
||||||
|
}
|
||||||
|
indstep.value++
|
||||||
return true
|
return true
|
||||||
}).onCancel(() => {
|
}).onCancel(() => {
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getColorDone(step: number) {
|
function getColorDone(indstep: number) {
|
||||||
return arrStep[step].checkOkReal() ? 'positive' : 'negative'
|
return arrStep.value[indstep].checkOkReal() ? 'positive' : 'negative'
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
@@ -399,13 +510,15 @@ export default defineComponent({
|
|||||||
tools,
|
tools,
|
||||||
showsendCoinTo,
|
showsendCoinTo,
|
||||||
showAccountInfo,
|
showAccountInfo,
|
||||||
|
indstep,
|
||||||
step,
|
step,
|
||||||
numstep,
|
numindstep,
|
||||||
progressLabel,
|
progressLabel,
|
||||||
progressStep,
|
progressStep,
|
||||||
arrStep,
|
arrStep,
|
||||||
strProv,
|
strProv,
|
||||||
mycircuit,
|
mycircuit,
|
||||||
|
mylistcircuits,
|
||||||
userStore,
|
userStore,
|
||||||
clickFinish,
|
clickFinish,
|
||||||
isNextDisable,
|
isNextDisable,
|
||||||
@@ -417,10 +530,18 @@ export default defineComponent({
|
|||||||
getColorTutorial,
|
getColorTutorial,
|
||||||
getFirstStepToFill,
|
getFirstStepToFill,
|
||||||
STEP_CIRCUIT,
|
STEP_CIRCUIT,
|
||||||
|
STEP_CIRCUIT_ITALIA,
|
||||||
|
STEP_CITY,
|
||||||
|
STEP_FOTO,
|
||||||
|
STEP_NAME_SURNAME,
|
||||||
isSalta,
|
isSalta,
|
||||||
askToConfirmSkip,
|
askToConfirmSkip,
|
||||||
getColorDone,
|
getColorDone,
|
||||||
nascondiavviso,
|
nascondiavviso,
|
||||||
|
circuitsel,
|
||||||
|
card,
|
||||||
|
askToConfirmSkipItalia,
|
||||||
|
circuititalia,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="contact">
|
<div v-if="contact">
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div v-if="progressStep !== 1"
|
<div
|
||||||
:class="step >= numstep ? 'col-10' : 'col-12'">
|
v-if="progressStep !== 1"
|
||||||
|
:class="indstep >= numindstep ? 'col-10' : 'col-12'"
|
||||||
|
>
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
class="q-pa-none"
|
class="q-pa-none"
|
||||||
:title="
|
:title="
|
||||||
!progressStep
|
!progressStep
|
||||||
? $t('tutorial.title', { step, numstep }) +
|
? $t('tutorial.title', { indstep, numindstep }) +
|
||||||
` (` +
|
` (` +
|
||||||
progressLabel +
|
progressLabel +
|
||||||
`)`
|
`)`
|
||||||
: $t('tutorial.title_completed', { step, numstep }) +
|
: $t('tutorial.title_completed', { indstep, numindstep }) +
|
||||||
` (` +
|
` (` +
|
||||||
progressLabel +
|
progressLabel +
|
||||||
`)`
|
`)`
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
:canopen="!completed()"
|
:canopen="!completed()"
|
||||||
>
|
>
|
||||||
<q-slide-transition>
|
<q-slide-transition>
|
||||||
<div v-show="step < numstep">
|
<div v-show="indstep < numindstep">
|
||||||
<!--<div class="q-my-sm">
|
<!--<div class="q-my-sm">
|
||||||
<q-linear-progress
|
<q-linear-progress
|
||||||
stripe
|
stripe
|
||||||
@@ -50,7 +52,7 @@
|
|||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<q-stepper
|
<q-stepper
|
||||||
v-model="step"
|
v-model="indstep"
|
||||||
ref="stepper"
|
ref="stepper"
|
||||||
color="primary"
|
color="primary"
|
||||||
animated
|
animated
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
<q-step
|
<q-step
|
||||||
v-for="(recstep, index) in arrStep"
|
v-for="(recstep, index) in arrStep"
|
||||||
:key="index"
|
:key="index"
|
||||||
:name="recstep.step"
|
:name="recstep.indstep"
|
||||||
:title="recstep.title + recstep.extratitle()"
|
:title="recstep.title + recstep.extratitle()"
|
||||||
:icon="recstep.icon"
|
:icon="recstep.icon"
|
||||||
:done="recstep.checkOk()"
|
:done="recstep.checkOk()"
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
>
|
>
|
||||||
<div v-html="recstep.label"></div>
|
<div v-html="recstep.label"></div>
|
||||||
<br />
|
<br />
|
||||||
<q-banner v-if="step === 1">
|
<q-banner v-if="recstep.step === STEP_CITY">
|
||||||
<CMySelectCity
|
<CMySelectCity
|
||||||
:label="$t('reg.resid_province')"
|
:label="$t('reg.resid_province')"
|
||||||
table="users"
|
table="users"
|
||||||
@@ -83,7 +85,7 @@
|
|||||||
>
|
>
|
||||||
</CMySelectCity>
|
</CMySelectCity>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
<div v-else-if="step === 101">
|
<div v-else-if="step === STEP_NAME_SURNAME">
|
||||||
<q-banner>
|
<q-banner>
|
||||||
<div class="myrow">
|
<div class="myrow">
|
||||||
<CMyFieldDb
|
<CMyFieldDb
|
||||||
@@ -107,13 +109,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="step === 2" class="">
|
<div
|
||||||
|
v-else-if="
|
||||||
|
step === STEP_CIRCUIT || step === STEP_CIRCUIT_ITALIA
|
||||||
|
"
|
||||||
|
class=""
|
||||||
|
>
|
||||||
|
<q-select
|
||||||
|
v-if="mylistcircuits && mylistcircuits.length > 1"
|
||||||
|
:behavior="
|
||||||
|
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||||
|
"
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="circuitsel"
|
||||||
|
:options="mylistcircuits"
|
||||||
|
label="Circuito"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
|
||||||
<CMyCircuit
|
<CMyCircuit
|
||||||
|
v-if="step === STEP_CIRCUIT"
|
||||||
:mycircuit="mycircuit"
|
:mycircuit="mycircuit"
|
||||||
:visu="costanti.ENTER_TO_THE_CIRCUIT"
|
:visu="costanti.ENTER_TO_THE_CIRCUIT"
|
||||||
:username="contact.username"
|
:username="contact.username"
|
||||||
>
|
>
|
||||||
</CMyCircuit>
|
</CMyCircuit>
|
||||||
|
<CMyCircuit
|
||||||
|
v-if="step === STEP_CIRCUIT_ITALIA"
|
||||||
|
:mycircuit="circuititalia"
|
||||||
|
:visu="costanti.ENTER_TO_THE_CIRCUIT"
|
||||||
|
:username="contact.username"
|
||||||
|
>
|
||||||
|
</CMyCircuit>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="step === 300" class="">
|
<div v-else-if="step === 300" class="">
|
||||||
<!--
|
<!--
|
||||||
@@ -139,7 +168,7 @@
|
|||||||
-->
|
-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="step === 105" class="">
|
<div v-else-if="step === STEP_FOTO" class="">
|
||||||
<div class="myrow">
|
<div class="myrow">
|
||||||
<!--<CMyFieldDb
|
<!--<CMyFieldDb
|
||||||
:title="$t('reg.photo')"
|
:title="$t('reg.photo')"
|
||||||
@@ -167,7 +196,7 @@
|
|||||||
></div>
|
></div>
|
||||||
<q-stepper-navigation>
|
<q-stepper-navigation>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="step > 1"
|
v-if="recstep.indstep > 1"
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="$refs.stepper.previous()"
|
@click="$refs.stepper.previous()"
|
||||||
@@ -175,20 +204,17 @@
|
|||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
:flat="isSalta()"
|
:flat="isSalta(recstep.step)"
|
||||||
:disabled="isNextDisable()"
|
:disabled="isNextDisable()"
|
||||||
@click="
|
@click="(isSalta(recstep.step))
|
||||||
step === STEP_CIRCUIT && isSalta()
|
? askToConfirmSkip(recstep.step) :
|
||||||
? askToConfirmSkip()
|
((recstep.indstep === numindstep) ? clickFinish() : $refs.stepper.next())
|
||||||
: step === numstep
|
|
||||||
? clickFinish()
|
|
||||||
: $refs.stepper.next()
|
|
||||||
"
|
"
|
||||||
:color="isSalta() ? 'negative' : 'primary'"
|
:color="isSalta(recstep.step) ? 'negative' : 'primary'"
|
||||||
:label="
|
:label="
|
||||||
step === numstep
|
recstep.indstep === numindstep
|
||||||
? $t('dialog.finish')
|
? $t('dialog.finish')
|
||||||
: isSalta()
|
: isSalta(recstep.step)
|
||||||
? $t('dialog.salta')
|
? $t('dialog.salta')
|
||||||
: $t('dialog.avanti')
|
: $t('dialog.avanti')
|
||||||
"
|
"
|
||||||
@@ -202,25 +228,32 @@
|
|||||||
</CTitleBanner>
|
</CTitleBanner>
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="(step >= numstep) && progressStep !== 1"
|
v-if="indstep >= numindstep && progressStep !== 1"
|
||||||
:class="`col-2 ` + getColorTutorial()"
|
:class="`col-2 ` + getColorTutorial()"
|
||||||
icon="fas fa-arrow-right"
|
icon="fas fa-arrow-right"
|
||||||
color="text-white"
|
color="text-white"
|
||||||
dense
|
dense
|
||||||
size="md"
|
size="md"
|
||||||
:label="$t('dialog.vai')"
|
:label="$t('dialog.vai')"
|
||||||
@click="step = 1"
|
@click="indstep = 1"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-banner
|
<q-banner
|
||||||
inline-actions
|
inline-actions
|
||||||
class="bg-red text-white"
|
class="bg-red text-white"
|
||||||
v-if="userStore.my.profile.calc.numGoodsAndServices <= 0 && !nascondiavviso"
|
v-if="
|
||||||
|
userStore.my.profile.calc.numGoodsAndServices <= 0 && !nascondiavviso
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<span v-html="$t('tutorial.step_beniservizi')"></span>
|
<span v-html="$t('tutorial.step_beniservizi')"></span>
|
||||||
<template v-slot:action>
|
<template v-slot:action>
|
||||||
<q-btn flat color="white" label="Chiudi" @click="nascondiavviso = true" />
|
<q-btn
|
||||||
|
flat
|
||||||
|
color="white"
|
||||||
|
label="Chiudi"
|
||||||
|
@click="nascondiavviso = true"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<CFinder
|
<CFinder
|
||||||
|
:ind="tools.getIndMainCardsByTable(toolsext.TABMYBACHECAS)"
|
||||||
:table="toolsext.TABCIRCUITS"
|
:table="toolsext.TABCIRCUITS"
|
||||||
:noButtAdd="true"
|
:noButtAdd="true"
|
||||||
:showFilterPersonal="false"
|
:showFilterPersonal="false"
|
||||||
|
|||||||
@@ -1090,6 +1090,7 @@ export interface ICircuit {
|
|||||||
subname: string
|
subname: string
|
||||||
idCity: string[]
|
idCity: string[]
|
||||||
strProv: string
|
strProv: string
|
||||||
|
card: string
|
||||||
link_group: string
|
link_group: string
|
||||||
longdescr: string
|
longdescr: string
|
||||||
systemUserDescr: string
|
systemUserDescr: string
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ export interface IUserProfile {
|
|||||||
born_province?: string
|
born_province?: string
|
||||||
resid_prov_id?: number
|
resid_prov_id?: number
|
||||||
resid_province: string
|
resid_province: string
|
||||||
|
resid_card: string
|
||||||
born_country?: string
|
born_country?: string
|
||||||
my_dream?: string
|
my_dream?: string
|
||||||
saw_and_accepted?: boolean
|
saw_and_accepted?: boolean
|
||||||
|
|||||||
@@ -587,6 +587,7 @@ const msg_it = {
|
|||||||
dateofbirth: 'Data di Nascita',
|
dateofbirth: 'Data di Nascita',
|
||||||
born_city: 'Comune di Nascita',
|
born_city: 'Comune di Nascita',
|
||||||
resid_province: 'Provincia',
|
resid_province: 'Provincia',
|
||||||
|
resid_card: 'Zona',
|
||||||
born_province: 'Provincia di Nascita',
|
born_province: 'Provincia di Nascita',
|
||||||
nationality_born: 'Paese di Nascita',
|
nationality_born: 'Paese di Nascita',
|
||||||
iscrizione_compilata: 'Iscritto',
|
iscrizione_compilata: 'Iscritto',
|
||||||
@@ -1223,7 +1224,7 @@ const msg_it = {
|
|||||||
apri: 'Entra !',
|
apri: 'Entra !',
|
||||||
invia_msg_dest: 'Invia la richiesta a {name}',
|
invia_msg_dest: 'Invia la richiesta a {name}',
|
||||||
non_hai_circuito_nazionale: 'Per poter inviare dei RIS ad una persona di un altro territorio, è necessario entrare sul "Circuito RIS Italia"',
|
non_hai_circuito_nazionale: 'Per poter inviare dei RIS ad una persona di un altro territorio, è necessario entrare sul "Circuito RIS Italia"',
|
||||||
destin_non_ha_circuito_naz: 'Il tuo Destinatario non fa parte del tuo territorio, pertanto occorre che acceda al Circuito RIS Italia',
|
destin_non_ha_circuito_naz: 'Il tuo Destinatario non è ancora dentro al Circuito RIS Italia',
|
||||||
|
|
||||||
beforeentertolocalcircuit: 'Prima di entrare nel Circuito Nazionale occorre accedere in quello della tua Provincia',
|
beforeentertolocalcircuit: 'Prima di entrare nel Circuito Nazionale occorre accedere in quello della tua Provincia',
|
||||||
non_entrato: 'Per far parte di questo Circuito devi chiedere di Entrare!',
|
non_entrato: 'Per far parte di questo Circuito devi chiedere di Entrare!',
|
||||||
@@ -1231,6 +1232,7 @@ const msg_it = {
|
|||||||
link_group: 'Gruppo Telegram',
|
link_group: 'Gruppo Telegram',
|
||||||
chat_gruppo_telegram_circuito: 'Entra nella chat di Gruppo Telegram dove conoscerai persone della tua provincia',
|
chat_gruppo_telegram_circuito: 'Entra nella chat di Gruppo Telegram dove conoscerai persone della tua provincia',
|
||||||
skipentercircuit: 'Confermare di non voler entrare ora nel Circuito RIS?\nLo si potrà comunque fare in un secondo momento, dal menu "Circuiti".',
|
skipentercircuit: 'Confermare di non voler entrare ora nel Circuito RIS?\nLo si potrà comunque fare in un secondo momento, dal menu "Circuiti".',
|
||||||
|
skipentercircuit_italia: 'Confermare di non voler entrare ora nel Circuito RIS ITALIA?\nLo si potrà comunque fare in un secondo momento, dal menu "Circuiti".',
|
||||||
vaialcircuito: 'Vai al Circuito',
|
vaialcircuito: 'Vai al Circuito',
|
||||||
iscritti: 'iscritti trovati',
|
iscritti: 'iscritti trovati',
|
||||||
coins_requestedris: 'Il tuo utente {username} sarà visibile sulla lista dei riceventi per 8 ore. Fai cliccare \'Invia RIS a..\' a chi ti deve inviare i RIS.',
|
coins_requestedris: 'Il tuo utente {username} sarà visibile sulla lista dei riceventi per 8 ore. Fai cliccare \'Invia RIS a..\' a chi ti deve inviare i RIS.',
|
||||||
@@ -1522,9 +1524,14 @@ const msg_it = {
|
|||||||
step_residence: 'Scegli la <strong>provincia</strong> in cui vivi abitualmente:',
|
step_residence: 'Scegli la <strong>provincia</strong> in cui vivi abitualmente:',
|
||||||
step_nomecognome_title: 'Nome',
|
step_nomecognome_title: 'Nome',
|
||||||
step_nomecognome: '<strong>Facoltativo</strong>: Per farti trovare dai tuoi amici puoi inserire anche un Nome o Soprannome',
|
step_nomecognome: '<strong>Facoltativo</strong>: Per farti trovare dai tuoi amici puoi inserire anche un Nome o Soprannome',
|
||||||
step_circuito_title: 'Circuito RIS',
|
step_circuito_title: '1) Circuito Provinciale',
|
||||||
|
step_circuito_italia_title: '2) Circuito Nazionale',
|
||||||
step_circuito: 'Entra nel Circuito del tuo territorio. Potrai così utilizzare il tuo conto personale in RIS, per scambiare Beni, Servizi, ecc.',
|
step_circuito: 'Entra nel Circuito del tuo territorio. Potrai così utilizzare il tuo conto personale in RIS, per scambiare Beni, Servizi, ecc.',
|
||||||
step_circuito_ok: 'Ottimo! Sei entrato nel Circuito del tuo territorio. Puoi così utilizzare il tuo conto personale in RIS, per scambiare Beni, Servizi, ecc.',
|
step_circuito_ok: 'Ottimo! Sei entrato nel Circuito del tuo territorio.',
|
||||||
|
step_circuito_italia_ok: 'Ottimo! Sei entrato nel Circuito RIS ITALIA !',
|
||||||
|
non_sono_dentro_al_mio_circuito: 'Per poter accedere al Circuito ITALIA è necessario prima essere stati accettati al Circuito Territoriale',
|
||||||
|
step_circuito_italia: 'Puoi entrare anche nel Circuito RIS Italia Nazionale. Potrai così utilizzare altri RIS con membri di Circuiti Territoriali diversi dal tuo.',
|
||||||
|
step_circuito_italia_ok: 'Ottimo! Sei entrato nel Circuito RIS ITALIA.',
|
||||||
step_beniservizi_title: 'I Tuoi Annunci',
|
step_beniservizi_title: 'I Tuoi Annunci',
|
||||||
step_beniservizi: 'Ricordati di aggiungere cosa tu Offri: Tra <strong>Beni, Servizi e/o Ospitalità</strong>',
|
step_beniservizi: 'Ricordati di aggiungere cosa tu Offri: Tra <strong>Beni, Servizi e/o Ospitalità</strong>',
|
||||||
step_foto_title: 'Foto Profilo',
|
step_foto_title: 'Foto Profilo',
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
|
|
||||||
for (const circ of circNazionali) {
|
for (const circ of circNazionali) {
|
||||||
const trovato = userStore.my.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
const trovato = userStore.my.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
||||||
if (trovato){
|
if (trovato) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,18 +69,20 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
EDentroAlCircuitoNazionale(user: IUserFields) {
|
EDentroAlCircuitoNazionale(user: IUserFields) {
|
||||||
|
|
||||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||||
|
|
||||||
for (const circ of circNazionali) {
|
if (user.profile.mycircuits && user.profile.mycircuits.length > 0) {
|
||||||
const trovato = user.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
for (const circ of circNazionali) {
|
||||||
if (trovato){
|
const trovato = user.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
||||||
return true
|
if (trovato) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
isCircuitNational(circuitname: string): boolean {
|
isCircuitNational(circuitname: string): boolean {
|
||||||
@@ -94,6 +96,21 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
SonoDentroAdAlmeno1CircuitoConFido() {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
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 mycircuit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
},
|
||||||
|
|
||||||
getCircuitClass(circuit: ICircuit) {
|
getCircuitClass(circuit: ICircuit) {
|
||||||
if (circuit.status === shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA)
|
if (circuit.status === shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA)
|
||||||
return 'circuito_abilitato'
|
return 'circuito_abilitato'
|
||||||
@@ -117,8 +134,19 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
|||||||
return this.listcircuits.find((rec: ICircuit) => rec.name === circuitname)
|
return this.listcircuits.find((rec: ICircuit) => rec.name === circuitname)
|
||||||
},
|
},
|
||||||
|
|
||||||
getCircuitByProvince(prov: string): ICircuit | undefined | null {
|
getCircuitByProvinceAndCard(prov: string, card: string): ICircuit | undefined | null {
|
||||||
return this.listcircuits.find((rec: ICircuit) => rec.strProv === prov)
|
return this.listcircuits.find((rec: ICircuit) => rec.strProv === prov && ((rec.card === card) || (!card)))
|
||||||
|
},
|
||||||
|
|
||||||
|
getCircuitsByProvince(prov: string): ICircuit[] {
|
||||||
|
return this.listcircuits.filter((rec: ICircuit) => rec.strProv === prov)
|
||||||
|
},
|
||||||
|
|
||||||
|
getCircuitsNameByProvince(prov: string): ICircuit[] {
|
||||||
|
const filterarr = this.listcircuits.filter((rec: ICircuit) => rec.strProv === prov)
|
||||||
|
return filterarr.map((subArray: any) => {
|
||||||
|
return subArray.name;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getCircuitByCircuitId(circuitId: string): ICircuit | null | undefined {
|
getCircuitByCircuitId(circuitId: string): ICircuit | null | undefined {
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ export const costanti = {
|
|||||||
{
|
{
|
||||||
visible: false,
|
visible: false,
|
||||||
title: 'Circuiti RIS',
|
title: 'Circuiti RIS',
|
||||||
|
strsingolo: 'Circuito',
|
||||||
subtitle: 'Unisciti al circuito della tua provincia per utilizzare <strong>i RIS come strumento di scambio</strong>',
|
subtitle: 'Unisciti al circuito della tua provincia per utilizzare <strong>i RIS come strumento di scambio</strong>',
|
||||||
to: '/circuits',
|
to: '/circuits',
|
||||||
table: 'circuits',
|
table: 'circuits',
|
||||||
|
|||||||
@@ -2314,6 +2314,12 @@ export const colTableUsers = [
|
|||||||
subfield: 'resid_province',
|
subfield: 'resid_province',
|
||||||
label_trans: 'reg.resid_province', fieldtype: costanti.FieldType.string
|
label_trans: 'reg.resid_province', fieldtype: costanti.FieldType.string
|
||||||
}),
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'profile.resid_card',
|
||||||
|
field: 'profile',
|
||||||
|
subfield: 'resid_card',
|
||||||
|
label_trans: 'reg.resid_card', fieldtype: costanti.FieldType.string
|
||||||
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'profile.resplist',
|
name: 'profile.resplist',
|
||||||
field: 'profile',
|
field: 'profile',
|
||||||
@@ -2750,6 +2756,12 @@ export const colTableUsersISP = [
|
|||||||
subfield: 'resid_province',
|
subfield: 'resid_province',
|
||||||
label_trans: 'reg.resid_province', fieldtype: costanti.FieldType.string
|
label_trans: 'reg.resid_province', fieldtype: costanti.FieldType.string
|
||||||
}),
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'profile.resid_card',
|
||||||
|
field: 'profile',
|
||||||
|
subfield: 'resid_card',
|
||||||
|
label_trans: 'reg.resid_card', fieldtype: costanti.FieldType.string
|
||||||
|
}),
|
||||||
|
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', maxlength: 12,
|
name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', maxlength: 12,
|
||||||
|
|||||||
@@ -7887,13 +7887,13 @@ export const tools = {
|
|||||||
updateLink(link: string) {
|
updateLink(link: string) {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
if (link === '/circuits') {
|
/*if (link === '/circuits') {
|
||||||
let path = userStore.my.profile.last_circuitpath
|
let path = userStore.my.profile.last_circuitpath
|
||||||
if (path) {
|
if (path) {
|
||||||
return '/circuit/' + path
|
return '/circuit/' + path
|
||||||
}
|
}
|
||||||
return link
|
return link
|
||||||
}
|
}*/
|
||||||
return link
|
return link
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ export const DefaultUser: IUserFields = {
|
|||||||
useraccounts: [],
|
useraccounts: [],
|
||||||
calc: { numGoodsAndServices: 0 },
|
calc: { numGoodsAndServices: 0 },
|
||||||
resid_province: '',
|
resid_province: '',
|
||||||
|
resid_card: '',
|
||||||
},
|
},
|
||||||
cart: {
|
cart: {
|
||||||
userId: '',
|
userId: '',
|
||||||
@@ -177,6 +178,7 @@ export const DefaultProfile: IUserProfile = {
|
|||||||
useraccounts: [],
|
useraccounts: [],
|
||||||
calc: { numGoodsAndServices: 0 },
|
calc: { numGoodsAndServices: 0 },
|
||||||
resid_province: '',
|
resid_province: '',
|
||||||
|
resid_card: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useUserStore = defineStore('UserStore', {
|
export const useUserStore = defineStore('UserStore', {
|
||||||
@@ -1888,7 +1890,8 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return yes
|
return true
|
||||||
|
// return yes
|
||||||
},
|
},
|
||||||
|
|
||||||
async setSeen($q: any, t: any, id: any, table: string, myrec: any) {
|
async setSeen($q: any, t: any, id: any, table: string, myrec: any) {
|
||||||
|
|||||||
@@ -363,6 +363,7 @@ export default defineComponent({
|
|||||||
'profile.mycircuits': 1,
|
'profile.mycircuits': 1,
|
||||||
'profile.qualifica': 1,
|
'profile.qualifica': 1,
|
||||||
'profile.resid_province': 1,
|
'profile.resid_province': 1,
|
||||||
|
'profile.resid_card': 1,
|
||||||
'account._id': 1,
|
'account._id': 1,
|
||||||
'account.saldo': 1,
|
'account.saldo': 1,
|
||||||
'account.saldo_pend': 1,
|
'account.saldo_pend': 1,
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<CSaldo
|
<CSaldo
|
||||||
|
v-if="account"
|
||||||
:symbol="circuit.symbol"
|
:symbol="circuit.symbol"
|
||||||
:account="account"
|
:account="account"
|
||||||
:color="circuit.color"
|
:color="circuit.color"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<CFinder
|
<CFinder
|
||||||
|
:ind="tools.getIndMainCardsByTable(toolsext.TABCIRCUITS)"
|
||||||
:table="toolsext.TABCIRCUITS"
|
:table="toolsext.TABCIRCUITS"
|
||||||
:noButtAdd="!tools.isManager()"
|
:noButtAdd="!tools.isManager()"
|
||||||
:showFilterPersonal="true"
|
:showFilterPersonal="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user