- fix scelta provincia (il bottone Avanti non veniva disabilitato).

- Se non scelgo la provincia, non deve farmi vedere la App...
This commit is contained in:
Surya Paolo
2024-03-28 20:26:21 +01:00
parent 6856c4cc8e
commit aa29a7fa46
80 changed files with 10777451 additions and 178 deletions

View File

@@ -133,7 +133,7 @@ export default defineComponent({
title: t('tutorial.step_residence_title'),
extratitle: function () { return ': ' + contact.value!.profile.resid_province },
label: t('tutorial.step_residence'),
checkOk: function (): boolean { return contact.value ? !!contact.value.profile.resid_province : false },
checkOk: function (): boolean { return contact.value ? contact.value.profile.resid_province !== '' : false },
checkOkReal: function (): boolean { return this.checkOk() },
icon: 'house',
required: true,
@@ -407,9 +407,20 @@ export default defineComponent({
}
function isNextDisable() {
function getindstepByStep(step: number) {
for (let indstep = 0; indstep < arrStep.value.length; indstep++) {
if (arrStep.value[indstep].step === step)
return indstep
}
return -1
}
function isNextDisable(step: number) {
try {
return arrStep.value[indstep.value - 1].required && !arrStep.value[indstep.value - 1].checkOk()
const indstep = getindstepByStep(step)
if (indstep >= 0)
return arrStep.value[indstep].required && !arrStep.value[indstep].checkOk()
return false
} catch (e) {
return false
}

View File

@@ -224,7 +224,7 @@
/>
<q-btn
:flat="isSalta(recstep.step)"
:disabled="isNextDisable()"
:disabled="isNextDisable(recstep.step)"
@click="
isSalta(recstep.step)
? askToConfirmSkip(recstep.step)
@@ -289,6 +289,7 @@
class="bg-red text-white"
v-if="
userStore.my.profile.calc.numGoodsAndServices <= 0 && !nascondiavviso
&& tools.visualizzaHomeApp()
"
>
<span v-html="$t('tutorial.step_beniservizi')"></span>