- Doppia modalità di Registrazione con lista extra utenti

- fixed grid pagination
This commit is contained in:
Paolo Arena
2020-01-13 23:53:27 +01:00
parent 9b9dcbfde1
commit 6541a3a84e
29 changed files with 365 additions and 133 deletions

View File

@@ -206,7 +206,7 @@ export default class CGridTableRec extends Vue {
const startRow = (page - 1) * rowsPerPage const startRow = (page - 1) * rowsPerPage
const endRow = startRow + fetchCount const endRow = startRow + fetchCount
// console.log('startRow', startRow) console.log('startRow', startRow, 'endRow', endRow)
this.serverData = [] this.serverData = []
@@ -233,6 +233,8 @@ export default class CGridTableRec extends Vue {
this.pagination.sortBy = sortBy this.pagination.sortBy = sortBy
this.pagination.descending = descending this.pagination.descending = descending
console.log('this.pagination', this.pagination)
// ...and turn of loading indicator // ...and turn of loading indicator
this.loading = false this.loading = false
this.spinner_visible = false this.spinner_visible = false

View File

@@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<section class="padding_testo bg-white text-grey-10 text-justify" > <!-- v-scroll-reveal.reset --> <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 items-start q-col-gutter-xs imgtext">
<div class="imgtext__img"> <div class="row q-px-xs">
<img v-if="src" :src="src" class="myclimg" :style="style1" :alt="alt1"> <q-img v-if="src" :src="src" class="" :style="style1" :alt="alt1"></q-img>
<img v-if="src2" :src="src2" class="myclimg" :style="style1" :alt="alt2"> <q-img v-if="src2" :src="src2" class="" :style="style1" :alt="alt2"></q-img>
<div class="section_text"> <div class="section_text">
<slot></slot> <slot></slot>
</div> </div>

View File

@@ -34,10 +34,6 @@ export const validations = {
}, },
terms: { terms: {
required required
},
aportador_solidario: {
aportadorexist,
required
} }
} }
} }

View File

