diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index a7302bb..f903dc7 100644 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -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 diff --git a/src/components/CImgText/CImgText.vue b/src/components/CImgText/CImgText.vue index f586807..b428c0d 100644 --- a/src/components/CImgText/CImgText.vue +++ b/src/components/CImgText/CImgText.vue @@ -1,21 +1,21 @@ diff --git a/src/components/CSignUp/CSignUp-validate.ts b/src/components/CSignUp/CSignUp-validate.ts index c16e274..3ed14ec 100644 --- a/src/components/CSignUp/CSignUp-validate.ts +++ b/src/components/CSignUp/CSignUp-validate.ts @@ -34,10 +34,6 @@ export const validations = { }, terms: { required - }, - aportador_solidario: { - aportadorexist, - required } } } diff --git a/src/components/CSignUp/CSignUp.ts b/src/components/CSignUp/CSignUp.ts index 5924589..cbcf403 100644 --- a/src/components/CSignUp/CSignUp.ts +++ b/src/components/CSignUp/CSignUp.ts @@ -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() } diff --git a/src/components/CSignUp/CSignUp.vue b/src/components/CSignUp/CSignUp.vue index b6ad582..850eef7 100644 --- a/src/components/CSignUp/CSignUp.vue +++ b/src/components/CSignUp/CSignUp.vue @@ -10,25 +10,6 @@
- - - - - - -
+
+
+
diff --git a/src/components/CTitle/CTitle.scss b/src/components/CTitle/CTitle.scss index abe3fa4..ab08308 100644 --- a/src/components/CTitle/CTitle.scss +++ b/src/components/CTitle/CTitle.scss @@ -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; diff --git a/src/components/CTitle/CTitle.ts b/src/components/CTitle/CTitle.ts index 88c1c82..93fb7de 100644 --- a/src/components/CTitle/CTitle.ts +++ b/src/components/CTitle/CTitle.ts @@ -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) + } } } diff --git a/src/components/CTitle/CTitle.vue b/src/components/CTitle/CTitle.vue index e8ebf82..6769394 100644 --- a/src/components/CTitle/CTitle.vue +++ b/src/components/CTitle/CTitle.vue @@ -4,7 +4,7 @@ :style="tools.styles_imgtitle(sizes)">
-

{{headtitle}}

+

