ver 1.0.19

This commit is contained in:
Surya Paolo
2023-11-03 12:49:17 +01:00
parent cb11903707
commit a071d17410
28 changed files with 144 additions and 103 deletions

View File

@@ -20,9 +20,9 @@ import { useI18n } from '@/boot/i18n'
import { useRoute, useRouter } from 'vue-router'
import { useCircuitStore } from '@store/CircuitStore'
const STEP_NAME_SURNAME = 2
const STEP_FOTO = 5
const STEP_CIRCUIT = 3
const STEP_CIRCUIT = 2
const STEP_NAME_SURNAME = 20
const STEP_FOTO = 50
export default defineComponent({
name: 'CMyProfileTutorial',
@@ -55,6 +55,7 @@ export default defineComponent({
const showAccountInfo = ref(false)
const step = ref(1)
const nascondiavviso = ref(false)
const username = ref('')
const showsendCoinTo = ref(false)
@@ -62,7 +63,6 @@ export default defineComponent({
const contact = ref(<IUserFields | null>null)
const filtroutente = ref(<any[]>[])
const stepTut = computed(() => userStore.my.profile.stepTutorial)
@@ -134,7 +134,7 @@ export default defineComponent({
icon: 'house',
required: true,
},
{
/*{
step: STEP_NAME_SURNAME, // 2
title: t('tutorial.step_nomecognome_title'),
extratitle: function () { return ': ' + (contact.value ? tools.getNomeUtenteEUsernameByRecUser(contact.value) : '') },
@@ -143,7 +143,7 @@ export default defineComponent({
checkOkReal: function () { return ((contact.value ? !!contact.value.name : false)) },
icon: 'user',
required: false,
},
},*/
{
step: STEP_CIRCUIT,
title: t('tutorial.step_circuito_title'),
@@ -167,8 +167,8 @@ export default defineComponent({
icon: 'img: images/1ris_rosso_100.png',
required: false,
},
{
step: 4,
/*{
step: 3,
title: t('tutorial.step_beniservizi_title'),
extratitle: function () { return ': (' + userStore.my.profile.calc.numGoodsAndServices + ')' },
label: t('tutorial.step_beniservizi'),
@@ -178,21 +178,21 @@ export default defineComponent({
checkOkReal: function () { return this.checkOk() },
icon: 'fas fa-tshirt',
required: false,
},
{
},*/
/*{
step: STEP_FOTO,
title: t('tutorial.step_foto_title'),
title: t('tutorial.step_profilo_title'),
extratitle: function () { return ': (' + (userStore.my.profile.img ? t('dialog.yes') : t('dialog.no')) + ')' },
label: t('tutorial.step_foto'),
label: t('tutorial.step_profilo'),
checkOk: function () {
return !!userStore.my.profile.img
},
checkOkReal: function () { return this.checkOk() },
icon: 'fas fa-tshirt',
required: false,
},
},*/
{
step: 6,
step: 3,
title: t('tutorial.step_fine_title'),
extratitle: function () { return '' },
label: t('tutorial.step_fine'),
@@ -382,7 +382,7 @@ export default defineComponent({
}
function getColorDone(step: number) {
return arrStep[step - 1].checkOkReal() ? 'positive' : 'negative'
return arrStep[step].checkOkReal() ? 'positive' : 'negative'
}
onMounted(mounted)
@@ -419,6 +419,7 @@ export default defineComponent({
isSalta,
askToConfirmSkip,
getColorDone,
nascondiavviso,
}
},
})

View File

@@ -1,14 +1,20 @@
<template>
<div v-if="contact">
<div class="row items-center">
<div :class="step >= numstep ? 'col-10' : 'col-12'">
<div v-if="progressStep !== 1"
:class="step >= numstep ? 'col-10' : 'col-12'">
<CTitleBanner
class="q-pa-none"
:title="
(!progressStep
? $t('tutorial.title', {step, numstep}) + ` (` + progressLabel + `)`
: $t('tutorial.title_completed', {step, numstep}) + ` (` + progressLabel + `)`)
!progressStep
? $t('tutorial.title', { step, numstep }) +
` (` +
progressLabel +
`)`
: $t('tutorial.title_completed', { step, numstep }) +
` (` +
progressLabel +
`)`
"
:bgcolor="getColorTutorial()"
clcolor="text-white"
@@ -17,7 +23,7 @@
>
<q-slide-transition>
<div v-show="step < numstep">
<div class="q-my-sm">
<!--<div class="q-my-sm">
<q-linear-progress
stripe
size="25px"
@@ -35,11 +41,12 @@
</div>
</q-linear-progress>
</div>
<CMyUserOnlyView
-->
<!--<CMyUserOnlyView
:mycontact="contact"
:visu="costanti.FIND_PEOPLE"
>
</CMyUserOnlyView>
</CMyUserOnlyView>-->
<div class="">
<q-stepper
@@ -57,7 +64,7 @@
:title="recstep.title + recstep.extratitle()"
:icon="recstep.icon"
:done="recstep.checkOk()"
:done-color="getColorDone(recstep.step)"
:done-color="getColorDone(index)"
>
<div v-html="recstep.label"></div>
<br />
@@ -76,7 +83,7 @@
>
</CMySelectCity>
</q-banner>
<div v-else-if="step === 2">
<div v-else-if="step === 101">
<q-banner>
<div class="myrow">
<CMyFieldDb
@@ -100,7 +107,7 @@
</div>
</q-banner>
</div>
<div v-else-if="step === 3" class="">
<div v-else-if="step === 2" class="">
<CMyCircuit
:mycircuit="mycircuit"
:visu="costanti.ENTER_TO_THE_CIRCUIT"
@@ -108,7 +115,8 @@
>
</CMyCircuit>
</div>
<div v-else-if="step === 4" class="">
<div v-else-if="step === 300" class="">
<!--
<div
v-for="(card, ind) of mycards"
:key="ind"
@@ -117,6 +125,7 @@
<q-card class="q-my-md">
<div>
<CSkill
v-if="false"
:table="card.table"
:filtercustom="filtroutente"
:butt_modif_new="true"
@@ -127,20 +136,21 @@
</div>
</q-card>
</div>
-->
</div>
<div v-else-if="step === 5" class="">
<div v-else-if="step === 105" class="">
<div class="myrow">
<CMyFieldDb
<!--<CMyFieldDb
:title="$t('reg.photo')"
table="users"
mykey="profile"
mysubkey="img"
:type="costanti.FieldType.image"
>
</CMyFieldDb>
</CMyFieldDb>-->
</div>
{{ $t('tutorial.step_altri_in_profilo') }}
<q-btn
glossy
label="Modifica Profilo"
@@ -150,7 +160,6 @@
/>
</div>
<div v-else-if="step === 6" class=""></div>
<div
v-if="recstep.checkOkReal() && recstep.label_ok"
class="clBorderService"
@@ -168,16 +177,20 @@
<q-btn
:flat="isSalta()"
:disabled="isNextDisable()"
@click="(step === STEP_CIRCUIT && isSalta()) ? askToConfirmSkip() :
(step === numstep
@click="
step === STEP_CIRCUIT && isSalta()
? askToConfirmSkip()
: step === numstep
? clickFinish()
: $refs.stepper.next())
: $refs.stepper.next()
"
:color="isSalta() ? 'negative' : 'primary'"
:label="
step === numstep
? $t('dialog.finish')
: (isSalta() ? $t('dialog.salta'): $t('dialog.avanti'))
: isSalta()
? $t('dialog.salta')
: $t('dialog.avanti')
"
/>
</q-stepper-navigation>
@@ -189,7 +202,7 @@
</CTitleBanner>
</div>
<q-btn
v-if="step >= numstep"
v-if="(step >= numstep) && progressStep !== 1"
:class="`col-2 ` + getColorTutorial()"
icon="fas fa-arrow-right"
color="text-white"
@@ -199,6 +212,17 @@
@click="step = 1"
>
</q-btn>
<q-banner
inline-actions
class="bg-red text-white"
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" />
</template>
</q-banner>
</div>
</div>
<q-dialog v-model="showAccountInfo" full-height full-width>