- 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"
|
||||
|
||||
@@ -1,109 +1,126 @@
|
||||
<template>
|
||||
<div class="no-border" v-if="isfinishLoading">
|
||||
<q-list class="rounded-borders text-primary">
|
||||
<template v-for="(parent, index) in getmenu">
|
||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||
<div v-for="myitemmenu in static_data.routes" v-if="myitemmenu.active">
|
||||
<div v-if="!!myitemmenu.routes2 && myitemmenu.inmenu && tools.visumenu(myitemmenu)">
|
||||
<div class="no-border" v-if="isfinishLoading">
|
||||
<q-list class="rounded-borders text-primary">
|
||||
<template v-for="(parent, index) in getmenu">
|
||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||
<div v-for="myitemmenu in static_data.routes" v-if="myitemmenu.active">
|
||||
<div v-if="!!myitemmenu.routes2 && myitemmenu.inmenu && tools.visumenu(myitemmenu)">
|
||||
<span v-if="myitemmenu.isseparator">
|
||||
<q-separator></q-separator>
|
||||
</span>
|
||||
<span v-else>
|
||||
|
||||
<q-expansion-item
|
||||
:header-inset-level="myitemmenu.level_parent"
|
||||
:content-inset-level="myitemmenu.level_parent"
|
||||
:label="tools.getLabelByItem(myitemmenu, mythis)"
|
||||
:icon="myitemmenu.materialIcon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
:header-class="getmymenuclass(myitemmenu)"
|
||||
active-class="my-menu-active">
|
||||
|
||||
<div v-for="(child2, index) in myitemmenu.routes2" :key="index" v-if="child2.active">
|
||||
<span v-if="child2.isseparator">
|
||||
<q-separator></q-separator>
|
||||
</span>
|
||||
<span v-else>
|
||||
<q-expansion-item
|
||||
:header-inset-level="myitemmenu.level_parent"
|
||||
:content-inset-level="myitemmenu.level_parent"
|
||||
:label="tools.getLabelByItem(myitemmenu, mythis)"
|
||||
:icon="myitemmenu.materialIcon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
:header-class="getmymenuclass(myitemmenu)"
|
||||
active-class="my-menu-active">
|
||||
|
||||
<div v-for="(child2, index) in myitemmenu.routes2" :key="index">
|
||||
|
||||
v-if="!child2.routes2"
|
||||
:to="getroute(child2)"
|
||||
:header-inset-level="child2.level_child"
|
||||
:duration="300"
|
||||
:icon="child2.materialIcon"
|
||||
active-class="my-menu-active"
|
||||
expand-icon-class="my-menu-icon-none"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child2, mythis)">
|
||||
<q-expansion-item v-if="!!child2.routes2 && child3.active"
|
||||
v-for="(child3, index) in child2.routes2"
|
||||
:key="index"
|
||||
:to="getroute(child3)"
|
||||
:header-inset-level="child3.level_child"
|
||||
:duration="300"
|
||||
:icon="child3.materialIcon"
|
||||
:expand-icon="child3.icon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
active-class="my-menu-active"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child3, mythis)">
|
||||
</q-expansion-item>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
v-else
|
||||
:header-inset-level="child2.level_parent"
|
||||
:content-inset-level="child2.level_parent"
|
||||
:label="tools.getLabelByItem(child2, mythis)"
|
||||
:icon="child2.materialIcon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
:header-class="getmymenuclass(child2)"
|
||||
active-class="my-menu-active">
|
||||
<div v-for="(child3, index) in child2.routes2" :key="index" v-if="child3.active">
|
||||
<q-expansion-item
|
||||
v-if="!child2.routes2"
|
||||
:to="getroute(child2)"
|
||||
:header-inset-level="child2.level_child"
|
||||
:duration="300"
|
||||
:icon="child2.materialIcon"
|
||||
active-class="my-menu-active"
|
||||
expand-icon-class="my-menu-icon-none"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child2, mythis)">
|
||||
<q-expansion-item v-if="!!child2.routes2" v-for="(child3, index) in child2.routes2"
|
||||
:to="getroute(child3)"
|
||||
:header-inset-level="child3.level_child"
|
||||
:duration="300"
|
||||
:icon="child3.materialIcon"
|
||||
active-class="my-menu-active"
|
||||
expand-icon-class="my-menu-icon-none"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child3, mythis)">
|
||||
<q-expansion-item v-if="!!child3.routes2 && child3.active"
|
||||
v-for="(child4, index) in child3.routes2"
|
||||
:key="index"
|
||||
:to="getroute(child3)"
|
||||
:header-inset-level="child3.level_child"
|
||||
:to="getroute(child4)"
|
||||
:header-inset-level="child4.level_child"
|
||||
:duration="300"
|
||||
:icon="child3.materialIcon"
|
||||
:expand-icon="child3.icon"
|
||||
:icon="child4.materialIcon"
|
||||
:expand-icon="child4.icon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
active-class="my-menu-active"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child3, mythis)">
|
||||
:label="tools.getLabelByItem(child4, mythis)">
|
||||
</q-expansion-item>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
v-else
|
||||
:header-inset-level="child2.level_parent"
|
||||
:content-inset-level="child2.level_parent"
|
||||
:label="tools.getLabelByItem(child2, mythis)"
|
||||
:icon="child2.materialIcon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
:header-class="getmymenuclass(child2)"
|
||||
active-class="my-menu-active">
|
||||
<div v-for="(child3, index) in child2.routes2" :key="index">
|
||||
<q-expansion-item
|
||||
:to="getroute(child3)"
|
||||
:header-inset-level="child3.level_child"
|
||||
:duration="300"
|
||||
:icon="child3.materialIcon"
|
||||
active-class="my-menu-active"
|
||||
expand-icon-class="my-menu-icon-none"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child3, mythis)">
|
||||
<q-expansion-item v-if="!!child3.routes2" v-for="(child3, index) in child3.routes2"
|
||||
:key="index"
|
||||
:to="getroute(child3)"
|
||||
:header-inset-level="child3.level_child"
|
||||
:duration="300"
|
||||
:icon="child3.materialIcon"
|
||||
:expand-icon="child3.icon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
active-class="my-menu-active"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="tools.getLabelByItem(child3, mythis)">
|
||||
</q-expansion-item>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="myitemmenu.inmenu && !myitemmenu.submenu && tools.visumenu(myitemmenu)">
|
||||
<q-slide-transition :duration=200>
|
||||
<div v-show="true">
|
||||
<q-expansion-item
|
||||
:to="getroute(myitemmenu)"
|
||||
:header-inset-level="myitemmenu.level_parent"
|
||||
:content-inset-level="myitemmenu.level_parent"
|
||||
:label="tools.getLabelByItem(myitemmenu, mythis)"
|
||||
:icon="myitemmenu.materialIcon"
|
||||
expand-icon="none"
|
||||
header-class="my-menu"
|
||||
active-class="my-menu-active">
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="myitemmenu.inmenu && !myitemmenu.submenu && tools.visumenu(myitemmenu)">
|
||||
<q-slide-transition :duration=200>
|
||||
<div v-show="true">
|
||||
<span v-if="myitemmenu.isseparator">
|
||||
<q-separator inset></q-separator>
|
||||
</span>
|
||||
<span v-else>
|
||||
<q-expansion-item
|
||||
:to="getroute(myitemmenu)"
|
||||
:header-inset-level="myitemmenu.level_parent"
|
||||
:content-inset-level="myitemmenu.level_parent"
|
||||
:label="tools.getLabelByItem(myitemmenu, mythis)"
|
||||
:icon="myitemmenu.materialIcon"
|
||||
expand-icon="none"
|
||||
header-class="my-menu"
|
||||
active-class="my-menu-active">
|
||||
</q-expansion-item>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./menuOne.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './menuOne.scss';
|
||||
@import './menuOne.scss';
|
||||
</style>
|
||||
|
||||
|
||||
@@ -78,6 +78,10 @@ export default class MixinUsers extends Vue {
|
||||
return UserStore.state.my.verified_email
|
||||
}
|
||||
|
||||
get MadeGift() {
|
||||
return UserStore.state.my.made_gift
|
||||
}
|
||||
|
||||
get Email() {
|
||||
return UserStore.state.my.email
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ export interface IMyPage {
|
||||
author_username?: string
|
||||
title?: string
|
||||
icon?: string
|
||||
order?: number
|
||||
path?: string
|
||||
keywords?: string
|
||||
description?: string
|
||||
@@ -171,11 +172,13 @@ export interface IMenuList {
|
||||
|
||||
export interface IListRoutes {
|
||||
active?: boolean
|
||||
order: number
|
||||
path: string
|
||||
name: string
|
||||
materialIcon?: string
|
||||
component?: Component
|
||||
reqauth?: boolean
|
||||
isseparator?: boolean
|
||||
inmenu?: boolean
|
||||
solotitle?: boolean
|
||||
infooter?: boolean
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface IUserProfile {
|
||||
cell?: string
|
||||
dateofbirth?: Date
|
||||
sex?: ESexType
|
||||
country_pay?: string
|
||||
email_paypal?: string
|
||||
username_telegram?: string
|
||||
}
|
||||
@@ -28,9 +29,11 @@ export interface IUserFields {
|
||||
ipaddr?: string
|
||||
perm?: number
|
||||
verified_email?: boolean
|
||||
made_gift?: boolean
|
||||
tokens?: IToken[]
|
||||
lasttimeonline?: Date
|
||||
profile?: IUserProfile
|
||||
downline?: IUserFields[]
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,6 +8,7 @@ const msgglobal = {
|
||||
showprevedit: 'Mostra Eventi Passati',
|
||||
columns: 'Colonne',
|
||||
tableslist: 'Tabelle',
|
||||
nodata: 'Nessun Dato'
|
||||
},
|
||||
otherpages: {
|
||||
error404: 'error404',
|
||||
@@ -37,6 +38,7 @@ const msgglobal = {
|
||||
},
|
||||
dialog: {
|
||||
close: 'Chiudi',
|
||||
copyclipboard: 'Copiato negli appunti',
|
||||
ok: 'Ok',
|
||||
yes: 'Si',
|
||||
no: 'No',
|
||||
@@ -109,19 +111,22 @@ const msgglobal = {
|
||||
},
|
||||
reg: {
|
||||
aportador_solidario: 'Chi ti ha Invitato',
|
||||
reflink: 'Link da condividere ai tuoi amici:',
|
||||
page_title: 'Registrazione',
|
||||
made_gift: 'Doné',
|
||||
incorso: 'Registrazione in corso...',
|
||||
richiesto: 'Campo Richiesto',
|
||||
email: 'Email',
|
||||
intcode_cell: 'Prefisso Int.',
|
||||
cell: 'Cellulare',
|
||||
cell: 'Cellulare Telegram',
|
||||
nationality: 'Nazionalità',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Paese di Destinazione Pagamenti',
|
||||
username_telegram: 'Username Telegram',
|
||||
img: 'Immagine',
|
||||
date_reg: 'Data Reg.',
|
||||
perm: 'Permessi',
|
||||
username: 'Nome Utente',
|
||||
username: 'Username',
|
||||
name: 'Nome',
|
||||
surname: 'Cognome',
|
||||
username_login: 'Nome Utente o email',
|
||||
@@ -145,6 +150,7 @@ const msgglobal = {
|
||||
terms: 'Devi accettare le condizioni, per continuare.',
|
||||
duplicate_email: 'l\'Email è già stata registrata',
|
||||
duplicate_username: 'L\'Username è stato già utilizzato',
|
||||
aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.',
|
||||
sameaspassword: 'Le password devono essere identiche',
|
||||
},
|
||||
tips: {
|
||||
@@ -382,6 +388,7 @@ const msgglobal = {
|
||||
editvalues: 'Cambiar valores',
|
||||
addrecord: 'Agregar fila',
|
||||
showprevedit: 'Mostrar eventos pasados',
|
||||
nodata: 'Sin datos',
|
||||
columns: 'Columnas',
|
||||
tableslist: 'Tablas'
|
||||
},
|
||||
@@ -410,6 +417,7 @@ const msgglobal = {
|
||||
},
|
||||
dialog: {
|
||||
close: 'Cerrar',
|
||||
copyclipboard: 'Copiado al portapapeles',
|
||||
ok: 'Vale',
|
||||
yes: 'Sí',
|
||||
no: 'No',
|
||||
@@ -482,19 +490,22 @@ const msgglobal = {
|
||||
},
|
||||
reg: {
|
||||
aportador_solidario: 'Aportador Solidario',
|
||||
reflink: 'Enlaces para compartir con tus amigos:',
|
||||
page_title: 'Registro',
|
||||
made_gift: 'Don',
|
||||
incorso: 'Registro en curso...',
|
||||
richiesto: 'Campo requerido',
|
||||
email: 'Email',
|
||||
intcode_cell: 'Prefijo Int.',
|
||||
cell: 'Móvil',
|
||||
cell: 'Móvil Telegram',
|
||||
nationality: 'Nacionalidad',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'País del Pagos de destino',
|
||||
username_telegram: 'Usuario Telegram',
|
||||
img: 'File image',
|
||||
date_reg: 'Fecha Reg.',
|
||||
perm: 'Permisos',
|
||||
username: 'Nombre usuario',
|
||||
username: 'Username',
|
||||
name: 'Nombre',
|
||||
surname: 'Apellido',
|
||||
username_login: 'Nombre usuario o email',
|
||||
@@ -518,6 +529,7 @@ const msgglobal = {
|
||||
terms: 'Debes aceptar las condiciones, para continuar..',
|
||||
duplicate_email: 'La email ya ha sido registrada',
|
||||
duplicate_username: 'El nombre de usuario ya ha sido utilizado',
|
||||
aportador_not_exist: 'El nombre de usuario de la persona que lo invitó no está presente. Contactanos.',
|
||||
sameaspassword: 'Las contraseñas deben ser idénticas',
|
||||
}
|
||||
},
|
||||
@@ -746,6 +758,7 @@ const msgglobal = {
|
||||
editvalues: 'Changer les valeurs',
|
||||
addrecord: 'Ajouter une ligne',
|
||||
showprevedit: 'Afficher les événements passés',
|
||||
nodata: 'Pas de données',
|
||||
columns: 'Colonnes',
|
||||
tableslist: 'Tables',
|
||||
},
|
||||
@@ -774,6 +787,7 @@ const msgglobal = {
|
||||
},
|
||||
dialog: {
|
||||
close: 'Fermer',
|
||||
copyclipboard: 'Copié dans le presse-papiers',
|
||||
ok: 'Bien',
|
||||
yes: 'Oui',
|
||||
no: 'Non',
|
||||
@@ -846,13 +860,15 @@ const msgglobal = {
|
||||
},
|
||||
reg: {
|
||||
aportador_solidario: 'Contributeur de solidarité',
|
||||
reflink: 'Liens à partager avec vos amis:',
|
||||
incorso: 'Inscription en cours...',
|
||||
richiesto: 'Champ obligatoire',
|
||||
email: 'Email',
|
||||
intcode_cell: 'Préfixe int.',
|
||||
cell: 'Téléphone',
|
||||
cell: 'Téléphone Telegram',
|
||||
nationality: 'Nationalité',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Pays de destination Paiements',
|
||||
username_telegram: 'Nom d\'utilisateur du Telegram',
|
||||
img: 'Fichier image',
|
||||
date_reg: 'Date Inscript.',
|
||||
@@ -881,6 +897,7 @@ const msgglobal = {
|
||||
terms: 'Vous devez accepter les conditions, pour continuer..',
|
||||
duplicate_email: 'L\'email a déjà été enregistré',
|
||||
duplicate_username: 'Le nom d\'utilisateur a déjà été utilisé',
|
||||
aportador_not_exist: 'Le nom d\'utilisateur de la personne qui vous a invité n\'est pas présent. Contactez-nous.',
|
||||
sameaspassword: 'Les mots de passe doivent être identiques',
|
||||
}
|
||||
},
|
||||
@@ -1109,6 +1126,7 @@ const msgglobal = {
|
||||
editvalues: 'Edit Values',
|
||||
addrecord: 'Add Row',
|
||||
showprevedit: 'Show Past Events',
|
||||
nodata: 'No data',
|
||||
columns: 'Columns',
|
||||
tableslist: 'Tables',
|
||||
},
|
||||
@@ -1137,6 +1155,7 @@ const msgglobal = {
|
||||
},
|
||||
dialog: {
|
||||
close: 'Close',
|
||||
copyclipboard: 'Copied to clipboard',
|
||||
ok: 'Ok',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
@@ -1209,13 +1228,16 @@ const msgglobal = {
|
||||
},
|
||||
reg: {
|
||||
aportador_solidario: 'Solidarity Contributor',
|
||||
reflink: 'Links to share to your friends:',
|
||||
incorso: 'Registration please wait...',
|
||||
made_gift: 'Donated',
|
||||
richiesto: 'Field Required',
|
||||
email: 'Email',
|
||||
intcode_cell: 'International Code',
|
||||
cell: 'Mobile Phone',
|
||||
cell: 'Mobile Telegram',
|
||||
nationality: 'Nationality',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Country of Destination Payments',
|
||||
username_telegram: 'Username Telegram',
|
||||
img: 'File Image',
|
||||
date_reg: 'Reg. Date',
|
||||
@@ -1244,6 +1266,7 @@ const msgglobal = {
|
||||
terms: 'You need to agree with the terms & conditions.',
|
||||
duplicate_email: 'Email was already registered',
|
||||
duplicate_username: 'Username is already taken',
|
||||
aportador_not_exist: 'The username of the person who invited you is not present. Contact us.',
|
||||
sameaspassword: 'Passwords must be identical',
|
||||
}
|
||||
},
|
||||
@@ -1471,6 +1494,7 @@ const msgglobal = {
|
||||
editvalues: 'Edit Values',
|
||||
addrecord: 'Add Row',
|
||||
showprevedit: 'Show Past Events',
|
||||
nodata: 'No data',
|
||||
columns: 'Columns',
|
||||
tableslist: 'Tables',
|
||||
},
|
||||
@@ -1499,6 +1523,7 @@ const msgglobal = {
|
||||
},
|
||||
dialog: {
|
||||
close: 'Close',
|
||||
copyclipboard: 'Copied to clipboard',
|
||||
ok: 'Ok',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
@@ -1571,14 +1596,17 @@ const msgglobal = {
|
||||
},
|
||||
reg: {
|
||||
aportador_solidario: 'Solidarity Contributor',
|
||||
reflink: 'Links to share to your friends:',
|
||||
page_title: 'Registration',
|
||||
made_gift: 'Donated',
|
||||
incorso: 'Registration please wait...',
|
||||
richiesto: 'Field Required',
|
||||
email: 'Email',
|
||||
intcode_cell: 'International Code',
|
||||
cell: 'Mobile Phone',
|
||||
cell: 'Mobile Telegram',
|
||||
nationality: 'Nationality',
|
||||
email_paypal: 'Email Paypal',
|
||||
country_pay: 'Country of Destination Payments',
|
||||
username_telegram: 'Username Telegram',
|
||||
img: 'File Image',
|
||||
date_reg: 'Reg. Date',
|
||||
@@ -1607,6 +1635,7 @@ const msgglobal = {
|
||||
terms: 'You need to agree with the terms & conditions.',
|
||||
duplicate_email: 'Email was already registered',
|
||||
duplicate_username: 'Username is already taken',
|
||||
aportador_not_exist: 'The username of the person who invited you is not present in the archive. Verify that it is correct.',
|
||||
sameaspassword: 'Passwords must be identical',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -837,6 +837,7 @@ namespace Actions {
|
||||
if (page.active) {
|
||||
arrpagesroute.push({
|
||||
active: true,
|
||||
order: page.order,
|
||||
path: '/' + page.path,
|
||||
name: undefined,
|
||||
text: page.title,
|
||||
@@ -852,6 +853,7 @@ namespace Actions {
|
||||
|
||||
const last = {
|
||||
active: true,
|
||||
order: 10000,
|
||||
path: '*',
|
||||
materialIcon: 'fas fa-calendar-plus',
|
||||
name: 'otherpages.error404def',
|
||||
@@ -860,7 +862,10 @@ namespace Actions {
|
||||
infooter: false
|
||||
}
|
||||
|
||||
static_data.routes = [...static_data.routes, ...arrpagesroute, last]
|
||||
static_data.routes = [...static_data.baseroutes, ...arrpagesroute, last]
|
||||
|
||||
// Sort array
|
||||
static_data.routes = static_data.routes.sort((a, b) => a.order - b.order)
|
||||
|
||||
router.addRoutes([...arrpagesroute, last])
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import { shared_consts } from '../../common/shared_vuejs'
|
||||
|
||||
const bcrypt = require('bcryptjs')
|
||||
|
||||
const DefaultUser: IUserFields = {
|
||||
export const DefaultUser: IUserFields = {
|
||||
_id: '',
|
||||
email: '',
|
||||
username: '',
|
||||
@@ -29,9 +29,11 @@ const DefaultUser: IUserFields = {
|
||||
password: '',
|
||||
tokens: [],
|
||||
verified_email: false,
|
||||
made_gift: false,
|
||||
profile: {
|
||||
img: ''
|
||||
}
|
||||
},
|
||||
downline: []
|
||||
}
|
||||
|
||||
export const DefaultProfile: IUserProfile = {
|
||||
@@ -41,6 +43,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
cell: '',
|
||||
dateofbirth: new Date(),
|
||||
sex: 0,
|
||||
country_pay: '',
|
||||
email_paypal: '',
|
||||
username_telegram: ''
|
||||
}
|
||||
@@ -166,6 +169,12 @@ namespace Getters {
|
||||
return ''
|
||||
}
|
||||
}, 'getImgByUsername')
|
||||
const getRefLink = b.read((mystate: IUserState) => (): string => {
|
||||
// console.log('myrec', myrec)
|
||||
|
||||
return tools.getUrlSite() + '/signup/' + mystate.my.username
|
||||
|
||||
}, 'getRefLink')
|
||||
|
||||
export const getters = {
|
||||
get isUserInvalid() {
|
||||
@@ -207,6 +216,9 @@ namespace Getters {
|
||||
get getUsersList() {
|
||||
return getUsersList()
|
||||
},
|
||||
get getRefLink() {
|
||||
return getRefLink()
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
@@ -263,6 +275,7 @@ namespace Mutations {
|
||||
localStorage.setItem(tools.localStorage.expirationDate, expirationDate.toString())
|
||||
localStorage.setItem(tools.localStorage.isLogged, String(true))
|
||||
localStorage.setItem(tools.localStorage.verified_email, String(myuser.verified_email))
|
||||
localStorage.setItem(tools.localStorage.made_gift, String(myuser.made_gift))
|
||||
localStorage.setItem(tools.localStorage.wasAlreadySubOnDb, String(GlobalStore.state.wasAlreadySubOnDb))
|
||||
|
||||
}
|
||||
@@ -323,6 +336,7 @@ namespace Mutations {
|
||||
mystate.my.surname = ''
|
||||
resetArrToken(mystate.my.tokens)
|
||||
mystate.my.verified_email = false
|
||||
mystate.my.made_gift = false
|
||||
mystate.categorySel = 'personal'
|
||||
|
||||
mystate.servercode = 0
|
||||
@@ -482,7 +496,7 @@ namespace Actions {
|
||||
// mutations.setServerCode(myres);
|
||||
return res
|
||||
}).catch((error) => {
|
||||
return { numtot: 0, numadded: 0, numalreadyexisted: 0}
|
||||
return { numtot: 0, numadded: 0, numalreadyexisted: 0 }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -518,18 +532,18 @@ namespace Actions {
|
||||
|
||||
return bcrypt.hash(authData.password, bcrypt.genSaltSync(12))
|
||||
.then((hashedPassword: string) => {
|
||||
/*
|
||||
const usertosend = {
|
||||
lang: mylang,
|
||||
email: authData.email,
|
||||
password: String(hashedPassword),
|
||||
username: authData.username,
|
||||
name: authData.name,
|
||||
surname: authData.surname
|
||||
}
|
||||
console.log(usertosend)
|
||||
/*
|
||||
const usertosend = {
|
||||
lang: mylang,
|
||||
email: authData.email,
|
||||
password: String(hashedPassword),
|
||||
username: authData.username,
|
||||
name: authData.name,
|
||||
surname: authData.surname
|
||||
}
|
||||
console.log(usertosend)
|
||||
|
||||
*/
|
||||
*/
|
||||
authData.lang = mylang
|
||||
authData.password = String(hashedPassword)
|
||||
|
||||
@@ -689,6 +703,7 @@ namespace Actions {
|
||||
localStorage.removeItem(tools.localStorage.isLogged)
|
||||
// localStorage.removeItem(rescodes.localStorage.leftDrawerOpen)
|
||||
localStorage.removeItem(tools.localStorage.verified_email)
|
||||
localStorage.removeItem(tools.localStorage.made_gift)
|
||||
localStorage.removeItem(tools.localStorage.categorySel)
|
||||
localStorage.removeItem(tools.localStorage.wasAlreadySubOnDb)
|
||||
|
||||
@@ -775,6 +790,7 @@ namespace Actions {
|
||||
const name = String(localStorage.getItem(tools.localStorage.name))
|
||||
const surname = String(localStorage.getItem(tools.localStorage.surname))
|
||||
const verified_email = localStorage.getItem(tools.localStorage.verified_email) === 'true'
|
||||
const made_gift = localStorage.getItem(tools.localStorage.made_gift) === 'true'
|
||||
const perm = parseInt(localStorage.getItem(tools.localStorage.perm), 10)
|
||||
const img = String(localStorage.getItem(tools.localStorage.img))
|
||||
|
||||
@@ -790,6 +806,7 @@ namespace Actions {
|
||||
name,
|
||||
surname,
|
||||
verified_email,
|
||||
made_gift,
|
||||
perm,
|
||||
profile: { img }
|
||||
})
|
||||
@@ -809,6 +826,22 @@ namespace Actions {
|
||||
}
|
||||
}
|
||||
|
||||
async function getDashboard(context, paramquery) {
|
||||
|
||||
return await Api.SendReq('/dashboard', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
return res.data.dashboard
|
||||
}
|
||||
}).catch((error) => {
|
||||
return {
|
||||
aportador: {},
|
||||
downline: []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
async function refreshUserInfos(){
|
||||
let {token, refresh_token} = JWT.fetch();
|
||||
@@ -837,6 +870,7 @@ namespace Actions {
|
||||
importemail: b.dispatch(importemail),
|
||||
newsletterload: b.dispatch(newsletterload),
|
||||
newsletter_setactivate: b.dispatch(newsletter_setactivate),
|
||||
getDashboard: b.dispatch(getDashboard),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,8 +77,10 @@ export const colgallery = [
|
||||
|
||||
export const colmypage = [
|
||||
AddCol({ name: 'title', label_trans: 'pages.title' }),
|
||||
AddCol({ name: 'lang', label_trans: 'pages.lang' }),
|
||||
AddCol({ name: 'path', label_trans: 'pages.path' }),
|
||||
AddCol({ name: 'icon', label_trans: 'pages.icon' }),
|
||||
AddCol({ name: 'order', label_trans: 'pages.order', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'keywords', label_trans: 'pages.keywords' }),
|
||||
AddCol({ name: 'description', label_trans: 'pages.description' }),
|
||||
AddCol({ name: 'heightimg', label_trans: 'pages.heightimg', fieldtype: tools.FieldType.number }),
|
||||
@@ -378,11 +380,13 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
AddCol({ name: 'email', label_trans: 'reg.email' }),
|
||||
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }),
|
||||
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell', fieldtype: tools.FieldType.intcode }),
|
||||
AddCol({ name: 'profile.iso2_cell', field: 'profile', subfield: 'iso2_cell', label_trans: 'reg.iso2_cell' }),
|
||||
AddCol({ name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', fieldtype: tools.FieldType.intcode }),
|
||||
AddCol({ name: 'profile.email_paypal', field: 'profile', subfield: 'email_paypal', label_trans: 'reg.email_paypal' }),
|
||||
AddCol({ name: 'profile.country_pay', field: 'profile', subfield: 'country_pay', label_trans: 'reg.country_pay', fieldtype: tools.FieldType.nationality }),
|
||||
AddCol({ name: 'profile.username_telegram', field: 'profile', subfield: 'username_telegram', label_trans: 'reg.username_telegram' }),
|
||||
AddCol({ name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
|
||||
@@ -104,6 +104,7 @@ export const tools = {
|
||||
|
||||
localStorage: {
|
||||
verified_email: 'vf',
|
||||
made_gift: 'mg',
|
||||
wasAlreadySubOnDb: 'sb',
|
||||
categorySel: 'cs',
|
||||
isLogged: 'ilog',
|
||||
@@ -1387,8 +1388,13 @@ export const tools = {
|
||||
},
|
||||
|
||||
visumenu(elem) { // : IListRoutes
|
||||
return (elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager))
|
||||
let visu = ((elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager))) && elem.active
|
||||
|
||||
if (elem.meta && elem.meta.requiresAuth) {
|
||||
visu = visu && tools.isLoggedToSystem()
|
||||
}
|
||||
return visu
|
||||
},
|
||||
|
||||
executefunc(myself: any, table, func: number, par: IParamDialog) {
|
||||
@@ -2522,6 +2528,12 @@ export const tools = {
|
||||
}
|
||||
,
|
||||
|
||||
getUrlSite() {
|
||||
const url = window.location.href
|
||||
const arr = url.split('/')
|
||||
return arr[0] + '//' + arr[2]
|
||||
},
|
||||
|
||||
SignIncheckErrors(mythis, riscode, ispageLogin ?: boolean) {
|
||||
// console.log('SignIncheckErrors: ', riscode)
|
||||
try {
|
||||
@@ -2874,6 +2886,17 @@ export const tools = {
|
||||
isChristmasHoliday() {
|
||||
const now = new Date()
|
||||
return ((now.getMonth() === 11 && now.getDate() > 20) || (now.getMonth() === 0 && now.getDate() < 8))
|
||||
},
|
||||
|
||||
CapitalizeAllWords(str) {
|
||||
const splitStr = str.toLowerCase().split(' ')
|
||||
for (var i = 0; i < splitStr.length; i++) {
|
||||
// You do not need to check if i is larger than splitStr length, as your for does that for you
|
||||
// Assign it back to the array
|
||||
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1)
|
||||
}
|
||||
// Directly return the joined string
|
||||
return splitStr.join(' ')
|
||||
}
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export { duplicate } from './duplicate'
|
||||
export { registereduser } from './registereduser'
|
||||
export { aportadorexist } from './aportadorexist'
|
||||
export { registeredemail } from './registeredemail'
|
||||
export { complexity } from './complexity'
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser } from '../../../validation'
|
||||
|
||||
export interface TSignup { signup: ISignupOptions, validationGroup: string[] }
|
||||
|
||||
export const validations = {
|
||||
signup: {
|
||||
repeatPassword: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password')
|
||||
},
|
||||
password: {
|
||||
complexity,
|
||||
required
|
||||
},
|
||||
username: {
|
||||
registereduser,
|
||||
required
|
||||
},
|
||||
name: {
|
||||
required
|
||||
},
|
||||
surname: {
|
||||
required
|
||||
},
|
||||
email: {
|
||||
email,
|
||||
registeredemail,
|
||||
required
|
||||
},
|
||||
terms: {
|
||||
required
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,8 @@ export default class Signup extends Vue {
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
|
||||
tools.setCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited)
|
||||
// if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
|
||||
// tools.setCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user