diff --git a/src/components/Header/Header.ts b/src/components/Header/Header.ts index 76f38e9..7e7faf9 100644 --- a/src/components/Header/Header.ts +++ b/src/components/Header/Header.ts @@ -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 diff --git a/src/components/Header/Header.vue b/src/components/Header/Header.vue index ac964c9..0594815 100644 --- a/src/components/Header/Header.vue +++ b/src/components/Header/Header.vue @@ -124,7 +124,7 @@ :content-class="['bg-grey-1', 'q-pa-sm']" :content-style="{padding: '0px'}" > - + diff --git a/src/components/index.ts b/src/components/index.ts index 08704b4..c84c19b 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -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' diff --git a/src/layouts/drawer/drawer.ts b/src/layouts/drawer/drawer.ts index f979618..f7e3182 100644 --- a/src/layouts/drawer/drawer.ts +++ b/src/layouts/drawer/drawer.ts @@ -14,6 +14,8 @@ const namespace: string = 'Drawer' }) export default class Drawer extends Vue { + @Prop({ required: false, default: 'my-menu' }) public clBase: string + public $q public $t: any public user = null diff --git a/src/layouts/drawer/drawer.vue b/src/layouts/drawer/drawer.vue index 0319fc2..b46842c 100644 --- a/src/layouts/drawer/drawer.vue +++ b/src/layouts/drawer/drawer.vue @@ -1,6 +1,6 @@ diff --git a/src/layouts/menuone/menuOne.scss b/src/layouts/menuone/menuOne.scss index 395b2d5..633e0c9 100644 --- a/src/layouts/menuone/menuOne.scss +++ b/src/layouts/menuone/menuOne.scss @@ -57,6 +57,12 @@ font-size: 1rem; } +.my-menu-small, .my-menu-small > i{ + min-height: 40px; + min-width: 26px; + font-size: 0.75rem; +} + .isAdmin { color: red; } @@ -70,7 +76,7 @@ } .my-menu-icon{ - min-width: 26px; + min-width: 2px; font-size: 1rem; } @@ -95,3 +101,25 @@ .my-menu-icon-none > i{ 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; +} diff --git a/src/layouts/menuone/menuOne.ts b/src/layouts/menuone/menuOne.ts index cf8d5cc..472c9dd 100644 --- a/src/layouts/menuone/menuOne.ts +++ b/src/layouts/menuone/menuOne.ts @@ -1,5 +1,5 @@ import Vue from 'vue' -import { Watch } from 'vue-property-decorator' +import { Prop, Watch } from 'vue-property-decorator' import { GlobalStore } from '../../store/Modules' import { static_data } from '../../db/static_data' import { tools } from '../../store/Modules/tools' @@ -7,6 +7,7 @@ import { IListRoutes } from '@src/model' import { UserStore } from '@modules' export default class MenuOne extends Vue { + @Prop({ required: false, default: 'my-menu' }) public clBase: any @Watch('$route.path') private modifroute() { @@ -15,6 +16,10 @@ export default class MenuOne extends Vue { }) } + get clBaseint(){ + return this.clBase + } + // get currentRoutePath() { // return this.$route.path // } @@ -65,7 +70,7 @@ export default class MenuOne extends Vue { } public getmymenuclass(elem: IListRoutes) { - let menu = 'my-menu' + let menu = this.clBaseint if (elem.onlyAdmin) menu += ' isAdmin' diff --git a/src/layouts/menuone/menuOne.vue b/src/layouts/menuone/menuOne.vue index 1a4474e..4f2f1de 100644 --- a/src/layouts/menuone/menuOne.vue +++ b/src/layouts/menuone/menuOne.vue @@ -32,8 +32,22 @@ :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" + :class="`item item-link drawer-closer cursor-pointer ` + clBaseint" :label="tools.getLabelByItem(child2, mythis)"> + + + + - +
@@ -103,7 +118,7 @@ :label="tools.getLabelByItem(myitemmenu, mythis)" :icon="myitemmenu.materialIcon" expand-icon="none" - header-class="my-menu" + :header-class="clBaseint" active-class="my-menu-active"> diff --git a/src/mixins/mixin-base.ts b/src/mixins/mixin-base.ts index 24a3ab5..bf4fd05 100644 --- a/src/mixins/mixin-base.ts +++ b/src/mixins/mixin-base.ts @@ -37,23 +37,7 @@ export default class MixinBase extends MixinMetaTags { } public 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 - } - + return tools.getValDb(keystr, serv, def, table, subkey) } public async setValDb(key, value, type, serv: boolean, table?, subkey?) { diff --git a/src/mixins/mixin-operator.ts b/src/mixins/mixin-operator.ts index 7aa741c..1ce7ac6 100644 --- a/src/mixins/mixin-operator.ts +++ b/src/mixins/mixin-operator.ts @@ -3,9 +3,36 @@ import Vue from 'vue' import Component from 'vue-class-component' import { CalendarStore } from '../store/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() { return CalendarStore.state.operators } diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts index 5f40334..52e9915 100644 --- a/src/model/GlobalStore.ts +++ b/src/model/GlobalStore.ts @@ -191,6 +191,7 @@ export interface IListRoutes { meta?: any idelem?: string urlroute?: string + img?: string // ------------------------ faIcon?: string text?: string diff --git a/src/model/signup-option.ts b/src/model/signup-option.ts index d5269d8..880f0da 100644 --- a/src/model/signup-option.ts +++ b/src/model/signup-option.ts @@ -11,4 +11,5 @@ export interface ISignupOptions { terms?: boolean aportador_solidario?: string profile?: IUserProfile + already_registered: boolean } diff --git a/src/rootgen/admin/gallery/gallery.ts b/src/rootgen/admin/gallery/gallery.ts index 86bd5f4..9dceca7 100644 --- a/src/rootgen/admin/gallery/gallery.ts +++ b/src/rootgen/admin/gallery/gallery.ts @@ -9,7 +9,6 @@ import { colgallery } from '@src/store/Modules/fieldsTable' import { CImgText } from '../../../components/CImgText/index' import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components' -import MixinMetaTags from '../../../../../associazioneShen/src/mixins/mixin-metatags' import MixinBase from '../../../mixins/mixin-base' @Component({ diff --git a/src/statics/i18n.js b/src/statics/i18n.js index 86557c6..29ff55d 100644 --- a/src/statics/i18n.js +++ b/src/statics/i18n.js @@ -18,6 +18,7 @@ const msgglobal = { eventlist: 'Le tue Prenotazioni', usereventlist: 'Prenotazioni Utenti', userlist: 'Lista Utenti', + extralist: 'Lista Extra', tableslist: 'Lista Tabelle', newsletter: 'Newsletter', pages: 'Pagine', @@ -111,6 +112,9 @@ const msgglobal = { }, reg: { 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:', page_title: 'Registrazione', made_gift: 'Dono', @@ -131,6 +135,7 @@ const msgglobal = { date_reg: 'Data Reg.', perm: 'Permessi', username: 'Username (Pseudonimo)', + username_short: 'Username', name: 'Nome', surname: 'Cognome', username_login: 'Nome Utente o email', @@ -153,6 +158,7 @@ const msgglobal = { char: 'caratteri', terms: 'Devi accettare le condizioni, per continuare.', 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', aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.', sameaspassword: 'Le password devono essere identiche', @@ -494,6 +500,9 @@ const msgglobal = { }, reg: { 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:', page_title: 'Registro', made_gift: 'Don', @@ -514,6 +523,7 @@ const msgglobal = { date_reg: 'Fecha Reg.', perm: 'Permisos', username: 'Username (Apodo)', + username_short: 'Username', name: 'Nombre', surname: 'Apellido', username_login: 'Nombre usuario o email', @@ -536,6 +546,7 @@ const msgglobal = { char: 'caracteres', terms: 'Debes aceptar las condiciones, para continuar..', 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', 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', @@ -868,6 +879,9 @@ const msgglobal = { }, reg: { 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:', incorso: 'Inscription en cours...', made_gift: 'Doné', @@ -887,6 +901,7 @@ const msgglobal = { date_reg: 'Date Inscript.', perm: 'Autorisations', username: 'Username (Surnom)', + username_short: 'Username', name: 'Nom', surname: 'Prénom', username_login: 'Nom d\'utilisateur ou email', @@ -909,6 +924,7 @@ const msgglobal = { char: 'caractères', terms: 'Vous devez accepter les conditions, pour continuer..', 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é', 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', @@ -1241,6 +1257,9 @@ const msgglobal = { }, reg: { 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:', incorso: 'Registration please wait...', made_gift: 'Donated', @@ -1261,6 +1280,7 @@ const msgglobal = { perm: 'Permissions', username_login: 'Username or email', username: 'Username (Pseudonym)', + username_short: 'Username', name: 'Name', surname: 'Surname', password: 'Password', @@ -1282,6 +1302,7 @@ const msgglobal = { char: 'characters long', terms: 'You need to agree with the terms & conditions.', 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', aportador_not_exist: 'The username of the person who invited you is not present. Contact us.', sameaspassword: 'Passwords must be identical', @@ -1613,6 +1634,9 @@ const msgglobal = { }, reg: { 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:', page_title: 'Registration', made_gift: 'Donated', @@ -1634,6 +1658,7 @@ const msgglobal = { perm: 'Permissions', username_login: 'Username or email', username: 'Username (Pseudonym)', + username_short: 'Username', name: 'Name', surname: 'Surname', password: 'Password', @@ -1655,6 +1680,7 @@ const msgglobal = { char: 'characters long', terms: 'You need to agree with the terms & conditions.', 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', 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', diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts index 4f956d6..4f8de07 100644 --- a/src/store/Modules/GlobalStore.ts +++ b/src/store/Modules/GlobalStore.ts @@ -788,7 +788,7 @@ namespace Actions { return await Api.SendReq('/loadsite/' + myuserid + '/' + process.env.APP_ID + '/' + showall, 'GET', null) .then((res) => { - console.log('____________________________ res', res) + // console.log('____________________________ res', res) if (res.status === 200) { CalendarStore.state.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : [] CalendarStore.state.eventlist = (res.data.eventlist) ? res.data.eventlist : [] diff --git a/src/store/Modules/UserStore.ts b/src/store/Modules/UserStore.ts index c84cc1d..0b69d9c 100644 --- a/src/store/Modules/UserStore.ts +++ b/src/store/Modules/UserStore.ts @@ -40,7 +40,7 @@ export const DefaultProfile: IUserProfile = { img: '', nationality: '', intcode_cell: '', - cell: '', + cell: process.env.TEST_CELL || '', dateofbirth: new Date(), sex: 0, 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) { return await Api.SendReq('/news/load', 'POST', paramquery) @@ -892,6 +902,7 @@ namespace Actions { vreg: b.dispatch(vreg), unsubscribe: b.dispatch(unsubscribe), importemail: b.dispatch(importemail), + importExtraList: b.dispatch(importExtraList), newsletterload: b.dispatch(newsletterload), newsletter_setactivate: b.dispatch(newsletter_setactivate), getDashboard: b.dispatch(getDashboard), diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 6997d1b..bea9720 100644 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -187,7 +187,7 @@ const colTablePermission = [ 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: 'surname', label_trans: 'reg.surname' }), AddCol({ name: 'email', label_trans: 'reg.email' }), @@ -393,11 +393,15 @@ export const fieldsTable = { // IColGridTable colTableUsers: [ // 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: '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: '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.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' }), @@ -416,6 +420,30 @@ export const fieldsTable = { 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: [ { value: 'operators', diff --git a/src/store/Modules/serv_constants.ts b/src/store/Modules/serv_constants.ts index 111f5c6..b3c2e73 100644 --- a/src/store/Modules/serv_constants.ts +++ b/src/store/Modules/serv_constants.ts @@ -6,6 +6,7 @@ export const serv_constants = { RIS_CODE_EMAIL_ALREADY_VERIFIED: -5, RIS_CODE_EMAIL_VERIFIED: 1, + RIS_CODE_USER_EXTRALIST_NOTFOUND: -70, RIS_CODE_USERNAME_ALREADY_EXIST: -60, RIS_CODE_EMAIL_ALREADY_EXIST: -50, RIS_CODE_EMAIL_NOT_SENT: -40, diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index c2081ab..1b1ae18 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -49,6 +49,8 @@ export const tools = { getprefCountries: ['it', 'us', 'es', 'uk', 'fr', 'de', 'ch'], + APORTADOR_NONE: '------', + APORTADOR_SOLIDARIO: 'apsol', listBestColor: [ @@ -2136,8 +2138,7 @@ export const tools = { heightgallery(coeff) { // console.log('heightgallery') return tools.heightGallVal(coeff).toString() + 'px' - } - , + }, heightGallVal(coeff = 1.33) { let maxh2 = 0 @@ -2151,8 +2152,8 @@ export const tools = { myw -= 300 maxh2 = (myw / coeff) + 20 - if (maxh2 > 750) - maxh2 = 750 + if (maxh2 > 500) + maxh2 = 500 return maxh2 } @@ -2435,6 +2436,8 @@ export const tools = { }, getimgFullpathbysize(fileimg: string) { + if (!fileimg) + return { path: '', file: fileimg } const ind = fileimg.lastIndexOf('/') if (ind > 0) { return { path: fileimg.substring(0, ind + 1), file: fileimg.substring(ind + 1) } @@ -2551,7 +2554,7 @@ export const tools = { }, 3000) }).then(() => { setTimeout(() => { - console.log('HIDE...') + // console.log('HIDE...') mythis.$q.loading.hide() }, 500) tools.showNotif(mythis.$q, mythis.$t('login.errato'), { color: 'negative', icon: 'notifications' }) @@ -2586,8 +2589,14 @@ export const tools = { SignUpcheckErrors(mythis, riscode: number) { console.log('SignUpcheckErrors', riscode) + let endload = true + if (riscode === serv_constants.RIS_CODE_EMAIL_ALREADY_EXIST) { 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) { tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_username')) } else if (riscode === tools.ERR_SERVERFETCH) { @@ -2605,6 +2614,7 @@ export const tools = { tools.showNotif(mythis.$q, 'Errore num ' + riscode) } + return endload } , isCssColor(color) { @@ -2897,7 +2907,121 @@ export const tools = { } // Directly return the joined string 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() { // if (navigator.languages && navigator.languages.length > 0) { diff --git a/src/views/index.ts b/src/views/index.ts index a8d0358..f0fea56 100644 --- a/src/views/index.ts +++ b/src/views/index.ts @@ -1 +1,2 @@ export * from './admin/cfgServer' +export * from './admin/extralist' diff --git a/src/views/login/signup/signup.vue b/src/views/login/signup/signup.vue index 7cdda3a..f46b326 100644 --- a/src/views/login/signup/signup.vue +++ b/src/views/login/signup/signup.vue @@ -1,6 +1,6 @@