- DashBoard, Profile, Order Menu
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
borderless
|
||||
:label="label"
|
||||
:bg-color="bgcolor"
|
||||
:disable="disable"
|
||||
:readonly="true"
|
||||
:dense="dense"
|
||||
mask="####-##-## ##:##"
|
||||
debounce="500"
|
||||
|
||||
@@ -41,6 +41,17 @@ export default class CMyFieldDb extends MixinBase {
|
||||
// console.log('created', this.myvalue)
|
||||
}
|
||||
|
||||
public getclassCol(col) {
|
||||
if (col) {
|
||||
let mycl = (this.disable || col.disable) ? '' : 'colmodif '
|
||||
mycl += (col.fieldtype === tools.FieldType.date) ? ' coldate flex flex-container ' : ''
|
||||
|
||||
return mycl
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
public visuValByType(val) {
|
||||
if (this.col.fieldtype === tools.FieldType.date) {
|
||||
if (val === undefined) {
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<div class="text-center">
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="orange-3" dense>
|
||||
<q-field rounded outlined bg-color="orange-3" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline" tabindex="0">{{title}}</div>
|
||||
<div class="self-center full-width no-outline text-center" tabindex="0">{{title}}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
<div class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb">
|
||||
<div :class="getclassCol(col) + ` q-ma-sm q-pa-sm col-grow rounded-borders`" style="border: 1px solid #bbb">
|
||||
<div v-if="type === tools.FieldType.date">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
@@ -33,12 +33,13 @@
|
||||
<!-- Show Value -->
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
|
||||
<q-input
|
||||
input-class="cursor-pointer"
|
||||
input-class="cursor-pointer text-center"
|
||||
:readonly="true"
|
||||
v-model="countryname"
|
||||
rounded outlined
|
||||
rounded
|
||||
dense
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')">
|
||||
>
|
||||
|
||||
<div class="hidden">
|
||||
<vue-country-code
|
||||
@@ -81,7 +82,7 @@
|
||||
</div>
|
||||
|
||||
<q-popup-edit
|
||||
v-if="canEdit && type !== tools.FieldType.boolean"
|
||||
v-if="(canEdit && type !== tools.FieldType.boolean) && !disable"
|
||||
v-model="myvalue"
|
||||
:disable="col.disable"
|
||||
:title="col.title"
|
||||
@@ -96,6 +97,7 @@
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.string">
|
||||
<q-input v-model="myvalue"
|
||||
|
||||
autogrow
|
||||
@keyup.enter.stop
|
||||
autofocus>
|
||||
@@ -143,9 +145,9 @@
|
||||
<q-input
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded outlined
|
||||
rounded dense
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')">
|
||||
:label="title">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<div style="font-size: 1rem;">
|
||||
|
||||
@@ -139,9 +139,9 @@
|
||||
<q-input
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded outlined
|
||||
rounded dense
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')">
|
||||
>
|
||||
|
||||
<template v-slot:prepend>
|
||||
<div style="font-size: 1rem;">
|
||||
|
||||
@@ -1,39 +1,43 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser } from '../../validation'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
|
||||
export interface TSignup { signup: ISignupOptions, validationGroup: string[] }
|
||||
|
||||
export const validations = {
|
||||
signup: {
|
||||
repeatPassword: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password')
|
||||
},
|
||||
password: {
|
||||
complexity,
|
||||
required,
|
||||
minLength: minLength(8)
|
||||
},
|
||||
username: {
|
||||
registereduser,
|
||||
required,
|
||||
minLength: minLength(6)
|
||||
},
|
||||
name: {
|
||||
required
|
||||
},
|
||||
surname: {
|
||||
required
|
||||
},
|
||||
email: {
|
||||
email,
|
||||
registeredemail,
|
||||
required
|
||||
},
|
||||
terms: {
|
||||
required
|
||||
}
|
||||
signup: {
|
||||
repeatPassword: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password')
|
||||
},
|
||||
password: {
|
||||
required,
|
||||
minLength: minLength(8),
|
||||
complexity
|
||||
},
|
||||
username: {
|
||||
required,
|
||||
minLength: minLength(6),
|
||||
registereduser
|
||||
},
|
||||
name: {
|
||||
required
|
||||
},
|
||||
surname: {
|
||||
required
|
||||
},
|
||||
email: {
|
||||
email,
|
||||
registeredemail,
|
||||
required
|
||||
},
|
||||
terms: {
|
||||
required
|
||||
},
|
||||
aportador_solidario: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,12 +31,4 @@
|
||||
border-radius: 32px;
|
||||
}
|
||||
|
||||
.clAportador{
|
||||
background-color: lightblue;
|
||||
border-radius: 32px;
|
||||
}
|
||||
|
||||
.q-field--readonly {
|
||||
border: 1px solid rgba(0,0,0,0.2);
|
||||
border-radius: 32px;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { registereduser } from '../../validation'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
|
||||
Vue.use(VueCountryCode)
|
||||
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||
@@ -28,7 +30,7 @@ Vue.use(VueCountryCode)
|
||||
components: { Logo, CTitleBanner }
|
||||
})
|
||||
|
||||
export default class CSignUp extends Vue {
|
||||
export default class CSignUp extends MixinBase {
|
||||
@Prop({ required: false, default: false }) public showadultcheck: boolean
|
||||
@Prop({ required: false, default: false }) public showcell: boolean
|
||||
public $v
|
||||
@@ -48,17 +50,21 @@ export default class CSignUp extends Vue {
|
||||
password: process.env.TEST_PASSWORD || '',
|
||||
repeatPassword: process.env.TEST_PASSWORD || '',
|
||||
terms: !process.env.PROD,
|
||||
profile: DefaultProfile
|
||||
profile: DefaultProfile,
|
||||
aportador_solidario: ''
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.$v.$reset()
|
||||
|
||||
this.signup.aportador_solidario = tools.getCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited || process.env.TEST_APORTADOR)
|
||||
this.signup.aportador_solidario = this.$route.params.invited || process.env.TEST_APORTADOR
|
||||
|
||||
this.$v.signup.aportador_solidario.$touch()
|
||||
}
|
||||
|
||||
@Watch('$route.params.invited')
|
||||
public changeaportador() {
|
||||
console.log('changeaportador', this.$route.params.invited)
|
||||
if (!this.signup.aportador_solidario)
|
||||
this.signup.aportador_solidario = this.$route.params.invited
|
||||
}
|
||||
@@ -129,11 +135,27 @@ export default class CSignUp extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.minLength) { return this.$t('reg.err.atleast') + ` ${item.$params.minLength.min} ` + this.$t('reg.err.char') }
|
||||
if (!item.complexity) { return this.$t('reg.err.complexity') }
|
||||
console.log('item', item)
|
||||
|
||||
if (item.minLength !== undefined) {
|
||||
if (!item.minLength) {
|
||||
return this.$t('reg.err.atleast') + ` ${item.$params.minLength.min} ` + this.$t('reg.err.char')
|
||||
}
|
||||
}
|
||||
if (item.complexity !== undefined) {
|
||||
if (!item.complexity) {
|
||||
return this.$t('reg.err.complexity')
|
||||
}
|
||||
}
|
||||
// if (!item.maxLength) { return this.$t('reg.err.notmore') + ` ${item.$params.maxLength.max} ` + this.$t('reg.err.char') }
|
||||
|
||||
if (!item.required) { return this.$t('reg.err.required') }
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return this.$t('reg.err.required')
|
||||
}
|
||||
}
|
||||
|
||||
console.log(' ....avanti')
|
||||
if (cosa === 'email') {
|
||||
// console.log("EMAIL " + item.isUnique);
|
||||
// console.log(item);
|
||||
@@ -141,11 +163,16 @@ export default class CSignUp extends Vue {
|
||||
} else if (cosa === 'username') {
|
||||
// console.log(item);
|
||||
if (!item.isUnique) { return this.$t('reg.err.duplicate_username') }
|
||||
} else if (cosa === 'aportador_solidario') {
|
||||
// console.log(item);
|
||||
if (!item.aportadorexist) {
|
||||
console.log('!item.aportadorexist !')
|
||||
return this.$t('reg.err.aportador_not_exist')
|
||||
}
|
||||
} else if ((cosa === 'name') || (cosa === 'surname')) {
|
||||
// console.log(item);
|
||||
}
|
||||
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
@@ -188,6 +215,9 @@ export default class CSignUp extends Vue {
|
||||
return
|
||||
}
|
||||
|
||||
this.signup.name = tools.CapitalizeAllWords(this.signup.name)
|
||||
this.signup.surname = tools.CapitalizeAllWords(this.signup.surname)
|
||||
|
||||
this.$q.loading.show({ message: this.$t('reg.incorso') })
|
||||
|
||||
console.log(this.signup)
|
||||
@@ -214,4 +244,8 @@ export default class CSignUp extends Vue {
|
||||
this.countryname = name
|
||||
}
|
||||
|
||||
public inputUsername(value){
|
||||
this.signup.username = value.trim()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,13 +8,18 @@
|
||||
|
||||
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
|
||||
|
||||
<div class="q-gutter-xs">
|
||||
<div class="q-gutter-sm">
|
||||
|
||||
<q-input
|
||||
class="clAportador"
|
||||
bg-color="lightblue"
|
||||
:readonly="true"
|
||||
v-model="signup.aportador_solidario"
|
||||
rounded outlined dense
|
||||
rounded outlined
|
||||
@blur="$v.signup.aportador_solidario.$touch"
|
||||
:error="$v.signup.aportador_solidario.$error"
|
||||
:error-message="errorMsg('aportador_solidario', $v.signup.aportador_solidario)"
|
||||
|
||||
debounce="1000"
|
||||
|
||||
:label="$t('reg.aportador_solidario')">
|
||||
|
||||
@@ -45,6 +50,7 @@
|
||||
rounded outlined
|
||||
@blur="$v.signup.username.$touch"
|
||||
:error="$v.signup.username.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('username', $v.signup.username)"
|
||||
@@ -142,7 +148,7 @@
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
<div v-if="!tools.isMobile()"><br></div>
|
||||
|
||||
<vue-tel-input
|
||||
v-if="showcell"
|
||||
|
||||
Reference in New Issue
Block a user