- 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.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'profile.resid_card': 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
|
||||
@@ -42,6 +42,9 @@ export default defineComponent({
|
||||
function load() {
|
||||
non_hai_circuito_nazionale.value = !circuitStore.sonoDentroAlCircuitoNazionale()
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div v-if="tools.isUserOk()">
|
||||
|
||||
|
||||
<div
|
||||
class="row q-ma-sm shadow justify-center"
|
||||
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
||||
|
||||
@@ -503,6 +503,7 @@ export default defineComponent({
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'profile.resid_card': 1,
|
||||
'mycities.reg': 1,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
|
||||
lines="1"
|
||||
>
|
||||
|
||||
<CSaldo
|
||||
v-if="tools.isUserOk() && username === myusername() && account"
|
||||
:account="account"
|
||||
|
||||
@@ -20,9 +20,12 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
|
||||
const STEP_CIRCUIT = 2
|
||||
const STEP_NAME_SURNAME = 20
|
||||
const STEP_FOTO = 50
|
||||
const STEP_CITY = 100
|
||||
const STEP_CIRCUIT = 200
|
||||
const STEP_CIRCUIT_ITALIA = 210
|
||||
const STEP_FINE = 400
|
||||
const STEP_NAME_SURNAME = 401
|
||||
const STEP_FOTO = 402
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyProfileTutorial',
|
||||
@@ -54,12 +57,16 @@ export default defineComponent({
|
||||
const $route = useRoute()
|
||||
|
||||
const showAccountInfo = ref(false)
|
||||
const indstep = ref(0)
|
||||
const step = ref(1)
|
||||
const nascondiavviso = ref(false)
|
||||
|
||||
const username = ref('')
|
||||
const showsendCoinTo = ref(false)
|
||||
const circuitsel = ref('')
|
||||
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)
|
||||
|
||||
@@ -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) => {
|
||||
mycircuit.value = circuitStore.getCircuitByProvince(strProv.value)
|
||||
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
||||
})
|
||||
|
||||
watch(() => step.value, (newval: number, oldval: number) => {
|
||||
|
||||
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(() => card.value, (newval: string, oldval: string) => {
|
||||
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
|
||||
})
|
||||
|
||||
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'),
|
||||
extratitle: function () { return ': ' + contact.value!.profile.resid_province },
|
||||
label: t('tutorial.step_residence'),
|
||||
checkOk: function () { return contact.value ? !!contact.value.profile.resid_province : false },
|
||||
checkOkReal: function () { return this.checkOk() },
|
||||
checkOk: function (): boolean { return contact.value ? !!contact.value.profile.resid_province : false },
|
||||
checkOkReal: function (): boolean { return this.checkOk() },
|
||||
icon: 'house',
|
||||
required: true,
|
||||
},
|
||||
@@ -146,6 +134,7 @@ export default defineComponent({
|
||||
required: false,
|
||||
},*/
|
||||
{
|
||||
indstep: 1,
|
||||
step: STEP_CIRCUIT,
|
||||
title: t('tutorial.step_circuito_title'),
|
||||
extratitle: function () { return mycircuit.value ? ': ' + mycircuit.value.name : '' },
|
||||
@@ -192,26 +181,105 @@ export default defineComponent({
|
||||
icon: 'fas fa-tshirt',
|
||||
required: false,
|
||||
},*/
|
||||
{
|
||||
step: 3,
|
||||
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 numindstep = computed(() => arrStep.value.length)
|
||||
|
||||
watch(() => indstep.value, (newval: number, oldval: number) => {
|
||||
if (indstep.value >= 0)
|
||||
step.value = arrStep.value[indstep.value].step
|
||||
else
|
||||
step.value = 0
|
||||
|
||||
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(() => {
|
||||
|
||||
let num = 0
|
||||
for (const mystep of arrStep) {
|
||||
for (const mystep of arrStep.value) {
|
||||
if (mystep.checkOk())
|
||||
num++
|
||||
}
|
||||
@@ -220,8 +288,8 @@ export default defineComponent({
|
||||
|
||||
const progressStep = computed(() => {
|
||||
|
||||
if (numstep.value > 0)
|
||||
return prStep.value / numstep.value
|
||||
if (numindstep.value > 0)
|
||||
return prStep.value / numindstep.value
|
||||
else
|
||||
return 0
|
||||
})
|
||||
@@ -253,22 +321,24 @@ export default defineComponent({
|
||||
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)
|
||||
filtroutente.value = [{ userId: contact.value._id }]
|
||||
if (contact.value)
|
||||
filtroutente.value = [{ userId: contact.value._id }]
|
||||
|
||||
userStore.my.profile.stepTutorial = getFirstStepToFill()
|
||||
|
||||
step.value = userStore.my.profile.stepTutorial ? userStore.my.profile.stepTutorial : 1
|
||||
if (step.value > numstep.value)
|
||||
step.value = numstep.value
|
||||
indstep.value = userStore.my.profile.stepTutorial ? userStore.my.profile.stepTutorial : 1
|
||||
if (indstep.value > numindstep.value)
|
||||
indstep.value = numindstep.value
|
||||
|
||||
// circuit.value = circuitStore.getCircuitByName(props.circuitname)
|
||||
|
||||
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() {
|
||||
let num = 1
|
||||
for (const mystep of arrStep) {
|
||||
let num = 0
|
||||
for (const mystep of arrStep.value) {
|
||||
if (mystep.checkOk())
|
||||
num++
|
||||
else
|
||||
@@ -308,23 +378,23 @@ export default defineComponent({
|
||||
|
||||
const checkifDisabled = computed(() => {
|
||||
let ret = true
|
||||
let mystep = step.value
|
||||
let mystep = indstep.value
|
||||
if (mystep > 0) {
|
||||
return !arrStep[mystep - 1].checkOk()
|
||||
return !arrStep.value[mystep].checkOk()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
function clickFinish() {
|
||||
userStore.my.profile.stepTutorial = numstep.value + 1
|
||||
step.value = numstep.value + 1
|
||||
userStore.my.profile.stepTutorial = numindstep.value + 1
|
||||
indstep.value = numindstep.value + 1
|
||||
|
||||
}
|
||||
|
||||
function isNextDisable() {
|
||||
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) {
|
||||
return false
|
||||
}
|
||||
@@ -334,7 +404,7 @@ export default defineComponent({
|
||||
return prStep.value
|
||||
}
|
||||
function completed() {
|
||||
return prStep.value === numstep.value
|
||||
return prStep.value === numindstep.value
|
||||
}
|
||||
|
||||
function getColorTutorial() {
|
||||
@@ -348,7 +418,14 @@ export default defineComponent({
|
||||
return 'primary'
|
||||
}
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
|
||||
if (circuitStore.SonoDentroAdAlmeno1CircuitoConFido())
|
||||
arrStep.value.push({ ...stepCircItalia, indstep: numindstep.value })
|
||||
|
||||
arrStep.value.push({ ...stepFine, indstep: numindstep.value })
|
||||
|
||||
if (userStore.isUserOk()) {
|
||||
updatestart()
|
||||
}
|
||||
@@ -359,13 +436,44 @@ export default defineComponent({
|
||||
return !!(mycircuit.value && ((!userStore.IsMyCircuitByName(mycircuit.value.name) && !userStore.IsAskedCircuitByName(mycircuit.value.name))))
|
||||
}
|
||||
|
||||
function isSalta() {
|
||||
return step.value === STEP_CIRCUIT && (mycircuit.value && isAskedToCircuit())
|
||||
function isAskedToCircuitItalia(): boolean {
|
||||
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({
|
||||
message: t('circuit.skipentercircuit'),
|
||||
message: t('circuit.skipentercircuit_italia'),
|
||||
html: true,
|
||||
ok: {
|
||||
label: t('dialog.yes'),
|
||||
@@ -375,15 +483,18 @@ export default defineComponent({
|
||||
cancel: true,
|
||||
persistent: false,
|
||||
}).onOk(() => {
|
||||
step.value++
|
||||
if ((mystep === STEP_CIRCUIT_ITALIA)) {
|
||||
userStore.savenoCircIta(isAskedToCircuitItalia())
|
||||
}
|
||||
indstep.value++
|
||||
return true
|
||||
}).onCancel(() => {
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
function getColorDone(step: number) {
|
||||
return arrStep[step].checkOkReal() ? 'positive' : 'negative'
|
||||
function getColorDone(indstep: number) {
|
||||
return arrStep.value[indstep].checkOkReal() ? 'positive' : 'negative'
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
@@ -399,13 +510,15 @@ export default defineComponent({
|
||||
tools,
|
||||
showsendCoinTo,
|
||||
showAccountInfo,
|
||||
indstep,
|
||||
step,
|
||||
numstep,
|
||||
numindstep,
|
||||
progressLabel,
|
||||
progressStep,
|
||||
arrStep,
|
||||
strProv,
|
||||
mycircuit,
|
||||
mylistcircuits,
|
||||
userStore,
|
||||
clickFinish,
|
||||
isNextDisable,
|
||||
@@ -417,10 +530,18 @@ export default defineComponent({
|
||||
getColorTutorial,
|
||||
getFirstStepToFill,
|
||||
STEP_CIRCUIT,
|
||||
STEP_CIRCUIT_ITALIA,
|
||||
STEP_CITY,
|
||||
STEP_FOTO,
|
||||
STEP_NAME_SURNAME,
|
||||
isSalta,
|
||||
askToConfirmSkip,
|
||||
getColorDone,
|
||||
nascondiavviso,
|
||||
circuitsel,
|
||||
card,
|
||||
askToConfirmSkipItalia,
|
||||
circuititalia,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<template>
|
||||
<div v-if="contact">
|
||||
<div class="row items-center">
|
||||
<div v-if="progressStep !== 1"
|
||||
:class="step >= numstep ? 'col-10' : 'col-12'">
|
||||
<div
|
||||
v-if="progressStep !== 1"
|
||||
:class="indstep >= numindstep ? 'col-10' : 'col-12'"
|
||||
>
|
||||
<CTitleBanner
|
||||
class="q-pa-none"
|
||||
:title="
|
||||
!progressStep
|
||||
? $t('tutorial.title', { step, numstep }) +
|
||||
? $t('tutorial.title', { indstep, numindstep }) +
|
||||
` (` +
|
||||
progressLabel +
|
||||
`)`
|
||||
: $t('tutorial.title_completed', { step, numstep }) +
|
||||
: $t('tutorial.title_completed', { indstep, numindstep }) +
|
||||
` (` +
|
||||
progressLabel +
|
||||
`)`
|
||||
@@ -22,7 +24,7 @@
|
||||
:canopen="!completed()"
|
||||
>
|
||||
<q-slide-transition>
|
||||
<div v-show="step < numstep">
|
||||
<div v-show="indstep < numindstep">
|
||||
<!--<div class="q-my-sm">
|
||||
<q-linear-progress
|
||||
stripe
|
||||
@@ -50,7 +52,7 @@
|
||||
|
||||
<div class="">
|
||||
<q-stepper
|
||||
v-model="step"
|
||||
v-model="indstep"
|
||||
ref="stepper"
|
||||
color="primary"
|
||||
animated
|
||||
@@ -60,7 +62,7 @@
|
||||
<q-step
|
||||
v-for="(recstep, index) in arrStep"
|
||||
:key="index"
|
||||
:name="recstep.step"
|
||||
:name="recstep.indstep"
|
||||
:title="recstep.title + recstep.extratitle()"
|
||||
:icon="recstep.icon"
|
||||
:done="recstep.checkOk()"
|
||||
@@ -68,7 +70,7 @@
|
||||
>
|
||||
<div v-html="recstep.label"></div>
|
||||
<br />
|
||||
<q-banner v-if="step === 1">
|
||||
<q-banner v-if="recstep.step === STEP_CITY">
|
||||
<CMySelectCity
|
||||
:label="$t('reg.resid_province')"
|
||||
table="users"
|
||||
@@ -83,7 +85,7 @@
|
||||
>
|
||||
</CMySelectCity>
|
||||
</q-banner>
|
||||
<div v-else-if="step === 101">
|
||||
<div v-else-if="step === STEP_NAME_SURNAME">
|
||||
<q-banner>
|
||||
<div class="myrow">
|
||||
<CMyFieldDb
|
||||
@@ -107,13 +109,40 @@
|
||||
</div>
|
||||
</q-banner>
|
||||
</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
|
||||
v-if="step === STEP_CIRCUIT"
|
||||
:mycircuit="mycircuit"
|
||||
:visu="costanti.ENTER_TO_THE_CIRCUIT"
|
||||
:username="contact.username"
|
||||
>
|
||||
</CMyCircuit>
|
||||
<CMyCircuit
|
||||
v-if="step === STEP_CIRCUIT_ITALIA"
|
||||
:mycircuit="circuititalia"
|
||||
:visu="costanti.ENTER_TO_THE_CIRCUIT"
|
||||
:username="contact.username"
|
||||
>
|
||||
</CMyCircuit>
|
||||
</div>
|
||||
<div v-else-if="step === 300" class="">
|
||||
<!--
|
||||
@@ -139,7 +168,7 @@
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div v-else-if="step === 105" class="">
|
||||
<div v-else-if="step === STEP_FOTO" class="">
|
||||
<div class="myrow">
|
||||
<!--<CMyFieldDb
|
||||
:title="$t('reg.photo')"
|
||||
@@ -167,7 +196,7 @@
|
||||
></div>
|
||||
<q-stepper-navigation>
|
||||
<q-btn
|
||||
v-if="step > 1"
|
||||
v-if="recstep.indstep > 1"
|
||||
flat
|
||||
color="primary"
|
||||
@click="$refs.stepper.previous()"
|
||||
@@ -175,20 +204,17 @@
|
||||
class="q-ml-sm"
|
||||
/>
|
||||
<q-btn
|
||||
:flat="isSalta()"
|
||||
:flat="isSalta(recstep.step)"
|
||||
:disabled="isNextDisable()"
|
||||
@click="
|
||||
step === STEP_CIRCUIT && isSalta()
|
||||
? askToConfirmSkip()
|
||||
: step === numstep
|
||||
? clickFinish()
|
||||
: $refs.stepper.next()
|
||||
@click="(isSalta(recstep.step))
|
||||
? askToConfirmSkip(recstep.step) :
|
||||
((recstep.indstep === numindstep) ? clickFinish() : $refs.stepper.next())
|
||||
"
|
||||
:color="isSalta() ? 'negative' : 'primary'"
|
||||
:color="isSalta(recstep.step) ? 'negative' : 'primary'"
|
||||
:label="
|
||||
step === numstep
|
||||
recstep.indstep === numindstep
|
||||
? $t('dialog.finish')
|
||||
: isSalta()
|
||||
: isSalta(recstep.step)
|
||||
? $t('dialog.salta')
|
||||
: $t('dialog.avanti')
|
||||
"
|
||||
@@ -202,25 +228,32 @@
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="(step >= numstep) && progressStep !== 1"
|
||||
v-if="indstep >= numindstep && progressStep !== 1"
|
||||
:class="`col-2 ` + getColorTutorial()"
|
||||
icon="fas fa-arrow-right"
|
||||
color="text-white"
|
||||
dense
|
||||
size="md"
|
||||
:label="$t('dialog.vai')"
|
||||
@click="step = 1"
|
||||
@click="indstep = 1"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-banner
|
||||
inline-actions
|
||||
inline-actions
|
||||
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>
|
||||
<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>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
>
|
||||
|
||||
<CFinder
|
||||
:ind="tools.getIndMainCardsByTable(toolsext.TABMYBACHECAS)"
|
||||
:table="toolsext.TABCIRCUITS"
|
||||
:noButtAdd="true"
|
||||
:showFilterPersonal="false"
|
||||
|
||||
@@ -1090,6 +1090,7 @@ export interface ICircuit {
|
||||
subname: string
|
||||
idCity: string[]
|
||||
strProv: string
|
||||
card: string
|
||||
link_group: string
|
||||
longdescr: string
|
||||
systemUserDescr: string
|
||||
|
||||
@@ -120,6 +120,7 @@ export interface IUserProfile {
|
||||
born_province?: string
|
||||
resid_prov_id?: number
|
||||
resid_province: string
|
||||
resid_card: string
|
||||
born_country?: string
|
||||
my_dream?: string
|
||||
saw_and_accepted?: boolean
|
||||
|
||||
@@ -587,6 +587,7 @@ const msg_it = {
|
||||
dateofbirth: 'Data di Nascita',
|
||||
born_city: 'Comune di Nascita',
|
||||
resid_province: 'Provincia',
|
||||
resid_card: 'Zona',
|
||||
born_province: 'Provincia di Nascita',
|
||||
nationality_born: 'Paese di Nascita',
|
||||
iscrizione_compilata: 'Iscritto',
|
||||
@@ -1223,7 +1224,7 @@ const msg_it = {
|
||||
apri: 'Entra !',
|
||||
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"',
|
||||
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',
|
||||
non_entrato: 'Per far parte di questo Circuito devi chiedere di Entrare!',
|
||||
@@ -1231,6 +1232,7 @@ const msg_it = {
|
||||
link_group: 'Gruppo Telegram',
|
||||
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_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',
|
||||
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.',
|
||||
@@ -1522,9 +1524,14 @@ const msg_it = {
|
||||
step_residence: 'Scegli la <strong>provincia</strong> in cui vivi abitualmente:',
|
||||
step_nomecognome_title: 'Nome',
|
||||
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_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: 'Ricordati di aggiungere cosa tu Offri: Tra <strong>Beni, Servizi e/o Ospitalità</strong>',
|
||||
step_foto_title: 'Foto Profilo',
|
||||
|
||||
@@ -59,7 +59,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
for (const circ of circNazionali) {
|
||||
const trovato = userStore.my.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
||||
if (trovato){
|
||||
if (trovato) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -72,10 +72,12 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
|
||||
|
||||
for (const circ of circNazionali) {
|
||||
const trovato = user.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
||||
if (trovato){
|
||||
return true
|
||||
if (user.profile.mycircuits && user.profile.mycircuits.length > 0) {
|
||||
for (const circ of circNazionali) {
|
||||
const trovato = user.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
|
||||
if (trovato) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
if (circuit.status === shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA)
|
||||
return 'circuito_abilitato'
|
||||
@@ -117,8 +134,19 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
return this.listcircuits.find((rec: ICircuit) => rec.name === circuitname)
|
||||
},
|
||||
|
||||
getCircuitByProvince(prov: string): ICircuit | undefined | null {
|
||||
return this.listcircuits.find((rec: ICircuit) => rec.strProv === prov)
|
||||
getCircuitByProvinceAndCard(prov: string, card: string): ICircuit | undefined | null {
|
||||
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 {
|
||||
|
||||
@@ -159,6 +159,7 @@ export const costanti = {
|
||||
{
|
||||
visible: false,
|
||||
title: 'Circuiti RIS',
|
||||
strsingolo: 'Circuito',
|
||||
subtitle: 'Unisciti al circuito della tua provincia per utilizzare <strong>i RIS come strumento di scambio</strong>',
|
||||
to: '/circuits',
|
||||
table: 'circuits',
|
||||
|
||||
@@ -2314,6 +2314,12 @@ export const colTableUsers = [
|
||||
subfield: 'resid_province',
|
||||
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({
|
||||
name: 'profile.resplist',
|
||||
field: 'profile',
|
||||
@@ -2750,6 +2756,12 @@ export const colTableUsersISP = [
|
||||
subfield: 'resid_province',
|
||||
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({
|
||||
name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', maxlength: 12,
|
||||
|
||||
@@ -7887,13 +7887,13 @@ export const tools = {
|
||||
updateLink(link: string) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
if (link === '/circuits') {
|
||||
/*if (link === '/circuits') {
|
||||
let path = userStore.my.profile.last_circuitpath
|
||||
if (path) {
|
||||
return '/circuit/' + path
|
||||
}
|
||||
return link
|
||||
}
|
||||
}*/
|
||||
return link
|
||||
},
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ export const DefaultUser: IUserFields = {
|
||||
useraccounts: [],
|
||||
calc: { numGoodsAndServices: 0 },
|
||||
resid_province: '',
|
||||
resid_card: '',
|
||||
},
|
||||
cart: {
|
||||
userId: '',
|
||||
@@ -177,6 +178,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
useraccounts: [],
|
||||
calc: { numGoodsAndServices: 0 },
|
||||
resid_province: '',
|
||||
resid_card: '',
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
@@ -363,6 +363,7 @@ export default defineComponent({
|
||||
'profile.mycircuits': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'profile.resid_card': 1,
|
||||
'account._id': 1,
|
||||
'account.saldo': 1,
|
||||
'account.saldo_pend': 1,
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<CSaldo
|
||||
v-if="account"
|
||||
:symbol="circuit.symbol"
|
||||
:account="account"
|
||||
:color="circuit.color"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
>
|
||||
|
||||
<CFinder
|
||||
:ind="tools.getIndMainCardsByTable(toolsext.TABCIRCUITS)"
|
||||
:table="toolsext.TABCIRCUITS"
|
||||
:noButtAdd="!tools.isManager()"
|
||||
:showFilterPersonal="true"
|
||||
|
||||
Reference in New Issue
Block a user