Lista Friends
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
v-model="myvalue"
|
||||
autogrow
|
||||
:disable="disable"
|
||||
:readonly="disable"
|
||||
@keyup.enter.stop
|
||||
@update:model-value="changevalRec"
|
||||
autofocus
|
||||
@@ -38,12 +39,12 @@
|
||||
|
||||
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue" type="a" rounded dense size="sm"
|
||||
color="white" text-color="blue" icon="person" :to="col.link.replace(col.name, myvalue)">
|
||||
{{ myvalue }}
|
||||
<span :class="{disabled: disable }">{{ myvalue }}</span>
|
||||
</q-btn>
|
||||
<q-btn v-else-if="col.tipovisu === costanti.TipoVisu.BUTTON && myvalue" rounded dense size="sm"
|
||||
color="primary" icon="person" :to="col.link.replace(col.name, myvalue)">{{ myvalue }}
|
||||
</q-btn>
|
||||
<span v-else v-html="visuValByType(myvalue, col, row)"></span>
|
||||
<span v-else :class="{disabled: disable }" v-html="visuValByType(myvalue, col, row)"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.number">
|
||||
@@ -383,7 +384,8 @@
|
||||
<q-popup-edit
|
||||
v-if="(!isInModif && canEdit && noPopupeditByCol(col))"
|
||||
v-model="myvalue"
|
||||
:disable="col.disable"
|
||||
:disable="col.disable || disable"
|
||||
:readonly="col.disable || disable"
|
||||
:title="col.title ? col.title : col.titlepopupedit"
|
||||
buttons
|
||||
persistent
|
||||
|
||||
@@ -15,10 +15,10 @@ import { DefaultProfile, useUserStore } from '@store/UserStore'
|
||||
import useValidate from '@vuelidate/core'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
|
||||
import { email, minLength, required, sameAs } from '@vuelidate/validators'
|
||||
import { minLength, required, sameAs } from '@vuelidate/validators'
|
||||
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
import { complexity, registereduser, aportadorexist } from '../../validation'
|
||||
|
||||
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
@@ -96,11 +96,6 @@ export default defineComponent({
|
||||
surname: {
|
||||
required,
|
||||
},
|
||||
email: {
|
||||
email,
|
||||
registeredemail,
|
||||
required,
|
||||
},
|
||||
terms: {
|
||||
required,
|
||||
},
|
||||
@@ -235,6 +230,33 @@ export default defineComponent({
|
||||
console.log('signup.aportador_solidario', signup.aportador_solidario)
|
||||
}
|
||||
|
||||
function myRuleEmail(val: string) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
// call
|
||||
// resolve(true)
|
||||
// --> content is valid
|
||||
// resolve(false)
|
||||
// --> 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) {
|
||||
risp = tools.isEmail(val) || t('reg.err.invalid_email')
|
||||
}
|
||||
resolve(risp)
|
||||
|
||||
})
|
||||
|
||||
// calling reject(...) will also mark the input
|
||||
// as having an error, but there will not be any
|
||||
// error message displayed below the input
|
||||
// (only in browser console)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
created()
|
||||
|
||||
return {
|
||||
@@ -250,6 +272,7 @@ export default defineComponent({
|
||||
iamadult,
|
||||
v$,
|
||||
allowSubmit,
|
||||
myRuleEmail,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -28,15 +28,31 @@
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
<!--<q-input
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@blur="v$.email.$touch"
|
||||
@update:model-value="changeemail()"
|
||||
:error="v$.email.$error"
|
||||
: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')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
|
||||
Reference in New Issue
Block a user