- added Aportador Solidario to registration

- added email_paypal and username_telegram
This commit is contained in:
Paolo Arena
2019-12-29 01:54:00 +01:00
parent 8beb8162dd
commit cf91d45427
23 changed files with 471 additions and 292 deletions

View File

@@ -2,7 +2,7 @@
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
<div>
<div v-if="!edit">
<div v-for="(mygallery, index) in listimages" :key="index" v-if="index === 0">
<div v-for="(mygallery, index) in getlistimages" :key="index" v-if="index === 0">
<div class="q-pa-md q-gutter-md">
<q-card :class="getclass">
<q-img :src="getsrcimg(mygallery)" :class="getclimg"

View File

@@ -87,7 +87,7 @@ export default class CGridTableRec extends Vue {
public undoVal() {
console.log('undoVal', 'colsel', this.colsel, 'valprec', this.valPrec, 'this.colkey', this.colkey, 'this.selected', this.rowsel)
console.table(this.serverData)
// console.table(this.serverData)
if (this.colsel) {
if (this.colsel.subfield !== '') {
if (this.rowsel[this.colsel.field] === undefined)
@@ -186,7 +186,7 @@ export default class CGridTableRec extends Vue {
}
public onRequest(props) {
console.log('onRequest', 'myfilter = ', this.myfilter)
// console.log('onRequest', 'myfilter = ', this.myfilter)
const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination
const myfilter = this.myfilter
@@ -225,7 +225,7 @@ export default class CGridTableRec extends Vue {
this.serverData = [...this.returnedData]
}
console.log('this.serverData', this.serverData)
// console.log('this.serverData', this.serverData)
// don't forget to update local pagination object
this.pagination.page = page
@@ -456,7 +456,7 @@ export default class CGridTableRec extends Vue {
}
}
console.log('this.tablesel', this.tablesel, 'mytab', mytab)
// console.log('this.tablesel', this.tablesel, 'mytab', mytab)
if (mytab) {
this.mytitle = mytab.label

View File

@@ -9,6 +9,7 @@ import MixinBase from '../../mixins/mixin-base'
import { fieldsTable } from '../../store/Modules/fieldsTable'
import { IColGridTable } from '../../model'
import { CMySelect } from '../CMySelect'
import { GlobalStore, UserStore } from '../../store/Modules'
@Component({
name: 'CMyFieldDb',
@@ -18,10 +19,12 @@ import { CMySelect } from '../CMySelect'
export default class CMyFieldDb extends MixinBase {
@Prop({ required: true }) public title
@Prop({ required: true }) public mykey: string
@Prop({ required: false, default: '' }) public mysubkey: string
@Prop({ required: true }) public type: number
@Prop({ required: false, default: false }) public serv: boolean
@Prop({ required: false, default: false }) public disable: boolean
@Prop({ required: false, default: '' }) public jointable: string
@Prop({ required: false, default: '' }) public table: string
public $t
public myvalue = ''
@@ -29,7 +32,7 @@ export default class CMyFieldDb extends MixinBase {
public canEdit: boolean = true
public created() {
this.myvalue = this.getValDb(this.mykey, this.serv)
this.myvalue = this.getValDb(this.mykey, this.serv, '', this.table, this.mysubkey)
this.col.jointable = this.jointable
this.col.fieldtype = this.type
this.col.label = this.title
@@ -95,7 +98,7 @@ export default class CMyFieldDb extends MixinBase {
public savefield(value, initialval) {
this.myvalue = value
this.setValDb(this.mykey, this.myvalue, this.type, this.serv)
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey)
}
}

View File

@@ -6,6 +6,12 @@
</CGallery>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.image">
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else>
<!-- Edit Value -->
<span v-if="col.fieldtype === tools.FieldType.date">

View File

@@ -1,73 +1,73 @@
<template>
<div>
<div class="text-center">
<p>
<logo></logo>
</p>
<div>
<div class="text-center">
<p>
<logo></logo>
</p>
</div>
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
<form>
<div class="q-gutter-xs">
<q-input
v-model="signin.username"
rounded outlined dense
@blur="$v.signin.username.$touch"
:error="$v.signin.username.$error"
:error-message="`${errorMsg('username', $v.signin.username)}`"
:label="$t('reg.username_login')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signin.password"
type="password"
rounded outlined dense
@blur="$v.signin.password.$touch"
:error="$v.signin.password.$error"
:error-message="`${errorMsg('password', $v.signin.password)}`"
:label="$t('reg.password')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<div class="text-center" style="margin-bottom: 10px;">
<a :href="getlinkforgetpwd" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
</div>
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
<form>
<div class="q-gutter-xs">
<q-input
v-model="signin.username"
rounded outlined dense
@blur="$v.signin.username.$touch"
:error="$v.signin.username.$error"
:error-message="`${errorMsg('username', $v.signin.username)}`"
:label="$t('reg.username_login')">
<!--<q-card class="flex flex-center">-->
<!--&lt;!&ndash;<q-btn v-if="$myconfig.socialLogin.facebook" :loading="loading" class="q-mb-md q-mr-md" rounded icon="fab fa-facebook-f" size="sm" color="blue-10" text-color="white" @click="facebook" :label="$t('components.authentication.login.facebook')"/>&ndash;&gt;-->
<!--&lt;!&ndash;-->
<!--<q-btn v-if="$myconfig.socialLogin.facebook" class="q-mb-md q-mr-md" rounded icon="fab fa-facebook-f" size="sm" color="blue-10" text-color="white" @click="facebook" :label="$t('components.authentication.login.facebook')"/>-->
<!--<q-btn v-if="$myconfig.socialLogin.google" class="q-mb-md q-mr-md" rounded icon="fab fa-google" size="sm" color="deep-orange-14" text-color="white" @click="google" :label="$t('components.authentication.login.google')"/>-->
<!--&ndash;&gt;-->
<!--</q-card>-->
<div align="center">
<q-btn rounded size="md" color="primary" @click="submit"
:disable="$v.$error || iswaitingforRes">{{$t('login.enter')}}
</q-btn>
</div>
<div v-if="static_data.functionality.ENABLE_REGISTRATION" align="center" style="margin-top:10px;">
<q-btn flat rounded size="md" color="primary" to="/signup">{{$t('reg.submit')}}
</q-btn>
</div>
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signin.password"
type="password"
rounded outlined dense
@blur="$v.signin.password.$touch"
:error="$v.signin.password.$error"
:error-message="`${errorMsg('password', $v.signin.password)}`"
:label="$t('reg.password')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<div class="text-center" style="margin-bottom: 10px;">
<a :href="getlinkforgetpwd" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
</div>
<!--<q-card class="flex flex-center">-->
<!--&lt;!&ndash;<q-btn v-if="$myconfig.socialLogin.facebook" :loading="loading" class="q-mb-md q-mr-md" rounded icon="fab fa-facebook-f" size="sm" color="blue-10" text-color="white" @click="facebook" :label="$t('components.authentication.login.facebook')"/>&ndash;&gt;-->
<!--&lt;!&ndash;-->
<!--<q-btn v-if="$myconfig.socialLogin.facebook" class="q-mb-md q-mr-md" rounded icon="fab fa-facebook-f" size="sm" color="blue-10" text-color="white" @click="facebook" :label="$t('components.authentication.login.facebook')"/>-->
<!--<q-btn v-if="$myconfig.socialLogin.google" class="q-mb-md q-mr-md" rounded icon="fab fa-google" size="sm" color="deep-orange-14" text-color="white" @click="google" :label="$t('components.authentication.login.google')"/>-->
<!--&ndash;&gt;-->
<!--</q-card>-->
<div align="center">
<q-btn rounded size="md" color="primary" @click="submit"
:disable="$v.$error || iswaitingforRes">{{$t('login.enter')}}
</q-btn>
</div>
<div v-if="static_data.functionality.ENABLE_REGISTRATION" align="center" style="margin-top:10px;">
<q-btn flat rounded size="md" color="primary" to="/signup">{{$t('reg.submit')}}
</q-btn>
</div>
</div>
</form>
</div>
</div>
</form>
</div>
</template>
<script lang="ts" src="./CSignIn.ts">
</script>
<style lang="scss" scoped>
@import './CSignIn.scss';
@import './CSignIn.scss';
</style>

View File

@@ -21,6 +21,7 @@ import { Logo } from '../../components/logo'
})
export default class CSignUp extends Vue {
@Prop({ required: false, default: false }) public adult: boolean
public $v
public $q
public $t: any
@@ -35,14 +36,23 @@ export default class CSignUp extends Vue {
surname: process.env.TEST_SURNAME || '',
password: process.env.TEST_PASSWORD || '',
repeatPassword: process.env.TEST_PASSWORD || '',
terms: !process.env.PROD
terms: !process.env.PROD,
}
public created() {
this.$v.$reset()
this.signup.aportador_solidario = tools.getCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited || process.env.TEST_APORTADOR)
}
@Watch('$route.params.invited')
public changeaportador() {
if (!this.signup.aportador_solidario)
this.signup.aportador_solidario = this.$route.params.invited
}
public mounted() {
}
get allowSubmit() {

View File

@@ -1,144 +1,169 @@
<template>
<div>
<div class="text-center">
<p>
<logo></logo>
</p>
</div>
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
<div class="q-gutter-xs">
<q-input
v-model="signup.email"
rounded outlined
@blur="$v.signup.email.$touch"
:error="$v.signup.email.$error"
:error-message="errorMsg('email', $v.signup.email)"
bottom-slots
debounce="1000"
:label="$t('reg.email')">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input>
<q-input
v-model="signup.username"
rounded outlined
@blur="$v.signup.username.$touch"
:error="$v.signup.username.$error"
bottom-slots
debounce="1000"
:error-message="errorMsg('username', $v.signup.username)"
:label="$t('reg.username')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.name"
rounded outlined
@blur="$v.signup.name.$touch"
:error="$v.signup.name.$error"
bottom-slots
debounce="1000"
:error-message="errorMsg('name', $v.signup.name)"
:label="$t('reg.name')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.surname"
rounded outlined
@blur="$v.signup.surname.$touch"
:error="$v.signup.surname.$error"
bottom-slots
debounce="1000"
:error-message="errorMsg('surname', $v.signup.surname)"
:label="$t('reg.surname')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.password"
type="password"
rounded outlined
@blur="$v.signup.password.$touch"
:error="$v.signup.password.$error"
:error-message="`${errorMsg('password', $v.signup.password)}`"
bottom-slots
:label="$t('reg.password')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<q-input
v-model="signup.repeatPassword"
type="password"
rounded outlined
@blur="$v.signup.repeatPassword.$touch"
:error="$v.signup.repeatPassword.$error"
:error-message="`${errorMsg('repeatpassword', $v.signup.repeatPassword)}`"
bottom-slots
:label="$t('reg.repeatPassword')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<!--:hint="$t('reg.tips.repeatpassword')"-->
<q-checkbox
v-model="signup.terms"
color="secondary"
@blur="$v.signup.terms.$touch"
:error="$v.signup.terms.$error"
:error-message="`${errorMsg('terms', $v.signup.terms)}`"
:label="$t('reg.terms')">
</q-checkbox>
<br>
<div class="wrapper">
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit'>
{{$t('reg.submit')}}
</q-btn>
</div>
</div>
<!--
<div align="center">
<q-btn rounded size="lg" color="primary" @click="submitOk" :disable="">{{$t('reg.submit')}}
</q-btn>
</div>
-->
<div>
<div class="text-center">
<p>
<logo></logo>
</p>
</div>
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
<div class="q-gutter-xs">
<q-input
:readonly="true"
v-model="signup.aportador_solidario"
rounded outlined dense
bottom-slots
:label="$t('reg.aportador_solidario')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.email"
rounded outlined
@blur="$v.signup.email.$touch"
:error="$v.signup.email.$error"
:error-message="errorMsg('email', $v.signup.email)"
bottom-slots
debounce="1000"
:label="$t('reg.email')">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input>
<q-input
v-model="signup.username"
rounded outlined
@blur="$v.signup.username.$touch"
:error="$v.signup.username.$error"
bottom-slots
debounce="1000"
:error-message="errorMsg('username', $v.signup.username)"
:label="$t('reg.username')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.name"
rounded outlined
@blur="$v.signup.name.$touch"
:error="$v.signup.name.$error"
bottom-slots
debounce="1000"
:error-message="errorMsg('name', $v.signup.name)"
:label="$t('reg.name')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.surname"
rounded outlined
@blur="$v.signup.surname.$touch"
:error="$v.signup.surname.$error"
bottom-slots
debounce="1000"
:error-message="errorMsg('surname', $v.signup.surname)"
:label="$t('reg.surname')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.password"
type="password"
rounded outlined
@blur="$v.signup.password.$touch"
:error="$v.signup.password.$error"
:error-message="`${errorMsg('password', $v.signup.password)}`"
bottom-slots
:label="$t('reg.password')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<q-input
v-model="signup.repeatPassword"
type="password"
rounded outlined
@blur="$v.signup.repeatPassword.$touch"
:error="$v.signup.repeatPassword.$error"
:error-message="`${errorMsg('repeatpassword', $v.signup.repeatPassword)}`"
bottom-slots
:label="$t('reg.repeatPassword')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<!--:hint="$t('reg.tips.repeatpassword')"-->
<q-checkbox
v-model="signup.terms"
color="secondary"
@blur="$v.signup.terms.$touch"
:error="$v.signup.terms.$error"
:error-message="`${errorMsg('terms', $v.signup.terms)}`"
:label="$t('reg.terms')">
</q-checkbox>
<q-checkbox
v-if="adult"
v-model="signup.onlyadult"
color="secondary"
@blur="$v.signup.onlyadult.$touch"
:error="$v.signup.onlyadult.$error"
:error-message="`${errorMsg('onlyadult', $v.signup.onlyadult)}`"
:label="$t('reg.onlyadult')">
</q-checkbox>
<br>
<div class="wrapper">
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit'>
{{$t('reg.submit')}}
</q-btn>
</div>
</div>
<!--
<div align="center">
<q-btn rounded size="lg" color="primary" @click="submitOk" :disable="">{{$t('reg.submit')}}
</q-btn>
</div>
-->
</div>
</template>
<script lang="ts" src="./CSignUp.ts">
</script>
<style lang="scss" scoped>
@import './CSignUp.scss';
@import './CSignUp.scss';
</style>

View File

@@ -308,7 +308,7 @@ export default class Header extends Vue {
}
get getappname() {
return tools.getappname(this, tools.isMobile())
return tools.getsuffisso() + tools.getappname(this, tools.isMobile())
}
public toggleanimation() {
@@ -368,4 +368,13 @@ export default class Header extends Vue {
this.rightDrawerOpen = false
this.$router.replace('/signup')
}
get getClassColorHeader() {
if (tools.isTest())
return 'bg-warning'
else if (tools.isDebug())
return 'bg-info'
else
return 'bg-primary'
}
}

View File

@@ -1,6 +1,6 @@
<template>
<div>
<q-header reveal elevated class="bg-primary">
<q-header reveal elevated :class="getClassColorHeader">
<q-toolbar
color="primary"
:glossy="$q.theme === 'mat'"
@@ -155,8 +155,8 @@
<!--<span class="text-white background-red" v-else> {{$t('reg.non_verificato')}} </span>-->
<div v-if="isLogged" id="user-actions" class="text-center">
<q-btn round color="primary" icon="person"></q-btn>
<q-btn round color="warning" icon="lock"></q-btn>
<q-btn round color="primary" icon="person" to="/profile"></q-btn>
<!--<q-btn round color="warning" icon="lock"></q-btn>-->
<q-btn round color="secondary" icon="exit_to_app" @click='logoutHandler'></q-btn>
</div>

View File

@@ -35,3 +35,4 @@ export * from './CGoogleMap'
export * from './COpenStreetMap'
export * from './CTitleBanner'
export * from './CGallery'
export * from './CProfile'