Fix Registration
This commit is contained in:
@@ -78,13 +78,20 @@ export default {
|
||||
|
||||
let displayMode = 'browser';
|
||||
const mqStandAlone = '(display-mode: standalone)';
|
||||
if (navigator)
|
||||
console.log('navigator')
|
||||
// @ts-ignore
|
||||
if (navigator && navigator.standalone)
|
||||
console.log('navigator.standalone')
|
||||
// @ts-ignore
|
||||
if (((navigator && (navigator.standalone))) ||
|
||||
(window.matchMedia(mqStandAlone).matches)) {
|
||||
(window.matchMedia(mqStandAlone).matches)) {
|
||||
console.log('navigator.standalone')
|
||||
displayMode = 'standalone'
|
||||
}
|
||||
|
||||
globalStore.isAppRunning = displayMode === 'standalone';
|
||||
console.log('isapp running = ', globalStore.isAppRunning)
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
|
||||
@@ -1401,6 +1401,7 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<CMySingleEvent
|
||||
v-if="mysingleevent"
|
||||
:myevent="mysingleevent"
|
||||
calendarView="month"
|
||||
:iseditable="editable"
|
||||
|
||||
@@ -30,6 +30,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
noButtAdd: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<CTitlePage :ind="ind" :table="table">
|
||||
<CTitlePage :ind="ind" :table="table" :showBarSelection="showBarSelection">
|
||||
<div class="bi-border-all">
|
||||
<div class="q-ma-xs q-gutter-xs">
|
||||
<div v-if="showFilterPersonal" class="text-center">
|
||||
|
||||
@@ -31,6 +31,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
circuit: {
|
||||
type: Object as PropType<ICircuit | null>,
|
||||
required: false,
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
/>
|
||||
</div>
|
||||
<div v-if="finder" class="">
|
||||
<div v-if="modelValue === costanti.FIND_CIRCUIT || listcircuitsfiltered.length === 0">
|
||||
<div
|
||||
v-if="
|
||||
modelValue === costanti.FIND_CIRCUIT ||
|
||||
listcircuitsfiltered.length === 0
|
||||
"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -26,24 +31,24 @@
|
||||
|
||||
<q-btn label="test" @click="userStore.my.profile.mycircuits = [...userStore.my.profile.mycircuits, {circuitname: 'prova'}]; circuitStore.listcircuits = [...circuitStore.listcircuits, {name: 'prova', path: 'prova'}]"></q-btn>
|
||||
-->
|
||||
<q-list>
|
||||
<span v-for="(circuit, index) in listcircuitsfiltered" :key="index" class="q-my-sm" clickable>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="modelValue">
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit :mycircuit="circuit" :visu="modelValue"> </CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list class="width-container">
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyCircuit
|
||||
:mycircuit="mycircuit"
|
||||
:visu="visu">
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyCircuit :mycircuit="mycircuit" :visu="visu"> </CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.REGISTRATION">
|
||||
<div v-if="editOn" class="elemEdit">Registrazione</div>
|
||||
|
||||
<div v-if="isAppRunning || $q.screen.gt.xs">
|
||||
<div v-if="true">
|
||||
<CRegistration />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,11 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
mygrp: {
|
||||
type: Object as PropType<IMyGroup | null>,
|
||||
required: false,
|
||||
|
||||
@@ -20,24 +20,23 @@
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list>
|
||||
<span v-for="(grp, index) in listgroupsfiltered" :key="index" class="q-my-sm" clickable>
|
||||
<CMyGroup
|
||||
:mygrp="grp"
|
||||
:visu="modelValue">
|
||||
</CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(grp, index) in listgroupsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyGroup :mygrp="grp" :visu="modelValue"> </CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list class="width-container">
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyGroup
|
||||
:mygrp="mygrp"
|
||||
:visu="visu">
|
||||
</CMyGroup>
|
||||
</span>
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyGroup :mygrp="mygrp" :visu="visu"> </CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<q-item-label lines="4" v-if="myrec.descr">{{ myrec.descr }}<br>
|
||||
</q-item-label>
|
||||
<q-item-label lines="2" style="text-align: right" class="text_user_city">
|
||||
<span class="text-weight-bold">{{ getNameToShow(myrec) }}</span> -
|
||||
<span class="text-weight-bold">{{ tools.getNameToShow(myrec) }}</span> -
|
||||
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }} ({{ rec.prov }})</span>
|
||||
</q-item-label>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<q-icon name="fas fa-lock"></q-icon></span>
|
||||
<span v-if="myrec.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="q-mr-xs">
|
||||
<q-icon name="fas fa-eye-slash"></q-icon></span>
|
||||
<span class="text-weight-bold">{{ getNameToShow(myrec) }}</span> -
|
||||
<span class="text-weight-bold">{{ tools.getNameToShow(myrec) }}</span> -
|
||||
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
|
||||
</q-item-label>
|
||||
|
||||
|
||||
@@ -141,10 +141,6 @@
|
||||
|
||||
<div>
|
||||
<div v-if="!tools.isLogged()" style="margin: 5px; padding: 5px;" class="home">
|
||||
<q-btn
|
||||
v-if="site.confpages.enableReg && site.confpages.enableRegByBot"
|
||||
type="a" rounded size="lg" color="primary" href="/bot" :label="$t('reg.submit')" class="buttreg">
|
||||
</q-btn>
|
||||
<q-btn
|
||||
rounded size="lg" color="primary" @click="PagLogin"
|
||||
class="btn-start">
|
||||
|
||||
@@ -23,6 +23,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
signupform: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
@@ -59,7 +64,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function regEventEmail() {
|
||||
emit('regEventEmail', props.invited)
|
||||
if (props.signupform) {
|
||||
emit('regEventEmail', props.invited)
|
||||
} else {
|
||||
$router.push('/signup')
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
:class="`text-white bg-primary shadow-1 rounded-borders`"
|
||||
>
|
||||
<q-carousel-slide name="start" class="column no-wrap flex-center">
|
||||
<q-icon name="fas fa-user" size="56px" />
|
||||
<q-icon name="fas fa-user-plus" size="56px" />
|
||||
<div class="q-mt-md text-center">
|
||||
<span class="text-h6 text-white"> {{ $t('reg.invitante') }}</span>
|
||||
<q-card class="dialog_card q-mb-lg">
|
||||
@@ -91,8 +91,8 @@
|
||||
gruppo.<br />
|
||||
</div>
|
||||
<div v-else-if="chooseReg">
|
||||
<div class="text-center">
|
||||
<q-icon name="fas fa-user" size="23px" />
|
||||
<div class="row justify-center items-center">
|
||||
<q-icon name="fas fa-user-plus" size="27px" class="q-mx-md" />
|
||||
<span class="text-h6 text-white"> {{ $t('reg.page_title') }}</span>
|
||||
<q-card class="q-mt-sm dialog_card q-mb-sm">
|
||||
<q-card-section>
|
||||
@@ -108,19 +108,18 @@
|
||||
` text-h7`
|
||||
"
|
||||
>Chiedi alla persona che ti ha invitato su RISO il suo
|
||||
Username e poi :</span
|
||||
<strong>Username</strong></span
|
||||
>
|
||||
<div class="row items-center">
|
||||
<div class="col-12">
|
||||
<q-btn
|
||||
rounded
|
||||
:type="invited ? 'a' : 'button'"
|
||||
type="a"
|
||||
class="flex-item-btn"
|
||||
icon="fab fa-telegram"
|
||||
size="md"
|
||||
color="primary"
|
||||
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : ``"
|
||||
to="/bot"
|
||||
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : `/bot`"
|
||||
:label="$t('reg.bytelegram')"
|
||||
>
|
||||
<q-badge color="red" align="bottom" floating
|
||||
|
||||
@@ -36,3 +36,11 @@
|
||||
color: red;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.cosa_chiedere{
|
||||
font-weight: bold;
|
||||
color: blue;
|
||||
font-size: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,27 @@ export default defineComponent({
|
||||
const visubuttBOT = ref(false)
|
||||
const isalreadyReg = ref(false)
|
||||
const needTelegram = ref(false)
|
||||
const slide = ref('1')
|
||||
const inputEmail = ref(<any>null)
|
||||
const inputUsername = ref(<any>null)
|
||||
const inputPassword = ref(<any>null)
|
||||
const inputPassword2 = ref(<any>null)
|
||||
|
||||
const checkifDisabled = computed(() => {
|
||||
let ret = true
|
||||
if (slide.value === '1') {
|
||||
// Invitante + Email
|
||||
ret = !signup.email || !v$.value.aportador_solidario || v$.value.aportador_solidario.$invalid || (inputEmail.value && inputEmail.value.hasError)
|
||||
} else if (slide.value === '2') {
|
||||
// Username
|
||||
ret = !signup.username || (inputUsername.value && inputUsername.value.hasError)
|
||||
} else if (slide.value === '3') {
|
||||
// Password
|
||||
ret = !signup.password || (!inputPassword.value && inputPassword.value.hasError) || (!inputPassword2.value && inputPassword2.value.hasError)
|
||||
}
|
||||
|
||||
return ret
|
||||
})
|
||||
|
||||
const typePassword = ref('password')
|
||||
|
||||
@@ -253,9 +274,6 @@ export default defineComponent({
|
||||
countryname.value = name
|
||||
}
|
||||
|
||||
function inputUsername(value: string) {
|
||||
signup.username = value.trim()
|
||||
}
|
||||
|
||||
async function created() {
|
||||
|
||||
@@ -308,11 +326,16 @@ export default defineComponent({
|
||||
// --> content is NOT valid, no error message
|
||||
// resolve(error_message)
|
||||
// --> content is NOT valid, we have error message
|
||||
tools.registeredemail(val).then((ris) => {
|
||||
let risp = !!ris || t('reg.err.duplicate_email')
|
||||
if (ris) {
|
||||
tools.registeredemail(val).then((emailOk) => {
|
||||
let risp = !!emailOk || t('reg.err.duplicate_email')
|
||||
if (emailOk) {
|
||||
risp = tools.isEmail(val) || t('reg.err.invalid_email')
|
||||
emailOk = emailOk && tools.isEmail(val)
|
||||
}
|
||||
if (emailOk) {
|
||||
risp = !tools.isEmailNoMicroZozz(val) || t('reg.err.invalid_email_micro')
|
||||
}
|
||||
|
||||
resolve(risp)
|
||||
|
||||
})
|
||||
@@ -330,7 +353,8 @@ export default defineComponent({
|
||||
typePassword.value = typePassword.value === 'password' ? 'text' : 'password'
|
||||
}
|
||||
|
||||
function regEventEmail() {
|
||||
function regEventEmail(invited: boolean) {
|
||||
console.log('EVENT RECEIVED: regEventEmail', invited)
|
||||
// reg
|
||||
visubuttBOT.value = false
|
||||
needTelegram.value = false
|
||||
@@ -343,7 +367,6 @@ export default defineComponent({
|
||||
changeemail,
|
||||
changeusername,
|
||||
submitOk,
|
||||
inputUsername,
|
||||
selectcountry,
|
||||
intcode_change,
|
||||
tools,
|
||||
@@ -364,6 +387,12 @@ export default defineComponent({
|
||||
ap_iniziale,
|
||||
regEventEmail,
|
||||
needTelegram,
|
||||
slide,
|
||||
checkifDisabled,
|
||||
inputEmail,
|
||||
inputUsername,
|
||||
inputPassword,
|
||||
inputPassword2,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -44,36 +44,14 @@
|
||||
</div>
|
||||
|
||||
<div v-if="visubuttBOT && needTelegram" class="q-gutter-md">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-green-5 text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="q-ma-md">
|
||||
<CRegistration
|
||||
:invited="signup.aportador_solidario"
|
||||
:regexpire="regexpire"
|
||||
@regEventEmail="regEventEmail"
|
||||
/>
|
||||
|
||||
<!--<q-btn
|
||||
rounded
|
||||
color="primary"
|
||||
icon="fab fa-telegram"
|
||||
:label="
|
||||
$t('components.authentication.telegram.regbot', {
|
||||
botname: tools.getBotName(),
|
||||
})
|
||||
"
|
||||
type="a"
|
||||
:href="
|
||||
tools.getLinkBotTelegram(signup.aportador_solidario, regexpire)
|
||||
"
|
||||
target="_blank"
|
||||
></q-btn>-->
|
||||
<br />
|
||||
</div>
|
||||
</q-banner>
|
||||
<div class="q-ma-md">
|
||||
<CRegistration
|
||||
:invited="signup.aportador_solidario"
|
||||
:regexpire="regexpire"
|
||||
@regEventEmail="regEventEmail"
|
||||
:signupform="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="!isalreadyReg" class="q-gutter-sm q-mt-sm">
|
||||
@@ -94,202 +72,235 @@
|
||||
<br /><br />
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-input
|
||||
v-if="
|
||||
showaportador &&
|
||||
signup.aportador_solidario !== tools.APORTADOR_NONE
|
||||
"
|
||||
bg-color="lightblue"
|
||||
:readonly="!!ap_iniziale"
|
||||
v-model="signup.aportador_solidario"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.aportador_solidario.$touch"
|
||||
:error="v$.aportador_solidario.$error"
|
||||
:error-message="
|
||||
tools.errorMsg('aportador_solidario', v$.aportador_solidario)
|
||||
"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
:label="$t('reg.aportador_solidario')"
|
||||
<q-carousel
|
||||
v-model="slide"
|
||||
ref="carousel"
|
||||
transition-prev="slide-right"
|
||||
transition-next="slide-left"
|
||||
animated
|
||||
swipeable
|
||||
:class="`shadow-1`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!--<q-input
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@blur="v$.email.$touch"
|
||||
@update:model-value="changeemail()"
|
||||
:error="v$.email.$invalid"
|
||||
:error-message="tools.errorMsg( 'email', v$.email)"
|
||||
maxlength="50"
|
||||
debounce="2000"
|
||||
:label="$t('reg.email')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email"/>
|
||||
</template>
|
||||
|
||||
</q-input> -->
|
||||
|
||||
<q-input
|
||||
v-model="signup.email"
|
||||
rounded
|
||||
outlined
|
||||
@update:model-value="changeemail()"
|
||||
maxlength="50"
|
||||
debounce="3000"
|
||||
:rules="[myRuleEmail]"
|
||||
lazy-rules
|
||||
:label="$t('reg.email_reg')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.username"
|
||||
:readonly="
|
||||
tools.getAskToVerifyReg() && !site.confpages.enableRegMultiChoice
|
||||
"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.username.$touch"
|
||||
@update:model-value="changeusername"
|
||||
:error="v$.username.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
:error-message="
|
||||
tools.errorMsg('username', v$.username) ||
|
||||
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
||||
"
|
||||
:label="$t('reg.username_reg')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<div v-if="show_namesurname">
|
||||
<q-input
|
||||
v-model="signup.name"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.name.$touch"
|
||||
:error="v$.name.$error"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:error-message="tools.errorMsg('name', v$.name)"
|
||||
:label="$t('reg.name_opt')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.surname"
|
||||
rounded
|
||||
outlined
|
||||
:error="v$.surname.$error"
|
||||
@blur="v$.surname.$touch"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:error-message="tools.errorMsg('surname', v$.surname)"
|
||||
:label="$t('reg.surname_opt')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<q-input
|
||||
v-model="signup.password"
|
||||
:type="typePassword"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.password.$touch"
|
||||
:error="v$.password.$error"
|
||||
:error-message="`${tools.errorMsg('password', v$.password)}`"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:label="$t('reg.password_reg')"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-btn
|
||||
tabindex="-1"
|
||||
:icon="
|
||||
typePassword === `password`
|
||||
? `fas fa-eye-slash`
|
||||
: `fas fa-eye`
|
||||
"
|
||||
@click="showPassword"
|
||||
<template v-slot:control>
|
||||
<q-carousel-control
|
||||
position="bottom-right"
|
||||
:offset="[18, 18]"
|
||||
class="q-gutter-xs"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="slide !== '1'"
|
||||
push
|
||||
text-color="black"
|
||||
icon="arrow_left"
|
||||
label="Indietro"
|
||||
@click="$refs.carousel.previous()"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="slide !== '4'"
|
||||
push
|
||||
color="primary"
|
||||
icon="arrow_right"
|
||||
label="Avanti"
|
||||
:disabled="checkifDisabled"
|
||||
@click="$refs.carousel.next()"
|
||||
/>
|
||||
</q-carousel-control>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-carousel-slide name="1">
|
||||
<div class="">
|
||||
<q-input
|
||||
v-if="
|
||||
showaportador &&
|
||||
signup.aportador_solidario !== tools.APORTADOR_NONE
|
||||
"
|
||||
bg-color="lightblue"
|
||||
:readonly="!!ap_iniziale"
|
||||
v-model="signup.aportador_solidario"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.aportador_solidario.$touch"
|
||||
:error="v$.aportador_solidario.$error"
|
||||
:error-message="
|
||||
tools.errorMsg(
|
||||
'aportador_solidario',
|
||||
v$.aportador_solidario
|
||||
)
|
||||
"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
:label="$t('reg.aportador_solidario')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
<div style="margin-top:5px;"></div>
|
||||
|
||||
<q-input
|
||||
v-model="signup.repeatPassword"
|
||||
:type="typePassword"
|
||||
maxlength="30"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.repeatPassword.$touch"
|
||||
:error="v$.repeatPassword.$error"
|
||||
:error-message="`${tools.errorMsg(
|
||||
'repeatpassword',
|
||||
v$.repeatPassword
|
||||
)}`"
|
||||
:label="$t('reg.repeatPassword')"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-btn
|
||||
tabindex="-1"
|
||||
:icon="
|
||||
typePassword === `password`
|
||||
? `fas fa-eye-slash`
|
||||
: `fas fa-eye`
|
||||
<q-input
|
||||
ref="inputEmail"
|
||||
v-model="signup.email"
|
||||
rounded
|
||||
outlined
|
||||
@update:model-value="changeemail()"
|
||||
maxlength="50"
|
||||
debounce="2000"
|
||||
:rules="[myRuleEmail]"
|
||||
:label="$t('reg.email_reg')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="2">
|
||||
<div class="cosa_chiedere">{{ $t('reg.scegli_username') }}</div>
|
||||
<q-input
|
||||
ref="inputUsername"
|
||||
v-model="signup.username"
|
||||
:readonly="
|
||||
tools.getAskToVerifyReg() &&
|
||||
!site.confpages.enableRegMultiChoice
|
||||
"
|
||||
@click="showPassword"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.username.$touch"
|
||||
@update:model-value="changeusername"
|
||||
:error="v$.username.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="500"
|
||||
:error-message="
|
||||
tools.errorMsg('username', v$.username) ||
|
||||
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
||||
"
|
||||
:label="$t('reg.username_reg')"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key" />
|
||||
</template>
|
||||
</q-input>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-if="shownationality"
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded
|
||||
outlined
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<vue-country-code
|
||||
<div v-if="show_namesurname">
|
||||
<q-input
|
||||
v-model="signup.name"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.name.$touch"
|
||||
:error="v$.name.$error"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:error-message="tools.errorMsg('name', v$.name)"
|
||||
:label="$t('reg.name_opt')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.surname"
|
||||
rounded
|
||||
outlined
|
||||
:error="v$.surname.$error"
|
||||
@blur="v$.surname.$touch"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:error-message="tools.errorMsg('surname', v$.surname)"
|
||||
:label="$t('reg.surname_opt')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="3">
|
||||
<div class="cosa_chiedere">{{ $t('reg.scegli_password') }}</div>
|
||||
<q-input
|
||||
ref="inputPassword"
|
||||
v-model="signup.password"
|
||||
:type="typePassword"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.password.$touch"
|
||||
:error="v$.password.$error"
|
||||
:error-message="`${tools.errorMsg('password', v$.password)}`"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:label="$t('reg.password_reg')"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-btn
|
||||
tabindex="-1"
|
||||
:icon="
|
||||
typePassword === `password`
|
||||
? `fas fa-eye-slash`
|
||||
: `fas fa-eye`
|
||||
"
|
||||
@click="showPassword"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
ref="inputPassword2"
|
||||
v-model="signup.repeatPassword"
|
||||
:type="typePassword"
|
||||
maxlength="30"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.repeatPassword.$touch"
|
||||
:error="v$.repeatPassword.$error"
|
||||
:error-message="`${tools.errorMsg(
|
||||
'repeatpassword',
|
||||
v$.repeatPassword
|
||||
)}`"
|
||||
:label="$t('reg.repeatPassword')"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-btn
|
||||
tabindex="-1"
|
||||
:icon="
|
||||
typePassword === `password`
|
||||
? `fas fa-eye-slash`
|
||||
: `fas fa-eye`
|
||||
"
|
||||
@click="showPassword"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key" />
|
||||
</template>
|
||||
</q-input>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="4">
|
||||
<q-input
|
||||
v-if="shownationality"
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded
|
||||
outlined
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<vue-country-code
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }"
|
||||
>
|
||||
|
||||
</vue-country-code>-->
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!--<vue-tel-input
|
||||
<!--<vue-tel-input
|
||||
v-if="showcell"
|
||||
@country-changed="intcode_change()"
|
||||
:value="signup.profile.cell"
|
||||
@@ -300,84 +311,104 @@
|
||||
wrapperClasses="clCellCode">
|
||||
</vue-tel-input>-->
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn label="Mostra Privacy" @click="showpolicy = true"></q-btn>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="showpolicy">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title> Privacy Policy </q-toolbar-title>
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
label="Mostra Privacy"
|
||||
@click="showpolicy = true"
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<PagePolicy
|
||||
v-if="site.policy"
|
||||
:owneremail="site.policy.owneremail"
|
||||
:siteName="site.policy.siteName"
|
||||
:ownerDataName="site.policy.ownerDataName"
|
||||
:managerData="site.policy.managerData"
|
||||
:includeData="site.policy.includeData"
|
||||
:url="site.policy.url"
|
||||
:lastdataupdate="site.policy.lastdataupdate"
|
||||
:country="site.policy.country"
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="showpolicy">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title> Privacy Policy </q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<PagePolicy
|
||||
v-if="site.policy"
|
||||
:owneremail="site.policy.owneremail"
|
||||
:siteName="site.policy.siteName"
|
||||
:ownerDataName="site.policy.ownerDataName"
|
||||
:managerData="site.policy.managerData"
|
||||
:includeData="site.policy.includeData"
|
||||
:url="site.policy.url"
|
||||
:lastdataupdate="site.policy.lastdataupdate"
|
||||
:country="site.policy.country"
|
||||
>
|
||||
</PagePolicy>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.terms"
|
||||
color="secondary"
|
||||
@blur="v$.terms.$touch"
|
||||
:error="v$.terms.$error"
|
||||
:error-message="`${tools.errorMsg('terms', v$.terms)}`"
|
||||
:label="$t('reg.terms')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<q-checkbox
|
||||
v-if="showadultcheck"
|
||||
v-model="iamadult"
|
||||
color="secondary"
|
||||
:label="$t('reg.onlyadult')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<div v-if="showadultcheck">
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<q-btn
|
||||
rounded
|
||||
size="lg"
|
||||
color="positive"
|
||||
@click="submitOk"
|
||||
:disabled="!allowSubmit()"
|
||||
:label="$t('reg.submit')"
|
||||
>
|
||||
</PagePolicy>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</q-btn>
|
||||
</div>
|
||||
<br />
|
||||
<!--
|
||||
Già registrato?
|
||||
<q-btn
|
||||
class="q-ma-sm"
|
||||
text-color="black"
|
||||
color="white"
|
||||
icon="fas fa-home"
|
||||
label="Accedi"
|
||||
to="/"
|
||||
size="sm"
|
||||
></q-btn>
|
||||
<br /><br /><br />
|
||||
-->
|
||||
</q-carousel-slide>
|
||||
</q-carousel>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.terms"
|
||||
color="secondary"
|
||||
@blur="v$.terms.$touch"
|
||||
:error="v$.terms.$error"
|
||||
:error-message="`${tools.errorMsg('terms', v$.terms)}`"
|
||||
:label="$t('reg.terms')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<q-checkbox
|
||||
v-if="showadultcheck"
|
||||
v-model="iamadult"
|
||||
color="secondary"
|
||||
:label="$t('reg.onlyadult')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<div v-if="showadultcheck">
|
||||
<br />
|
||||
<div class="row justify-center">
|
||||
<q-btn-toggle
|
||||
glossy
|
||||
v-model="slide"
|
||||
:options="[
|
||||
{ label: 1, value: '1' },
|
||||
{ label: 2, value: '2' },
|
||||
{ label: 3, value: '3' },
|
||||
{ label: 4, value: '4' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<q-btn
|
||||
rounded
|
||||
size="lg"
|
||||
color="positive"
|
||||
@click="submitOk"
|
||||
:disabled="!allowSubmit()"
|
||||
:label="$t('reg.submit')"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<br />
|
||||
Già registrato?
|
||||
<q-btn
|
||||
class="q-ma-sm"
|
||||
text-color="black"
|
||||
color="white"
|
||||
icon="fas fa-home"
|
||||
label="Accedi"
|
||||
to="/"
|
||||
size="sm"
|
||||
></q-btn>
|
||||
<br /><br /><br />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="isalreadyReg">
|
||||
|
||||
@@ -24,6 +24,11 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
v-else
|
||||
>
|
||||
<CBarSelection
|
||||
v-if="showBarSelection"
|
||||
:myicon="myicon"
|
||||
:mytitle="mytitle"
|
||||
:mycolor="mycolor"
|
||||
|
||||
@@ -9,9 +9,9 @@ export default defineComponent({
|
||||
name: 'Logo',
|
||||
props: {
|
||||
mystyle: {
|
||||
type: Boolean,
|
||||
type: String,
|
||||
required: false,
|
||||
default: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{ num_notifs_unread }}</q-badge>
|
||||
</q-btn>
|
||||
|
||||
|
||||
<q-drawer v-model="open" side="right" elevated class="text-black"
|
||||
<q-drawer v-model="open" side="right" elevated
|
||||
:overlay="true"
|
||||
:breakpoint="1200"
|
||||
:width="q.screen.lt.sm ? tools.getwidth($q) : 450"
|
||||
@@ -41,13 +40,15 @@
|
||||
<CMyCircuits
|
||||
v-model="filter"
|
||||
:finder="true"
|
||||
:showfinder="true"
|
||||
:showfinder="false"
|
||||
:showBarSelection="false"
|
||||
>
|
||||
|
||||
<CFinder
|
||||
:table="toolsext.TABCIRCUITS"
|
||||
:noButtAdd="true"
|
||||
:showFilterPersonal="false"
|
||||
:showBarSelection="false"
|
||||
/>
|
||||
|
||||
</CMyCircuits>
|
||||
|
||||
@@ -521,6 +521,8 @@ const msg_it = {
|
||||
surname: 'Cognome',
|
||||
surname_opt: 'Cognome (facoltativo)',
|
||||
username_login: 'Username o email',
|
||||
scegli_username: 'Inserisci un nome utente per il tuo Profilo:',
|
||||
scegli_password: 'Inserisci una Nuova password per accedere alla piattaforma:',
|
||||
password: 'Password',
|
||||
password_reg: 'Scegli una nuova Password',
|
||||
repeatPassword: 'Ripeti password',
|
||||
@@ -599,6 +601,7 @@ const msg_it = {
|
||||
code_resetpwd_error: 'Il codice inserito non è corretto.',
|
||||
duplicate_email: 'l\'Email è già stata registrata',
|
||||
invalid_email: 'l\'Email non è valida',
|
||||
invalid_email_micro: 'Questa tipo di email non è funzionante sui nostri server. Si consiglia di usare Gmail o altra casella.',
|
||||
user_already_exist: 'La registrazione con questi dati (nome, cognome e cellulare) è stata già effettuata. Per accedere al sito, cliccare sul bottone LOGIN dalla HomePage.',
|
||||
user_extralist_not_found: 'Utente in archivio non trovato, inserire il Nome, Cognome e numero di cellulare comunicato nella lista nel 2019. Se questa è una nuova registrazione, dovete registrarvi tramite il LINK di chi vi sta invitando.',
|
||||
user_aportador_not_valid: 'Il link di registrazione non sembra risultare valido.',
|
||||
@@ -802,6 +805,7 @@ const msg_it = {
|
||||
message: 'Messaggio',
|
||||
messages: 'Messaggi',
|
||||
nomessage: 'Nessun Messaggio',
|
||||
send_email: 'Invia Email',
|
||||
},
|
||||
notifs: {
|
||||
all: 'Tutte',
|
||||
@@ -1171,12 +1175,10 @@ const msg_it = {
|
||||
durata_deper: 'Durata Dep.',
|
||||
img_logo: 'NomeFile Logo',
|
||||
regulation: 'Regolamento',
|
||||
disclaimer: 'Questo Strumento vuole essere un\'aiuto per contabilizzare gli scambi tra utenti. ' +
|
||||
'Consigliamo vivamente di scaricarsi con frequenza la lista dei movimenti degli utenti (bottone "Esporta"), per ogni possibile evento imprevisto ' +
|
||||
'(Server inaccessibile, ecc..) declinando così il creatore della APP da ogni responsabilità su come' +
|
||||
'verrà utilizzata dal gruppo. ',
|
||||
disclaimer: 'Lo scopo di questo strumento è quello di aiutare a contabilizzare gli scambi tra i vari gruppi territoriali. ' +
|
||||
'La responsabilità di come verrà utilizzato, sarà di ognuno di noi.',
|
||||
acceptregulation: 'Accetta il Regolamento',
|
||||
domanda_ask: 'Chiedere l\'invito al Circuito {circuitname} accettando il suo Regolamento?',
|
||||
domanda_ask: 'Confermi di voler entrare nel Circuito {circuitname} accettando il suo Regolamento?',
|
||||
domanda_revoke: 'Revocare la richiesta al Circuito {circuitname}?',
|
||||
askedto: 'Chiesto l\'invito al Circuito {circuitname}',
|
||||
revoketo: 'Revocato la richiesta d\'invito al Circuito {circuitname}',
|
||||
|
||||
@@ -188,7 +188,7 @@ export const costanti = {
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
title: 'Gruppi',
|
||||
title: 'Gruppi', // ! IND_MYGROUPS
|
||||
to: '/groups',
|
||||
table: 'mygroups',
|
||||
icon: 'fas fa-users',
|
||||
@@ -199,7 +199,7 @@ export const costanti = {
|
||||
visuonstat: true,
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
visible: false, // ! IND_CIRCUIT: 11,
|
||||
title: 'Circuiti',
|
||||
to: '/circuits',
|
||||
table: 'circuits',
|
||||
@@ -212,6 +212,10 @@ export const costanti = {
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
IND_CIRCUIT: 11,
|
||||
IND_MYGROUPS: 10,
|
||||
|
||||
BINARY_CHECK: 1,
|
||||
|
||||
VISUTABLE_LISTA: 2,
|
||||
|
||||
@@ -5382,6 +5382,7 @@ export const tools = {
|
||||
return res.status !== PayloadMessageTypes.statusfound
|
||||
}
|
||||
|
||||
console.log('registeredemail', email)
|
||||
return Axios.post(VALIDATE_USER_URL, { idapp: process.env.APP_ID, email, key: process.env.PAO_APP_ID })
|
||||
.then(onSuccess)
|
||||
.catch((err) => {
|
||||
@@ -5392,6 +5393,7 @@ export const tools = {
|
||||
|
||||
async registeredusername(username: string) {
|
||||
|
||||
console.log('registeredusername', username)
|
||||
const VALIDATE_USER_URL = tools.getServerHost() + ''
|
||||
|
||||
let onSuccess = (res: AxiosResponse) => {
|
||||
@@ -7368,6 +7370,14 @@ export const tools = {
|
||||
return name
|
||||
},
|
||||
|
||||
isEmailNoMicroZozz(myemail: string) {
|
||||
|
||||
return myemail.search(/hotmail/i) !== -1
|
||||
|| myemail.search(/yahoo/i) !== -1
|
||||
|| myemail.search(/outlook/i) !== -1
|
||||
|| myemail.search(/live.it/i) !== -1
|
||||
|| myemail.search(/microsoft/i) !== -1
|
||||
},
|
||||
|
||||
getoptionsMainCards(only: boolean) {
|
||||
let myarr = []
|
||||
|
||||
@@ -3,10 +3,15 @@ import { default as Axios, AxiosResponse } from 'axios'
|
||||
import { GlobalConfig, PayloadMessageTypes } from '../common'
|
||||
import { tools } from '../store/Modules/tools'
|
||||
|
||||
import { helpers } from '@vuelidate/validators'
|
||||
const { withAsync } = helpers
|
||||
|
||||
// const SITE_URL = GlobalConfig.uri.site
|
||||
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/users/'
|
||||
|
||||
export function aportadorexist(userName: string) {
|
||||
export const aportadorexist = withAsync(_aportadorexist)
|
||||
|
||||
export function _aportadorexist(userName: string) {
|
||||
if (userName === tools.APORTADOR_NONE)
|
||||
return true
|
||||
|
||||
|
||||
@@ -696,23 +696,10 @@
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-green text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<em style="font-weight: bold">Disclaimer:</em><br />
|
||||
</q-banner>
|
||||
<div v-html="t('circuit.disclaimer')"></div>
|
||||
</q-card-section>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-green text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<em style="font-weight: bold">Regolamento interno:</em><br />
|
||||
</q-banner>
|
||||
<div style="font-weight: bold; font-size: 1.25rem;">Regolamento:</div>
|
||||
<div v-html="circuit.regulation"></div>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
@@ -732,10 +719,8 @@
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="negative"
|
||||
:label="$t('friends.refuse')"
|
||||
outline
|
||||
:label="$t('dialog.cancel')"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
<CMyCircuits
|
||||
v-model="filter"
|
||||
:finder="true"
|
||||
>
|
||||
:showfinder="true"
|
||||
:showBarSelection="true"
|
||||
>
|
||||
|
||||
<CFinder
|
||||
:table="toolsext.TABCIRCUITS"
|
||||
:noButtAdd="!tools.isManager()"
|
||||
:showFilterPersonal="true"
|
||||
:showBarSelection="true"
|
||||
/>
|
||||
|
||||
</CMyCircuits>
|
||||
|
||||
@@ -266,6 +266,27 @@
|
||||
target="__blank"
|
||||
>
|
||||
</q-btn>
|
||||
<div v-else-if="myuser.email" class="row">
|
||||
<CLabel
|
||||
v-bind="$attrs"
|
||||
:copy="true"
|
||||
:value="myuser.email"
|
||||
:label="$t('reg.email')"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
|
||||
outline
|
||||
icon="fas fa-envelope"
|
||||
color="black"
|
||||
type="a"
|
||||
size="md"
|
||||
:label="$t('msgs.send_email')"
|
||||
:href="tools.getemailto(myuser.email)"
|
||||
target="__blank"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||
<q-btn
|
||||
|
||||
Reference in New Issue
Block a user