@@ -33,6 +33,7 @@ Vue.use(VueCountryCode)
export default class CSignUp extends MixinBase { export default class CSignUp extends MixinBase {
@Prop({ required: false, default: false }) public showadultcheck: boolean @Prop({ required: false, default: false }) public showadultcheck: boolean
@Prop({ required: false, default: false }) public showcell: boolean @Prop({ required: false, default: false }) public showcell: boolean
@Prop({ required: false, default: false }) public shownationality: boolean
public $v public $v
public $q public $q
public $t: any public $t: any
@@ -51,35 +52,24 @@ export default class CSignUp extends MixinBase {
repeatPassword: process.env.TEST_PASSWORD || '', repeatPassword: process.env.TEST_PASSWORD || '',
terms: !process.env.PROD, terms: !process.env.PROD,
profile: DefaultProfile, profile: DefaultProfile,
aportador_solidario: '' aportador_solidario: '',
already_registered: false
} }
public created() { public created() {
this.$v.$reset() 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() { 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) if (this.showadultcheck)
error = error || !this.iamadult error = error || !this.iamadult
if (this.showcell)
error = error || this.signup.profile.cell.length <= 6
return !error return !error
} }
@@ -125,9 +115,13 @@ export default class CSignUp extends MixinBase {
public errorMsg(cosa: string, item: any) { public errorMsg(cosa: string, item: any) {
try { try {
if (!item.$error) { return '' } if (!item.$error) {
return ''
}
// console.log('errorMsg', cosa, item) // 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 (cosa === 'repeatpassword') {
if (!item.sameAsPassword) { if (!item.sameAsPassword) {
@@ -159,10 +153,14 @@ export default class CSignUp extends MixinBase {
if (cosa === 'email') { if (cosa === 'email') {
// console.log("EMAIL " + item.isUnique); // console.log("EMAIL " + item.isUnique);
// console.log(item); // 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') { } else if (cosa === 'username') {
// console.log(item); // 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') { } else if (cosa === 'aportador_solidario') {
// console.log(item); // console.log(item);
if (!item.aportadorexist) { 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() { public submitOk() {
this.$v.signup.$touch() this.$v.signup.$touch()
@@ -221,9 +199,9 @@ export default class CSignUp extends MixinBase {
this.$q.loading.show({ message: this.$t('reg.incorso') }) this.$q.loading.show({ message: this.$t('reg.incorso') })
console.log(this.signup) console.log(this.signup)
UserStore.actions.signup(this.signup) return UserStore.actions.signup(tools.clone(this.signup))
.then((riscode) => { .then((riscode) => {
tools.SignUpcheckErrors(this, riscode) if (tools.SignUpcheckErrors(this, riscode))
this.$q.loading.hide() this.$q.loading.hide()
}).catch((error) => { }).catch((error) => {
console.log('ERROR = ' + error) console.log('ERROR = ' + error)
@@ -238,13 +216,13 @@ export default class CSignUp extends MixinBase {
this.signup.profile.iso2_cell = coderec.iso2 this.signup.profile.iso2_cell = coderec.iso2
} }
public selectcountry({name, iso2, dialCode}) { public selectcountry({ name, iso2, dialCode }) {
// console.log(name, iso2, dialCode) // console.log(name, iso2, dialCode)
this.signup.profile.nationality = iso2 this.signup.profile.nationality = iso2
this.countryname = name this.countryname = name
} }
public inputUsername(value){ public inputUsername(value) {
this.signup.username = value.trim() this.signup.username = value.trim()
} }

View File

@@ -10,25 +10,6 @@
<div class="q-gutter-sm"> <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 <q-input
v-model="signup.email" v-model="signup.email"
rounded outlined rounded outlined
@@ -130,6 +111,7 @@
<!--:hint="$t('reg.tips.repeatpassword')"--> <!--:hint="$t('reg.tips.repeatpassword')"-->
<q-input <q-input
v-if="shownationality"
v-model="countryname" v-model="countryname"
:readonly="true" :readonly="true"
rounded outlined rounded outlined
@@ -180,7 +162,9 @@
:label="$t('reg.onlyadult')"> :label="$t('reg.onlyadult')">
</q-checkbox> </q-checkbox>
<div v-if="showadultcheck">
<br> <br>
</div>
<div class="wrapper"> <div class="wrapper">
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit'> <q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit'>

View File

@@ -10,8 +10,19 @@
line-height: 3rem; line-height: 3rem;
text-shadow: .25rem .25rem .5rem black; text-shadow: .25rem .25rem .5rem black;
letter-spacing: .00937em; 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{ .q-img__content > div{
background: rgba(0,0,0,0.17) !important; background: rgba(0,0,0,0.17) !important;

View File

@@ -28,8 +28,12 @@ export default class CTitle extends Vue {
} }
get getaltimg() { get getaltimg() {
if (this.headtitle) {
return this.headtitle
} else {
const filefull = tools.getimgFullpathbysize(this.imgbackground) const filefull = tools.getimgFullpathbysize(this.imgbackground)
return tools.getaltimg(filefull.path, filefull.file, this.headtitle) return tools.getaltimg(filefull.path, filefull.file, this.headtitle)
} }
}
} }

View File

@@ -4,7 +4,7 @@
:style="tools.styles_imgtitle(sizes)"> :style="tools.styles_imgtitle(sizes)">
<div class="absolute-bottom text-body1 text-center" :style="styleadd"> <div class="absolute-bottom text-body1 text-center" :style="styleadd">
<h1 class="titletext">{{headtitle}}</h1> <h1 class="titletext" v-html="headtitle"></h1>
</div> </div>
</q-img> </q-img>

View File

@@ -29,6 +29,7 @@ import { CMyAvatar } from '../CMyAvatar'
export default class Header extends Vue { export default class Header extends Vue {
@Prop({ required: false, default: '' }) public extraContent: string @Prop({ required: false, default: '' }) public extraContent: string
@Prop({ required: false, default: '' }) public clBase: string
public $t public $t
public $v public $v
public $q public $q

View File

@@ -124,7 +124,7 @@
:content-class="['bg-grey-1', 'q-pa-sm']" :content-class="['bg-grey-1', 'q-pa-sm']"
:content-style="{padding: '0px'}" :content-style="{padding: '0px'}"
> >
<drawer></drawer> <drawer :clBase="clBase"></drawer>
</q-drawer> </q-drawer>

View File

@@ -3,9 +3,11 @@ export * from './todos'
export * from './logo' export * from './logo'
export * from './CProgress' export * from './CProgress'
export * from './CCard' export * from './CCard'
export * from './CCardOperator'
export * from './CCardCarousel' export * from './CCardCarousel'
export * from './CCardDiscipline' export * from './CCardDiscipline'
export * from './CBook' export * from './CBook'
export * from './CMyImg'
export * from './CMyPage' export * from './CMyPage'
export * from './CTitle' export * from './CTitle'
export * from './CMySelect' export * from './CMySelect'
@@ -21,6 +23,7 @@ export * from './CImgTitle'
export * from './CPreloadImages' export * from './CPreloadImages'
export * from './CSignIn' export * from './CSignIn'
export * from './CSignUp' export * from './CSignUp'
export * from './CSignUpNotevole'
export * from './CEventsCalendar' export * from './CEventsCalendar'
export * from './CMySingleEvent' export * from './CMySingleEvent'
export * from './CDate' export * from './CDate'

View File

@@ -14,6 +14,8 @@ const namespace: string = 'Drawer'
}) })
export default class Drawer extends Vue { export default class Drawer extends Vue {
@Prop({ required: false, default: 'my-menu' }) public clBase: string
public $q public $q
public $t: any public $t: any
public user = null public user = null

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<menu-one></menu-one> <menu-one :clBase="clBase"></menu-one>
</div> </div>
</template> </template>

View File

@@ -57,6 +57,12 @@
font-size: 1rem; font-size: 1rem;
} }
.my-menu-small, .my-menu-small > i{
min-height: 40px;
min-width: 26px;
font-size: 0.75rem;
}
.isAdmin { .isAdmin {
color: red; color: red;
} }
@@ -70,7 +76,7 @@
} }
.my-menu-icon{ .my-menu-icon{
min-width: 26px; min-width: 2px;
font-size: 1rem; font-size: 1rem;
} }
@@ -95,3 +101,25 @@
.my-menu-icon-none > i{ .my-menu-icon-none > i{
display: none; display: none;
} }
.clicon img, .clicon {
font-size: 16px;
}
.q-item__section--avatar{
min-width: 30px;
}
.q-item__section--side{
padding-right: 8px;
}
.q-item {
min-height: 20px;
}
.imgicon img {
font-size: 2.5rem !important;
border-radius: 8px;
}

View File

@@ -1,5 +1,5 @@
import Vue from 'vue' import Vue from 'vue'
import { Watch } from 'vue-property-decorator' import { Prop, Watch } from 'vue-property-decorator'
import { GlobalStore } from '../../store/Modules' import { GlobalStore } from '../../store/Modules'
import { static_data } from '../../db/static_data' import { static_data } from '../../db/static_data'
import { tools } from '../../store/Modules/tools' import { tools } from '../../store/Modules/tools'
@@ -7,6 +7,7 @@ import { IListRoutes } from '@src/model'
import { UserStore } from '@modules' import { UserStore } from '@modules'
export default class MenuOne extends Vue { export default class MenuOne extends Vue {
@Prop({ required: false, default: 'my-menu' }) public clBase: any
@Watch('$route.path') @Watch('$route.path')
private modifroute() { private modifroute() {
@@ -15,6 +16,10 @@ export default class MenuOne extends Vue {
}) })
} }
get clBaseint(){
return this.clBase
}
// get currentRoutePath() { // get currentRoutePath() {
// return this.$route.path // return this.$route.path
// } // }
@@ -65,7 +70,7 @@ export default class MenuOne extends Vue {
} }
public getmymenuclass(elem: IListRoutes) { public getmymenuclass(elem: IListRoutes) {
let menu = 'my-menu' let menu = this.clBaseint
if (elem.onlyAdmin) if (elem.onlyAdmin)
menu += ' isAdmin' menu += ' isAdmin'

View File

@@ -32,8 +32,22 @@
:icon="child2.materialIcon" :icon="child2.materialIcon"
active-class="my-menu-active" active-class="my-menu-active"
expand-icon-class="my-menu-icon-none" expand-icon-class="my-menu-icon-none"
class="item item-link drawer-closer cursor-pointer my-menu" :class="`item item-link drawer-closer cursor-pointer ` + clBaseint"
:label="tools.getLabelByItem(child2, mythis)"> :label="tools.getLabelByItem(child2, mythis)">
<template v-slot:header>
<q-item-section avatar>
<q-avatar v-if="child2.img" :icon="`img:`+child2.img" class="imgicon" font-size="2rem"></q-avatar>
<q-avatar v-else :icon="child2.materialIcon" color="primary" class="clicon" text-color="white"></q-avatar>
</q-item-section>
<q-item-section>
{{ tools.getLabelByItem(child2, mythis) }}
</q-item-section>
</template>
<q-expansion-item v-if="!!child2.routes2 && child3.active" <q-expansion-item v-if="!!child2.routes2 && child3.active"
v-for="(child3, index) in child2.routes2" v-for="(child3, index) in child2.routes2"
:key="index" :key="index"
@@ -44,8 +58,9 @@
:expand-icon="child3.icon" :expand-icon="child3.icon"
expand-icon-class="my-menu-separat" expand-icon-class="my-menu-separat"
active-class="my-menu-active" active-class="my-menu-active"
class="item item-link drawer-closer cursor-pointer my-menu" :class="`item item-link drawer-closer cursor-pointer ` + clBaseint"
:label="tools.getLabelByItem(child3, mythis)"> :label="tools.getLabelByItem(child3, mythis)">
</q-expansion-item> </q-expansion-item>
</q-expansion-item> </q-expansion-item>
<q-expansion-item <q-expansion-item
@@ -65,7 +80,7 @@
:icon="child3.materialIcon" :icon="child3.materialIcon"
active-class="my-menu-active" active-class="my-menu-active"
expand-icon-class="my-menu-icon-none" expand-icon-class="my-menu-icon-none"
class="item item-link drawer-closer cursor-pointer my-menu" :class="`item item-link drawer-closer cursor-pointer ` + clBaseint"
:label="tools.getLabelByItem(child3, mythis)"> :label="tools.getLabelByItem(child3, mythis)">
<q-expansion-item v-if="!!child3.routes2 && child3.active" <q-expansion-item v-if="!!child3.routes2 && child3.active"
v-for="(child4, index) in child3.routes2" v-for="(child4, index) in child3.routes2"
@@ -77,7 +92,7 @@
:expand-icon="child4.icon" :expand-icon="child4.icon"
expand-icon-class="my-menu-separat" expand-icon-class="my-menu-separat"
active-class="my-menu-active" active-class="my-menu-active"
class="item item-link drawer-closer cursor-pointer my-menu" :class="`item item-link drawer-closer cursor-pointer ` + clBaseint"
:label="tools.getLabelByItem(child4, mythis)"> :label="tools.getLabelByItem(child4, mythis)">
</q-expansion-item> </q-expansion-item>
</q-expansion-item> </q-expansion-item>
@@ -103,7 +118,7 @@
:label="tools.getLabelByItem(myitemmenu, mythis)" :label="tools.getLabelByItem(myitemmenu, mythis)"
:icon="myitemmenu.materialIcon" :icon="myitemmenu.materialIcon"
expand-icon="none" expand-icon="none"
header-class="my-menu" :header-class="clBaseint"
active-class="my-menu-active"> active-class="my-menu-active">
</q-expansion-item> </q-expansion-item>
</span> </span>

View File

@@ -37,23 +37,7 @@ export default class MixinBase extends MixinMetaTags {
} }
public getValDb(keystr, serv, def?, table?, subkey?) { public getValDb(keystr, serv, def?, table?, subkey?) {
if (table === 'users') { return tools.getValDb(keystr, serv, def, table, subkey)
if (keystr === 'profile') {
return UserStore.state.my.profile[subkey]
} else {
return UserStore.state.my[keystr]
}
}else {
const ris = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
if (ris === '')
if (def !== undefined)
return def
else
return ''
else
return ris
}
} }
public async setValDb(key, value, type, serv: boolean, table?, subkey?) { public async setValDb(key, value, type, serv: boolean, table?, subkey?) {

View File

@@ -3,9 +3,36 @@ import Vue from 'vue'
import Component from 'vue-class-component' import Component from 'vue-class-component'
import { CalendarStore } from '../store/Modules' import { CalendarStore } from '../store/Modules'
import { UserStore } from '@modules' import { UserStore } from '@modules'
import MixinMetaTags from './mixin-metatags'
import { CImgText, CTitle, CCardOperator } from '@components'
import { tools } from '@src/store/Modules/tools'
@Component({
components: { CImgText, CTitle, CCardOperator }
})
export default class MixinOperator extends MixinMetaTags {
public $q
public $t: any
get mythis() {
return this
}
get tools() {
return tools
}
get isEstate(){
const now = new Date()
return (now.getMonth() === 5) || (now.getMonth() === 6) || (now.getMonth() === 7) || (now.getMonth() === 8)
}
get isEstateRiprenderanno(){
const now = new Date()
return (now.getMonth() === 9)
}
@Component
export default class MixinOperator extends Vue {
public getOperators() { public getOperators() {
return CalendarStore.state.operators return CalendarStore.state.operators
} }

View File

@@ -191,6 +191,7 @@ export interface IListRoutes {
meta?: any meta?: any
idelem?: string idelem?: string
urlroute?: string urlroute?: string
img?: string
// ------------------------ // ------------------------
faIcon?: string faIcon?: string
text?: string text?: string

View File

@@ -11,4 +11,5 @@ export interface ISignupOptions {
terms?: boolean terms?: boolean
aportador_solidario?: string aportador_solidario?: string
profile?: IUserProfile profile?: IUserProfile
already_registered: boolean
} }

View File

@@ -9,7 +9,6 @@ import { colgallery } from '@src/store/Modules/fieldsTable'
import { CImgText } from '../../../components/CImgText/index' import { CImgText } from '../../../components/CImgText/index'
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components' import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
import MixinMetaTags from '../../../../../associazioneShen/src/mixins/mixin-metatags'
import MixinBase from '../../../mixins/mixin-base' import MixinBase from '../../../mixins/mixin-base'
@Component({ @Component({

View File

@@ -18,6 +18,7 @@ const msgglobal = {
eventlist: 'Le tue Prenotazioni', eventlist: 'Le tue Prenotazioni',
usereventlist: 'Prenotazioni Utenti', usereventlist: 'Prenotazioni Utenti',
userlist: 'Lista Utenti', userlist: 'Lista Utenti',
extralist: 'Lista Extra',
tableslist: 'Lista Tabelle', tableslist: 'Lista Tabelle',
newsletter: 'Newsletter', newsletter: 'Newsletter',
pages: 'Pagine', pages: 'Pagine',
@@ -111,6 +112,9 @@ const msgglobal = {
}, },
reg: { reg: {
aportador_solidario: 'Chi ti ha Invitato', aportador_solidario: 'Chi ti ha Invitato',
aportador_solidario_nome_completo:'A.S. Nome',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Mi sono già Iscritto sulla Chat Notevole, prima del 13 Gennaio',
reflink: 'Link da condividere ai tuoi amici:', reflink: 'Link da condividere ai tuoi amici:',
page_title: 'Registrazione', page_title: 'Registrazione',
made_gift: 'Dono', made_gift: 'Dono',
@@ -131,6 +135,7 @@ const msgglobal = {
date_reg: 'Data Reg.', date_reg: 'Data Reg.',
perm: 'Permessi', perm: 'Permessi',
username: 'Username (Pseudonimo)', username: 'Username (Pseudonimo)',
username_short: 'Username',
name: 'Nome', name: 'Nome',
surname: 'Cognome', surname: 'Cognome',
username_login: 'Nome Utente o email', username_login: 'Nome Utente o email',
@@ -153,6 +158,7 @@ const msgglobal = {
char: 'caratteri', char: 'caratteri',
terms: 'Devi accettare le condizioni, per continuare.', terms: 'Devi accettare le condizioni, per continuare.',
duplicate_email: 'l\'Email è già stata registrata', duplicate_email: 'l\'Email è già stata registrata',
user_extralist_not_found: 'Utente in archivio non trovato, inserire il Nome, Cognome e numero di cellulare inviato in precedenza',
duplicate_username: 'L\'Username è stato già utilizzato', duplicate_username: 'L\'Username è stato già utilizzato',
aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.', aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.',
sameaspassword: 'Le password devono essere identiche', sameaspassword: 'Le password devono essere identiche',
@@ -494,6 +500,9 @@ const msgglobal = {
}, },
reg: { reg: {
aportador_solidario: 'Aportador Solidario', aportador_solidario: 'Aportador Solidario',
aportador_solidario_nome_completo:'A.S. Nombre',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Ya me he registrado en el chat Notevole',
reflink: 'Enlaces para compartir con tus amigos:', reflink: 'Enlaces para compartir con tus amigos:',
page_title: 'Registro', page_title: 'Registro',
made_gift: 'Don', made_gift: 'Don',
@@ -514,6 +523,7 @@ const msgglobal = {
date_reg: 'Fecha Reg.', date_reg: 'Fecha Reg.',
perm: 'Permisos', perm: 'Permisos',
username: 'Username (Apodo)', username: 'Username (Apodo)',
username_short: 'Username',
name: 'Nombre', name: 'Nombre',
surname: 'Apellido', surname: 'Apellido',
username_login: 'Nombre usuario o email', username_login: 'Nombre usuario o email',
@@ -536,6 +546,7 @@ const msgglobal = {
char: 'caracteres', char: 'caracteres',
terms: 'Debes aceptar las condiciones, para continuar..', terms: 'Debes aceptar las condiciones, para continuar..',
duplicate_email: 'La email ya ha sido registrada', duplicate_email: 'La email ya ha sido registrada',
user_extralist_not_found: 'Usuario en el archivo no encontrado, inserte el nombre, apellido y número de teléfono enviado previamente',
duplicate_username: 'El nombre de usuario ya ha sido utilizado', 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.', 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', sameaspassword: 'Las contraseñas deben ser idénticas',
@@ -868,6 +879,9 @@ const msgglobal = {
}, },
reg: { reg: {
aportador_solidario: 'Contributeur de solidarité', aportador_solidario: 'Contributeur de solidarité',
aportador_solidario_nome_completo:'A.S. Nom',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Je me suis déjà inscrit sur le chat Notevole',
reflink: 'Liens à partager avec vos amis:', reflink: 'Liens à partager avec vos amis:',
incorso: 'Inscription en cours...', incorso: 'Inscription en cours...',
made_gift: 'Doné', made_gift: 'Doné',
@@ -887,6 +901,7 @@ const msgglobal = {
date_reg: 'Date Inscript.', date_reg: 'Date Inscript.',
perm: 'Autorisations', perm: 'Autorisations',
username: 'Username (Surnom)', username: 'Username (Surnom)',
username_short: 'Username',
name: 'Nom', name: 'Nom',
surname: 'Prénom', surname: 'Prénom',
username_login: 'Nom d\'utilisateur ou email', username_login: 'Nom d\'utilisateur ou email',
@@ -909,6 +924,7 @@ const msgglobal = {
char: 'caractères', char: 'caractères',
terms: 'Vous devez accepter les conditions, pour continuer..', terms: 'Vous devez accepter les conditions, pour continuer..',
duplicate_email: 'L\'email a déjà été enregistré', duplicate_email: 'L\'email a déjà été enregistré',
user_extralist_not_found: 'Utilisateur dans les archives introuvable, insérez le nom, le prénom et le numéro de téléphone portable envoyés précédemment',
duplicate_username: 'Le nom d\'utilisateur a déjà été utilisé', 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.', 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', sameaspassword: 'Les mots de passe doivent être identiques',
@@ -1241,6 +1257,9 @@ const msgglobal = {
}, },
reg: { reg: {
aportador_solidario: 'Solidarity Contributor', aportador_solidario: 'Solidarity Contributor',
aportador_solidario_nome_completo:'A.S. Name',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'I have already registered on the Notevole Chat',
reflink: 'Links to share to your friends:', reflink: 'Links to share to your friends:',
incorso: 'Registration please wait...', incorso: 'Registration please wait...',
made_gift: 'Donated', made_gift: 'Donated',
@@ -1261,6 +1280,7 @@ const msgglobal = {
perm: 'Permissions', perm: 'Permissions',
username_login: 'Username or email', username_login: 'Username or email',
username: 'Username (Pseudonym)', username: 'Username (Pseudonym)',
username_short: 'Username',
name: 'Name', name: 'Name',
surname: 'Surname', surname: 'Surname',
password: 'Password', password: 'Password',
@@ -1282,6 +1302,7 @@ const msgglobal = {
char: 'characters long', char: 'characters long',
terms: 'You need to agree with the terms & conditions.', terms: 'You need to agree with the terms & conditions.',
duplicate_email: 'Email was already registered', duplicate_email: 'Email was already registered',
user_extralist_not_found: 'User in archive not found, insert the Name, Surname and mobile phone sent previously',
duplicate_username: 'Username is already taken', duplicate_username: 'Username is already taken',
aportador_not_exist: 'The username of the person who invited you is not present. Contact us.', aportador_not_exist: 'The username of the person who invited you is not present. Contact us.',
sameaspassword: 'Passwords must be identical', sameaspassword: 'Passwords must be identical',
@@ -1613,6 +1634,9 @@ const msgglobal = {
}, },
reg: { reg: {
aportador_solidario: 'Solidarity Contributor', aportador_solidario: 'Solidarity Contributor',
aportador_solidario_nome_completo:'A.S. Name',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'I have already registered on the Notevole Chat',
reflink: 'Links to share to your friends:', reflink: 'Links to share to your friends:',
page_title: 'Registration', page_title: 'Registration',
made_gift: 'Donated', made_gift: 'Donated',
@@ -1634,6 +1658,7 @@ const msgglobal = {
perm: 'Permissions', perm: 'Permissions',
username_login: 'Username or email', username_login: 'Username or email',
username: 'Username (Pseudonym)', username: 'Username (Pseudonym)',
username_short: 'Username',
name: 'Name', name: 'Name',
surname: 'Surname', surname: 'Surname',
password: 'Password', password: 'Password',
@@ -1655,6 +1680,7 @@ const msgglobal = {
char: 'characters long', char: 'characters long',
terms: 'You need to agree with the terms & conditions.', terms: 'You need to agree with the terms & conditions.',
duplicate_email: 'Email was already registered', duplicate_email: 'Email was already registered',
user_extralist_not_found: 'User in archive not found, insert the Name, Surname and mobile phone sent previously',
duplicate_username: 'Username is already taken', 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.', 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', sameaspassword: 'Passwords must be identical',

View File

@@ -788,7 +788,7 @@ namespace Actions {
return await Api.SendReq('/loadsite/' + myuserid + '/' + process.env.APP_ID + '/' + showall, 'GET', null) return await Api.SendReq('/loadsite/' + myuserid + '/' + process.env.APP_ID + '/' + showall, 'GET', null)
.then((res) => { .then((res) => {
console.log('____________________________ res', res) // console.log('____________________________ res', res)
if (res.status === 200) { if (res.status === 200) {
CalendarStore.state.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : [] CalendarStore.state.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : []
CalendarStore.state.eventlist = (res.data.eventlist) ? res.data.eventlist : [] CalendarStore.state.eventlist = (res.data.eventlist) ? res.data.eventlist : []

View File

@@ -40,7 +40,7 @@ export const DefaultProfile: IUserProfile = {
img: '', img: '',
nationality: '', nationality: '',
intcode_cell: '', intcode_cell: '',
cell: '', cell: process.env.TEST_CELL || '',
dateofbirth: new Date(), dateofbirth: new Date(),
sex: 0, sex: 0,
country_pay: '', country_pay: '',
@@ -522,6 +522,16 @@ namespace Actions {
}) })
} }
async function importExtraList(context, paramquery) {
return await Api.SendReq('/users/import_extralist', 'POST', paramquery)
.then((res) => {
return res
}).catch((error) => {
return { numtot: 0, numadded: 0, numalreadyexisted: 0 }
})
}
async function newsletterload(context, paramquery) { async function newsletterload(context, paramquery) {
return await Api.SendReq('/news/load', 'POST', paramquery) return await Api.SendReq('/news/load', 'POST', paramquery)
@@ -892,6 +902,7 @@ namespace Actions {
vreg: b.dispatch(vreg), vreg: b.dispatch(vreg),
unsubscribe: b.dispatch(unsubscribe), unsubscribe: b.dispatch(unsubscribe),
importemail: b.dispatch(importemail), importemail: b.dispatch(importemail),
importExtraList: b.dispatch(importExtraList),
newsletterload: b.dispatch(newsletterload), newsletterload: b.dispatch(newsletterload),
newsletter_setactivate: b.dispatch(newsletter_setactivate), newsletter_setactivate: b.dispatch(newsletter_setactivate),
getDashboard: b.dispatch(getDashboard), getDashboard: b.dispatch(getDashboard),

View File

@@ -187,7 +187,7 @@ const colTablePermission = [
const colTableOperator = [ const colTableOperator = [
AddCol({ name: 'username', label_trans: 'reg.username' }), AddCol({ name: 'username', label_trans: 'reg.username_short' }),
AddCol({ name: 'name', label_trans: 'reg.name' }), AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }), AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'email', label_trans: 'reg.email' }), AddCol({ name: 'email', label_trans: 'reg.email' }),
@@ -393,11 +393,15 @@ export const fieldsTable = {
// IColGridTable // IColGridTable
colTableUsers: [ colTableUsers: [
// AddCol({ name: '_id', label_trans: 'reg.id' }), // AddCol({ name: '_id', label_trans: 'reg.id' }),
AddCol({ name: 'username', label_trans: 'reg.username' }), AddCol({ name: 'username', label_trans: 'reg.username_short' }),
AddCol({ name: 'name', label_trans: 'reg.name' }), AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }), AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'email', label_trans: 'reg.email' }), AddCol({ name: 'email', label_trans: 'reg.email' }),
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
AddCol({ name: 'aportador_solidario_nome_completo', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }), 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.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.iso2_cell', field: 'profile', subfield: 'iso2_cell', label_trans: 'reg.iso2_cell' }),
@@ -416,6 +420,30 @@ export const fieldsTable = {
AddCol(DuplicateRec) AddCol(DuplicateRec)
], ],
colTableExtraList: [
// AddCol({ name: '_id', label_trans: 'reg.id' }),
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
AddCol({ name: 'registered', label_trans: 'reg.registered', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
AddCol({ name: 'name_complete', label_trans: 'reg.name_complete' }),
AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'num_invitati', label_trans: 'reg.num_invitati', fieldtype: tools.FieldType.number }),
AddCol({ name: 'is_in_whatsapp', label_trans: 'reg.is_in_whatsapp', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'is_in_telegram', label_trans: 'reg.is_in_telegram', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'cell_complete', label_trans: 'reg.cell_complete' }),
AddCol({ name: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }),
AddCol({ name: 'aportador_solidario_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
AddCol({ name: 'aportador_solidario_originale_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'col_b', label_trans: 'reg.col_b', fieldtype: tools.FieldType.number }),
AddCol({ name: 'col_h', label_trans: 'reg.col_h', fieldtype: tools.FieldType.number }),
AddCol(DeleteRec),
AddCol(DuplicateRec)
],
tablesList: [ tablesList: [
{ {
value: 'operators', value: 'operators',

View File

@@ -6,6 +6,7 @@ export const serv_constants = {
RIS_CODE_EMAIL_ALREADY_VERIFIED: -5, RIS_CODE_EMAIL_ALREADY_VERIFIED: -5,
RIS_CODE_EMAIL_VERIFIED: 1, RIS_CODE_EMAIL_VERIFIED: 1,
RIS_CODE_USER_EXTRALIST_NOTFOUND: -70,
RIS_CODE_USERNAME_ALREADY_EXIST: -60, RIS_CODE_USERNAME_ALREADY_EXIST: -60,
RIS_CODE_EMAIL_ALREADY_EXIST: -50, RIS_CODE_EMAIL_ALREADY_EXIST: -50,
RIS_CODE_EMAIL_NOT_SENT: -40, RIS_CODE_EMAIL_NOT_SENT: -40,

View File

@@ -49,6 +49,8 @@ export const tools = {
getprefCountries: ['it', 'us', 'es', 'uk', 'fr', 'de', 'ch'], getprefCountries: ['it', 'us', 'es', 'uk', 'fr', 'de', 'ch'],
APORTADOR_NONE: '------',
APORTADOR_SOLIDARIO: 'apsol', APORTADOR_SOLIDARIO: 'apsol',
listBestColor: [ listBestColor: [
@@ -2136,8 +2138,7 @@ export const tools = {
heightgallery(coeff) { heightgallery(coeff) {
// console.log('heightgallery') // console.log('heightgallery')
return tools.heightGallVal(coeff).toString() + 'px' return tools.heightGallVal(coeff).toString() + 'px'
} },
,
heightGallVal(coeff = 1.33) { heightGallVal(coeff = 1.33) {
let maxh2 = 0 let maxh2 = 0
@@ -2151,8 +2152,8 @@ export const tools = {
myw -= 300 myw -= 300
maxh2 = (myw / coeff) + 20 maxh2 = (myw / coeff) + 20
if (maxh2 > 750) if (maxh2 > 500)
maxh2 = 750 maxh2 = 500
return maxh2 return maxh2
} }
@@ -2435,6 +2436,8 @@ export const tools = {
}, },
getimgFullpathbysize(fileimg: string) { getimgFullpathbysize(fileimg: string) {
if (!fileimg)
return { path: '', file: fileimg }
const ind = fileimg.lastIndexOf('/') const ind = fileimg.lastIndexOf('/')
if (ind > 0) { if (ind > 0) {
return { path: fileimg.substring(0, ind + 1), file: fileimg.substring(ind + 1) } return { path: fileimg.substring(0, ind + 1), file: fileimg.substring(ind + 1) }
@@ -2551,7 +2554,7 @@ export const tools = {
}, 3000) }, 3000)
}).then(() => { }).then(() => {
setTimeout(() => { setTimeout(() => {
console.log('HIDE...') // console.log('HIDE...')
mythis.$q.loading.hide() mythis.$q.loading.hide()
}, 500) }, 500)
tools.showNotif(mythis.$q, mythis.$t('login.errato'), { color: 'negative', icon: 'notifications' }) tools.showNotif(mythis.$q, mythis.$t('login.errato'), { color: 'negative', icon: 'notifications' })
@@ -2586,8 +2589,14 @@ export const tools = {
SignUpcheckErrors(mythis, riscode: number) { SignUpcheckErrors(mythis, riscode: number) {
console.log('SignUpcheckErrors', riscode) console.log('SignUpcheckErrors', riscode)
let endload = true
if (riscode === serv_constants.RIS_CODE_EMAIL_ALREADY_EXIST) { if (riscode === serv_constants.RIS_CODE_EMAIL_ALREADY_EXIST) {
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_email')) tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_email'))
} else if (riscode === serv_constants.RIS_CODE_USER_EXTRALIST_NOTFOUND) {
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_extralist_not_found'))
} else if (riscode === serv_constants.RIS_CODE_USERNAME_ALREADY_EXIST) { } else if (riscode === serv_constants.RIS_CODE_USERNAME_ALREADY_EXIST) {
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_username')) tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_username'))
} else if (riscode === tools.ERR_SERVERFETCH) { } else if (riscode === tools.ERR_SERVERFETCH) {
@@ -2605,6 +2614,7 @@ export const tools = {
tools.showNotif(mythis.$q, 'Errore num ' + riscode) tools.showNotif(mythis.$q, 'Errore num ' + riscode)
} }
return endload
} }
, ,
isCssColor(color) { isCssColor(color) {
@@ -2897,7 +2907,121 @@ export const tools = {
} }
// Directly return the joined string // Directly return the joined string
return splitStr.join(' ') return splitStr.join(' ')
},
getValDb(keystr, serv, def?, table?, subkey?) {
if (table === 'users') {
if (keystr === 'profile') {
return UserStore.state.my.profile[subkey]
} else {
return UserStore.state.my[keystr]
} }
} else {
const ris = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
if (ris === '')
if (def !== undefined)
return def
else
return ''
else
return ris
}
},
getkey(youtube, title, isnum) {
let mykey = 'MP4'
if (youtube)
mykey = 'YT'
if (isnum) {
mykey += '_NUM'
} else {
if (title)
mykey += '_TITLE_'
else
mykey += '_VIDEO_'
}
return mykey
},
heightgallvideo() {
const h = this.heightgallery(this.getValDb('YT_W', false) / this.getValDb('YT_H', false))
return h
},
getvideourl(index, youtube) {
const myvideo = this.getValDb(this.getkey(youtube, false, false) + index, false)
if (myvideo)
if (youtube)
return myvideo
else
return this.getpath(myvideo)
else
return ''
},
getvideonum(youtube) {
return this.getValDb(this.getkey(youtube, false, true), false)
},
getvideomp4yt(index) {
return [{ src: 'https://www.youtube.com/embed/' + this.getvideourl(index, true), type: 'video/mp4' }
]
},
getvideomp4src(index) {
return [{ src: this.getvideourl(index, false), type: 'video/mp4' }
]
},
getvideoyt(index) {
return 'https://www.youtube.com/embed/' + this.getvideourl(index, true)
},
getpath(myvideo) {
return 'statics/video/' + func_tools.getLocale() + '/' + myvideo
},
mygetarrValDb(keystr, serv) {
const myval = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
// console.log('AA: myval', myval)
try {
if (myval) {
// console.log(' Entro')
const myrec = JSON.parse(myval)
// console.log('*************** getarrValDb')
// console.table(myrec)
return myrec
} else {
// console.log('NO MYVAL')
return []
}
} catch (e) {
console.log('Errore: ', e)
return []
}
},
getvideotitle(index, youtube) {
const mykey = this.getkey(youtube, true, false) + index
const ris = this.mygetarrValDb(mykey, false)
return this.getelembylang(ris)
},
getvideoposter(index) {
return ''
},
clone(obj) {
if (null == obj || 'object' != typeof obj) return obj
const copy = obj.constructor()
for (const attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr]
}
return copy
},
// getLocale() { // getLocale() {
// if (navigator.languages && navigator.languages.length > 0) { // if (navigator.languages && navigator.languages.length > 0) {

View File

@@ -1 +1,2 @@
export * from './admin/cfgServer' export * from './admin/cfgServer'
export * from './admin/extralist'

View File

@@ -1,6 +1,6 @@
<template> <template>
<q-page padding class="signup"> <q-page padding class="signup">
<CSignUp :showadultcheck="false"> <CSignUp>
</CSignUp> </CSignUp>
</q-page> </q-page>