- Il circuito viene creato in automatico, quando scegli una provincia.

This commit is contained in:
Surya Paolo
2023-03-21 18:12:06 +01:00
parent de937c73f7
commit 59af1d0b8b
19 changed files with 76 additions and 112 deletions

View File

@@ -22,6 +22,7 @@ import { useCircuitStore } from '@store/CircuitStore'
const STEP_NAME_SURNAME = 2
const STEP_FOTO = 5
const STEP_CIRCUIT = 3
export default defineComponent({
name: 'CMyProfileTutorial',
@@ -94,6 +95,10 @@ export default defineComponent({
tools.scrollToTop()
}
if ((step.value === STEP_CIRCUIT - 1) || (step.value === STEP_CIRCUIT )) {
mycircuit.value = circuitStore.getCircuitByProvince(strProv.value)
}
if (step.value === STEP_NAME_SURNAME + 1) {
let index = step.value
console.log('Salva ', arrStep[index])
@@ -135,7 +140,7 @@ export default defineComponent({
icon: 'user'
},
{
step: 3,
step: STEP_CIRCUIT,
title: t('tutorial.step_circuito_title'),
extratitle: function () { return mycircuit.value ? ': ' + mycircuit.value.name : '' },
label: t('tutorial.step_circuito'),
@@ -160,7 +165,7 @@ export default defineComponent({
icon: 'fas fa-tshirt',
},
{
step: 5,
step: STEP_FOTO,
title: t('tutorial.step_foto_title'),
extratitle: function () { return ': (' + (userStore.my.profile.img ? t('dialog.yes') : t('dialog.no')) + ')' },
label: t('tutorial.step_foto'),
@@ -351,6 +356,7 @@ export default defineComponent({
completed,
getColorTutorial,
getFirstStepToFill,
STEP_CIRCUIT,
}
},
})

View File

@@ -5,9 +5,10 @@
<CTitleBanner
class="q-pa-none"
:title="
!progressStep
? $t('tutorial.title') + ` (` + progressLabel + `)`
: $t('tutorial.title_completed') + ` (` + progressLabel + `)`
(!progressStep
? $t('tutorial.title', {step, numstep}) + ` (` + progressLabel + `)`
: $t('tutorial.title_completed', {step, numstep}) + ` (` + progressLabel + `)`)
"
:bgcolor="getColorTutorial()"
clcolor="text-white"
@@ -168,11 +169,11 @@
? clickFinish()
: $refs.stepper.next()
"
color="primary"
:color="(step === STEP_CIRCUIT && mycircuit && ((!userStore.IsMyCircuitByName(mycircuit.name) && !userStore.IsAskedCircuitByName(mycircuit.name)))) ? 'negative' : 'primary'"
:label="
step === numstep
? $t('dialog.finish')
: $t('dialog.avanti')
: (step === STEP_CIRCUIT && mycircuit && ((!userStore.IsMyCircuitByName(mycircuit.name) && !userStore.IsAskedCircuitByName(mycircuit.name))) ? $t('dialog.salta'): $t('dialog.avanti'))
"
/>
</q-stepper-navigation>