- aggiunto il Comune di Residenza alla REgistrazione e al Tutorial
This commit is contained in:
@@ -233,14 +233,14 @@ $mobile-footer-height: 80px;
|
||||
}
|
||||
|
||||
.step-line {
|
||||
width: 60px;
|
||||
width: 50px;
|
||||
height: 3px;
|
||||
background: linear-gradient(to right, #e0e0e0, #bdbdbd);
|
||||
margin: 0 4px;
|
||||
transition: all $transition-speed ease;
|
||||
|
||||
@media (max-width: $mobile-breakpoint) {
|
||||
width: 40px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.completed + & {
|
||||
@@ -288,8 +288,8 @@ $mobile-footer-height: 80px;
|
||||
animation: fadeIn 0.4s ease;
|
||||
|
||||
@media (max-width: $mobile-breakpoint) {
|
||||
padding: 0px 16px 16px;
|
||||
gap: 12px;
|
||||
padding: 0px 8px 8px;
|
||||
gap: 2px;
|
||||
min-height: calc(100vh - 280px);
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ $mobile-footer-height: 80px;
|
||||
border-bottom: 2px solid rgba(0, 0, 0, 0.05);
|
||||
|
||||
@media (max-width: $mobile-breakpoint) {
|
||||
padding-bottom: 12px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.q-icon {
|
||||
|
||||
@@ -21,6 +21,8 @@ import {
|
||||
watch,
|
||||
} from 'vue';
|
||||
import { CSignIn } from '@src/components/CSignIn';
|
||||
import { CMyFieldDb } from '@src/components/CMyFieldDb';
|
||||
import { CMyFieldRec } from '@src/components/CMyFieldRec';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { DefaultProfile, useUserStore } from '@store/UserStore';
|
||||
@@ -28,6 +30,7 @@ import useValidate from '@vuelidate/core';
|
||||
import useVuelidate from '@vuelidate/core';
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs';
|
||||
import { costanti } from '@costanti';
|
||||
|
||||
import { minLength, required, sameAs } from '@vuelidate/validators';
|
||||
|
||||
@@ -49,7 +52,15 @@ import { useInvitaAmicoStore } from 'app/src/stores/useInvitaAmicoStore';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CSignUp',
|
||||
components: { Logo, CTitleBanner, PagePolicy, CCopyBtn, CRegistration },
|
||||
components: {
|
||||
Logo,
|
||||
CTitleBanner,
|
||||
PagePolicy,
|
||||
CCopyBtn,
|
||||
CRegistration,
|
||||
CMyFieldDb,
|
||||
CMyFieldRec,
|
||||
},
|
||||
props: {
|
||||
showadultcheck: {
|
||||
type: Boolean,
|
||||
@@ -131,9 +142,12 @@ export default defineComponent({
|
||||
const inputSurname = ref(<any>null);
|
||||
const inputPassword = ref(<any>null);
|
||||
const inputPassword2 = ref(<any>null);
|
||||
const inputComune = ref(<any>null);
|
||||
const noinvito = ref(false);
|
||||
const numStepTotali = ref('5');
|
||||
const reccomune = ref(<any>{profile: {resid_str_comune: '', resid_comune: ''}});
|
||||
|
||||
const submitBtn = ref(<any>null); // AGGIUNGI QUESTA RIGA
|
||||
const submitBtn = ref(<any>null); // AGGIUNGI QUESTA RIGA
|
||||
|
||||
// Responsive detection
|
||||
const isMobile = ref(false);
|
||||
@@ -171,6 +185,8 @@ export default defineComponent({
|
||||
(inputPassword.value && inputPassword.value.hasError) ||
|
||||
!inputPassword2.value ||
|
||||
(inputPassword2.value && inputPassword2.value.hasError);
|
||||
} else if (slide.value === '4') {
|
||||
ret = !signup.profile.resid_str_comune || !signup.profile.resid_comune;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -200,9 +216,13 @@ export default defineComponent({
|
||||
inputPassword.value.focus();
|
||||
}
|
||||
} else if (newSlide === '4') {
|
||||
if (inputComune.value) {
|
||||
inputComune.value.focus();
|
||||
}
|
||||
} else if (newSlide === '5') {
|
||||
if (submitBtn.value) {
|
||||
submitBtn.value.$el.focus();
|
||||
}
|
||||
submitBtn.value.$el.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -243,6 +263,7 @@ export default defineComponent({
|
||||
complexityUser,
|
||||
registereduser,
|
||||
},
|
||||
comune: {},
|
||||
name: {
|
||||
required:
|
||||
props.collettivo ||
|
||||
@@ -501,6 +522,20 @@ export default defineComponent({
|
||||
onMounted(async () => {
|
||||
const token = props.token;
|
||||
|
||||
let dev = tools.isDevelop();
|
||||
|
||||
// dev = false;
|
||||
|
||||
if (dev) {
|
||||
signup.email = 'test123@prova.com';
|
||||
signup.username = 'test123';
|
||||
signup.name = 'Nome';
|
||||
signup.surname = 'Cognome';
|
||||
signup.password = 'A12345678';
|
||||
signup.repeatPassword = 'A12345678';
|
||||
signup.aportador_solidario = 'surya1977';
|
||||
}
|
||||
|
||||
// Check mobile on mount
|
||||
checkMobile();
|
||||
window.addEventListener('resize', checkMobile);
|
||||
@@ -518,6 +553,19 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
|
||||
function updateComune(row: any, col: any, newval: any, valinit: any, valtosee: any) {
|
||||
// console.log('updateComune', reccomune.value.profile.resid_comune)
|
||||
if (!!row.profile.recCity) {
|
||||
signup.profile.resid_comune = row.profile.recCity._id
|
||||
signup.profile.resid_str_comune = row.profile.recCity.comune_solo
|
||||
signup.profile.resid_province = row.profile.recCity.prov
|
||||
} else {
|
||||
signup.profile.resid_comune = ''
|
||||
signup.profile.resid_str_comune = ''
|
||||
signup.profile.resid_province = ''
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('resize', checkMobile);
|
||||
});
|
||||
@@ -557,10 +605,15 @@ export default defineComponent({
|
||||
inputSurname,
|
||||
inputPassword,
|
||||
inputPassword2,
|
||||
inputComune,
|
||||
shared_consts,
|
||||
isMobile,
|
||||
submitBtn,
|
||||
noinvito,
|
||||
costanti,
|
||||
updateComune,
|
||||
numStepTotali,
|
||||
reccomune,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<!-- Progress Stepper -->
|
||||
<div class="progress-stepper">
|
||||
<div
|
||||
v-for="step in 4"
|
||||
v-for="step in parseInt(numStepTotali)"
|
||||
:key="step"
|
||||
class="step-item"
|
||||
:class="{
|
||||
@@ -139,7 +139,7 @@
|
||||
<span v-else>{{ step }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="step < 4"
|
||||
v-if="step < parseInt(numStepTotali)"
|
||||
class="step-line"
|
||||
></div>
|
||||
</div>
|
||||
@@ -481,10 +481,66 @@
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
|
||||
<!-- Slide 4: Conferma e Policy -->
|
||||
<!-- Slide 4: Comune -->
|
||||
<q-carousel-slide
|
||||
name="4"
|
||||
class="carousel-slide"
|
||||
>
|
||||
<div class="slide-content">
|
||||
<div class="slide-header">
|
||||
<q-icon
|
||||
name="lock_outline"
|
||||
size="40px"
|
||||
color="primary"
|
||||
/>
|
||||
<h2 class="slide-title">Comune di Residenza</h2>
|
||||
<p class="slide-subtitle">
|
||||
Seleziona il tuo comune di residenza, o dove vivi abitualmente, per
|
||||
connetterti con la Community Locale.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="form-fields">
|
||||
<!--<CMyFieldRec
|
||||
:nosaveToDb="true"
|
||||
table="users"
|
||||
tablesel="cities"
|
||||
jointable="cities"
|
||||
:pickup="true"
|
||||
:type="costanti.FieldType.select_by_server"
|
||||
:rec="signup"
|
||||
field="profile.resid_comune"
|
||||
mysubkey_tosee="resid_str_comune"
|
||||
fieldsel_tosee="comune"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
@savedInDb="updateComune"
|
||||
></CMyFieldRec>-->
|
||||
|
||||
<CMyFieldDb
|
||||
:nosaveToDb="true"
|
||||
table="users"
|
||||
tablesel="cities"
|
||||
mykey="profile"
|
||||
mysubkey="recCity"
|
||||
label_trans="reg.resid_str_comune"
|
||||
:useinput="false"
|
||||
jointable="cities"
|
||||
:pickup="true"
|
||||
myclass="class_select"
|
||||
:isInModif="true"
|
||||
:type="costanti.FieldType.select_by_server"
|
||||
:rec="reccomune"
|
||||
@showandsave="updateComune"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
|
||||
<!-- Slide numStepTotali: Conferma e Policy -->
|
||||
<q-carousel-slide
|
||||
:name="numStepTotali"
|
||||
class="carousel-slide"
|
||||
>
|
||||
<div class="slide-content final-slide">
|
||||
<div class="slide-header">
|
||||
@@ -527,6 +583,16 @@
|
||||
/>
|
||||
<span>{{ signup.name }} {{ signup.surname }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="signup.profile.resid_str_comune"
|
||||
class="summary-item"
|
||||
>
|
||||
<q-icon
|
||||
name="home"
|
||||
color="primary"
|
||||
/>
|
||||
<span>{{ signup.profile.resid_str_comune }} ({{ signup.profile.resid_province }})</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="policy-section">
|
||||
@@ -571,7 +637,7 @@
|
||||
class="nav-btn back-btn"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="slide !== '4'"
|
||||
v-if="slide !== numStepTotali"
|
||||
unelevated
|
||||
color="primary"
|
||||
icon-right="arrow_forward"
|
||||
@@ -581,7 +647,7 @@
|
||||
class="nav-btn next-btn"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="slide === '4'"
|
||||
v-if="slide === numStepTotali"
|
||||
ref="submitBtn"
|
||||
unelevated
|
||||
color="positive"
|
||||
@@ -608,6 +674,7 @@
|
||||
{ label: '2', value: '2' },
|
||||
{ label: '3', value: '3' },
|
||||
{ label: '4', value: '4' },
|
||||
{ label: '5', value: '5' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
@@ -689,16 +756,18 @@
|
||||
color="primary"
|
||||
/>
|
||||
<div>
|
||||
<p class="text-weight-medium q-mb-sm">Per accedere a RISO hai bisogno di un invito</p>
|
||||
<p class="text-body2">
|
||||
L'invito può essere di due tipi:
|
||||
<p class="text-weight-medium q-mb-sm">
|
||||
Per accedere a RISO hai bisogno di un invito
|
||||
</p>
|
||||
<p class="text-body2">L'invito può essere di due tipi:</p>
|
||||
<ul class="invitation-types">
|
||||
<li>
|
||||
<strong>Username dell'invitante:</strong> inserisci lo username di chi ti ha parlato di RISO
|
||||
<strong>Username dell'invitante:</strong> inserisci lo username di chi
|
||||
ti ha parlato di RISO
|
||||
</li>
|
||||
<li>
|
||||
<strong>Link di registrazione:</strong> usa il link personale che ti è stato inviato via email o messaggio
|
||||
<strong>Link di registrazione:</strong> usa il link personale che ti è
|
||||
stato inviato via email o messaggio
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -714,8 +783,9 @@
|
||||
<div>
|
||||
<p class="text-weight-medium q-mb-sm">Non conosci nessuno di RISO?</p>
|
||||
<p class="text-body2">
|
||||
Nessun problema! Puoi unirti alla comunità attraverso i nostri gruppi territoriali su Telegram
|
||||
oppure contattarci direttamente via email. Saremo felici di darti il benvenuto! 🌱
|
||||
Nessun problema! Puoi unirti alla comunità attraverso i nostri gruppi
|
||||
territoriali su Telegram oppure contattarci direttamente via email. Saremo
|
||||
felici di darti il benvenuto! 🌱
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -728,7 +798,11 @@
|
||||
color="primary"
|
||||
icon="telegram"
|
||||
label="Gruppi Telegram Territoriali"
|
||||
:href="tools.getLinkGruppiTerritorialiTelegram() ? tools.getLinkGruppiTerritorialiTelegram() : ''"
|
||||
:href="
|
||||
tools.getLinkGruppiTerritorialiTelegram()
|
||||
? tools.getLinkGruppiTerritorialiTelegram()
|
||||
: ''
|
||||
"
|
||||
target="_blank"
|
||||
class="action-btn full-width q-mb-sm"
|
||||
no-caps
|
||||
|
||||
Reference in New Issue
Block a user