- Doppia modalità di Registrazione con lista extra utenti
- fixed grid pagination
This commit is contained in:
@@ -206,7 +206,7 @@ export default class CGridTableRec extends Vue {
|
||||
const startRow = (page - 1) * rowsPerPage
|
||||
const endRow = startRow + fetchCount
|
||||
|
||||
// console.log('startRow', startRow)
|
||||
console.log('startRow', startRow, 'endRow', endRow)
|
||||
|
||||
this.serverData = []
|
||||
|
||||
@@ -233,6 +233,8 @@ export default class CGridTableRec extends Vue {
|
||||
this.pagination.sortBy = sortBy
|
||||
this.pagination.descending = descending
|
||||
|
||||
console.log('this.pagination', this.pagination)
|
||||
|
||||
// ...and turn of loading indicator
|
||||
this.loading = false
|
||||
this.spinner_visible = false
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="padding_testo bg-white text-grey-10 text-justify" > <!-- v-scroll-reveal.reset -->
|
||||
<div class="row items-start q-col-gutter-xs imgtext">
|
||||
<div class="imgtext__img">
|
||||
<img v-if="src" :src="src" class="myclimg" :style="style1" :alt="alt1">
|
||||
<img v-if="src2" :src="src2" class="myclimg" :style="style1" :alt="alt2">
|
||||
<div class="section_text">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div>
|
||||
<section class="padding_testo bg-white text-grey-10 text-justify"> <!-- v-scroll-reveal.reset -->
|
||||
<div class="row items-start q-col-gutter-xs imgtext">
|
||||
<div class="row q-px-xs">
|
||||
<q-img v-if="src" :src="src" class="" :style="style1" :alt="alt1"></q-img>
|
||||
<q-img v-if="src2" :src="src2" class="" :style="style1" :alt="alt2"></q-img>
|
||||
<div class="section_text">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CImgText.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CImgText.scss';
|
||||
@import './CImgText.scss';
|
||||
</style>
|
||||
|
||||
@@ -34,10 +34,6 @@ export const validations = {
|
||||
},
|
||||
terms: {
|
||||
required
|
||||
},
|
||||
aportador_solidario: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ Vue.use(VueCountryCode)
|
||||
export default class CSignUp extends MixinBase {
|
||||
@Prop({ required: false, default: false }) public showadultcheck: boolean
|
||||
@Prop({ required: false, default: false }) public showcell: boolean
|
||||
@Prop({ required: false, default: false }) public shownationality: boolean
|
||||
public $v
|
||||
public $q
|
||||
public $t: any
|
||||
@@ -51,35 +52,24 @@ export default class CSignUp extends MixinBase {
|
||||
repeatPassword: process.env.TEST_PASSWORD || '',
|
||||
terms: !process.env.PROD,
|
||||
profile: DefaultProfile,
|
||||
aportador_solidario: ''
|
||||
aportador_solidario: '',
|
||||
already_registered: false
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.$v.$reset()
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
|
||||
let error = this.$v.$error || this.$v.$invalid || this.signup.profile.cell.length <= 6
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
if (this.showadultcheck)
|
||||
error = error || !this.iamadult
|
||||
|
||||
if (this.showcell)
|
||||
error = error || this.signup.profile.cell.length <= 6
|
||||
|
||||
return !error
|
||||
}
|
||||
|
||||
@@ -125,9 +115,13 @@ export default class CSignUp extends MixinBase {
|
||||
|
||||
public errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) { return '' }
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
// console.log('errorMsg', cosa, item)
|
||||
if (item.$params.email && !item.email) { return this.$t('reg.err.email') }
|
||||
if (item.$params.email && !item.email) {
|
||||
return this.$t('reg.err.email')
|
||||
}
|
||||
|
||||
if (cosa === 'repeatpassword') {
|
||||
if (!item.sameAsPassword) {
|
||||
@@ -159,10 +153,14 @@ export default class CSignUp extends MixinBase {
|
||||
if (cosa === 'email') {
|
||||
// console.log("EMAIL " + item.isUnique);
|
||||
// console.log(item);
|
||||
if (!item.isUnique) { return this.$t('reg.err.duplicate_email') }
|
||||
if (!item.isUnique) {
|
||||
return this.$t('reg.err.duplicate_email')
|
||||
}
|
||||
} else if (cosa === 'username') {
|
||||
// console.log(item);
|
||||
if (!item.isUnique) { return this.$t('reg.err.duplicate_username') }
|
||||
if (!item.isUnique) {
|
||||
return this.$t('reg.err.duplicate_username')
|
||||
}
|
||||
} else if (cosa === 'aportador_solidario') {
|
||||
// console.log(item);
|
||||
if (!item.aportadorexist) {
|
||||
@@ -179,26 +177,6 @@ export default class CSignUp extends MixinBase {
|
||||
}
|
||||
}
|
||||
|
||||
public SignUpcheckErrors(riscode: number) {
|
||||
console.log('SignUpcheckErrors', riscode)
|
||||
if (riscode === serv_constants.RIS_CODE_EMAIL_ALREADY_EXIST) {
|
||||
tools.showNotif(this.$q, this.$t('reg.err.duplicate_email'))
|
||||
} else if (riscode === serv_constants.RIS_CODE_USERNAME_ALREADY_EXIST) {
|
||||
tools.showNotif(this.$q, this.$t('reg.err.duplicate_username'))
|
||||
} else if (riscode === tools.ERR_SERVERFETCH) {
|
||||
tools.showNotif(this.$q, this.$t('fetch.errore_server'))
|
||||
} else if (riscode === tools.ERR_GENERICO) {
|
||||
const msg = this.$t('fetch.errore_generico') + UserStore.mutations.getMsgError(riscode)
|
||||
tools.showNotif(this.$q, msg)
|
||||
} else if (riscode === tools.OK) {
|
||||
this.$router.push('/signin')
|
||||
tools.showNotif(this.$q, this.$t('components.authentication.email_verification.link_sent'), {color: 'warning', textColor: 'black'})
|
||||
} else {
|
||||
tools.showNotif(this.$q, 'Errore num ' + riscode)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public submitOk() {
|
||||
this.$v.signup.$touch()
|
||||
|
||||
@@ -221,14 +199,14 @@ export default class CSignUp extends MixinBase {
|
||||
this.$q.loading.show({ message: this.$t('reg.incorso') })
|
||||
|
||||
console.log(this.signup)
|
||||
UserStore.actions.signup(this.signup)
|
||||
return UserStore.actions.signup(tools.clone(this.signup))
|
||||
.then((riscode) => {
|
||||
tools.SignUpcheckErrors(this, riscode)
|
||||
this.$q.loading.hide()
|
||||
if (tools.SignUpcheckErrors(this, riscode))
|
||||
this.$q.loading.hide()
|
||||
}).catch((error) => {
|
||||
console.log('ERROR = ' + error)
|
||||
this.$q.loading.hide()
|
||||
})
|
||||
console.log('ERROR = ' + error)
|
||||
this.$q.loading.hide()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -238,13 +216,13 @@ export default class CSignUp extends MixinBase {
|
||||
this.signup.profile.iso2_cell = coderec.iso2
|
||||
}
|
||||
|
||||
public selectcountry({name, iso2, dialCode}) {
|
||||
public selectcountry({ name, iso2, dialCode }) {
|
||||
// console.log(name, iso2, dialCode)
|
||||
this.signup.profile.nationality = iso2
|
||||
this.countryname = name
|
||||
}
|
||||
|
||||
public inputUsername(value){
|
||||
public inputUsername(value) {
|
||||
this.signup.username = value.trim()
|
||||
}
|
||||
|
||||
|
||||
@@ -10,25 +10,6 @@
|
||||
|
||||
<div class="q-gutter-sm">
|
||||
|
||||
<q-input
|
||||
bg-color="lightblue"
|
||||
:readonly="true"
|
||||
v-model="signup.aportador_solidario"
|
||||
rounded outlined
|
||||
@blur="$v.signup.aportador_solidario.$touch"
|
||||
:error="$v.signup.aportador_solidario.$error"
|
||||
:error-message="errorMsg('aportador_solidario', $v.signup.aportador_solidario)"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
:label="$t('reg.aportador_solidario')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@@ -130,6 +111,7 @@
|
||||
<!--:hint="$t('reg.tips.repeatpassword')"-->
|
||||
|
||||
<q-input
|
||||
v-if="shownationality"
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded outlined
|
||||
@@ -180,7 +162,9 @@
|
||||
:label="$t('reg.onlyadult')">
|
||||
</q-checkbox>
|
||||
|
||||
<br>
|
||||
<div v-if="showadultcheck">
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit'>
|
||||
|
||||
@@ -10,8 +10,19 @@
|
||||
line-height: 3rem;
|
||||
text-shadow: .25rem .25rem .5rem black;
|
||||
letter-spacing: .00937em;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
.titletext {
|
||||
color: white;
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
line-height: 2rem;
|
||||
text-shadow: .25rem .25rem .5rem black;
|
||||
}
|
||||
}
|
||||
|
||||
.q-img__content > div{
|
||||
background: rgba(0,0,0,0.17) !important;
|
||||
|
||||
@@ -28,8 +28,12 @@ export default class CTitle extends Vue {
|
||||
}
|
||||
|
||||
get getaltimg() {
|
||||
const filefull = tools.getimgFullpathbysize(this.imgbackground)
|
||||
return tools.getaltimg(filefull.path, filefull.file, this.headtitle)
|
||||
if (this.headtitle) {
|
||||
return this.headtitle
|
||||
} else {
|
||||
const filefull = tools.getimgFullpathbysize(this.imgbackground)
|
||||
return tools.getaltimg(filefull.path, filefull.file, this.headtitle)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
:style="tools.styles_imgtitle(sizes)">
|
||||
|
||||
<div class="absolute-bottom text-body1 text-center" :style="styleadd">
|
||||
<h1 class="titletext">{{headtitle}}</h1>
|
||||
<h1 class="titletext" v-html="headtitle"></h1>
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import { CMyAvatar } from '../CMyAvatar'
|
||||
|
||||
export default class Header extends Vue {
|
||||
@Prop({ required: false, default: '' }) public extraContent: string
|
||||
@Prop({ required: false, default: '' }) public clBase: string
|
||||
public $t
|
||||
public $v
|
||||
public $q
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
:content-class="['bg-grey-1', 'q-pa-sm']"
|
||||
:content-style="{padding: '0px'}"
|
||||
>
|
||||
<drawer></drawer>
|
||||
<drawer :clBase="clBase"></drawer>
|
||||
|
||||
</q-drawer>
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@ export * from './todos'
|
||||
export * from './logo'
|
||||
export * from './CProgress'
|
||||
export * from './CCard'
|
||||
export * from './CCardOperator'
|
||||
export * from './CCardCarousel'
|
||||
export * from './CCardDiscipline'
|
||||
export * from './CBook'
|
||||
export * from './CMyImg'
|
||||
export * from './CMyPage'
|
||||
export * from './CTitle'
|
||||
export * from './CMySelect'
|
||||
@@ -21,6 +23,7 @@ export * from './CImgTitle'
|
||||
export * from './CPreloadImages'
|
||||
export * from './CSignIn'
|
||||
export * from './CSignUp'
|
||||
export * from './CSignUpNotevole'
|
||||
export * from './CEventsCalendar'
|
||||
export * from './CMySingleEvent'
|
||||
export * from './CDate'
|
||||
|
||||
Reference in New Issue
Block a user