diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 1ed6770..a7302bb 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) this.serverData = [] @@ -382,7 +382,7 @@ export default class CGridTableRec extends Vue { public refresh() { this.serverData = [] - console.log('refresh') + // console.log('refresh') // console.log('this.search', this.search) if (!!this.search && this.search !== '') this.myfilter = this.search diff --git a/src/components/CTitleBanner/CTitleBanner.vue b/src/components/CTitleBanner/CTitleBanner.vue index 9ccc0dd..1e25413 100644 --- a/src/components/CTitleBanner/CTitleBanner.vue +++ b/src/components/CTitleBanner/CTitleBanner.vue @@ -1,32 +1,34 @@ diff --git a/src/components/Header/Header.ts b/src/components/Header/Header.ts index 13a88a7..76f38e9 100644 --- a/src/components/Header/Header.ts +++ b/src/components/Header/Header.ts @@ -340,7 +340,7 @@ export default class Header extends Vue { return UserStore.state.isLogged } - get isVerified() { + get isEmailVerified() { return UserStore.state.my.verified_email } diff --git a/src/components/Header/Header.vue b/src/components/Header/Header.vue index ac5671b..ac964c9 100644 --- a/src/components/Header/Header.vue +++ b/src/components/Header/Header.vue @@ -147,7 +147,7 @@ {{ $t('user.loggati') }} -
{{ +
{{ $t('components.authentication.email_verification.verify_email') }}
diff --git a/src/components/index.ts b/src/components/index.ts index 7761371..08704b4 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -36,3 +36,4 @@ export * from './COpenStreetMap' export * from './CTitleBanner' export * from './CGallery' export * from './CProfile' +export * from './CStatus' diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts index 295275e..648eeb6 100644 --- a/src/model/UserStore.ts +++ b/src/model/UserStore.ts @@ -20,6 +20,7 @@ export interface IUserProfile { teleg_id?: number teleg_checkcode?: number paymenttypes?: IPaymentType[] + manage_telegram?: boolean } export interface IPaymentType { diff --git a/src/statics/i18n.js b/src/statics/i18n.js index 35afde7..86557c6 100644 --- a/src/statics/i18n.js +++ b/src/statics/i18n.js @@ -124,6 +124,8 @@ const msgglobal = { country_pay: 'Paese di Destinazione Pagamenti', username_telegram: 'Username Telegram', teleg_id: 'Telegram ID', + teleg_checkcode: 'Codice Telegram', + manage_telegram: 'Gestori Telegram', paymenttype: 'Modalità di Pagamenti Disponbili', img: 'Immagine', date_reg: 'Data Reg.', @@ -506,6 +508,8 @@ const msgglobal = { username_telegram: 'Usuario Telegram', teleg_id: 'Telegram ID', paymenttype: 'Métodos de pago disponibles', + teleg_checkcode: 'Codice Telegram', + manage_telegram: 'Gestori Telegram', img: 'File image', date_reg: 'Fecha Reg.', perm: 'Permisos', @@ -877,6 +881,8 @@ const msgglobal = { username_telegram: 'Nom d\'utilisateur du Telegram', teleg_id: 'Telegram ID', paymenttype: 'Méthodes de paiement disponibles', + teleg_checkcode: 'Codice Telegram', + manage_telegram: 'Gestori Telegram', img: 'Fichier image', date_reg: 'Date Inscript.', perm: 'Autorisations', @@ -1248,6 +1254,8 @@ const msgglobal = { username_telegram: 'Username Telegram', teleg_id: 'Telegram ID', paymenttype: 'Available Payment Methods', + teleg_checkcode: 'Codice Telegram', + manage_telegram: 'Gestori Telegram', img: 'File Image', date_reg: 'Reg. Date', perm: 'Permissions', @@ -1619,6 +1627,8 @@ const msgglobal = { username_telegram: 'Username Telegram', teleg_id: 'Telegram ID', paymenttype: 'Available Payment Methods', + teleg_checkcode: 'Codice Telegram', + manage_telegram: 'Gestori Telegram', img: 'File Image', date_reg: 'Reg. Date', perm: 'Permissions', diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts index 0817e8a..4f956d6 100644 --- a/src/store/Modules/GlobalStore.ts +++ b/src/store/Modules/GlobalStore.ts @@ -788,30 +788,39 @@ namespace Actions { return await Api.SendReq('/loadsite/' + myuserid + '/' + process.env.APP_ID + '/' + showall, 'GET', null) .then((res) => { - CalendarStore.state.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : [] - CalendarStore.state.eventlist = (res.data.eventlist) ? res.data.eventlist : [] - CalendarStore.state.operators = (res.data.operators) ? res.data.operators : [] - CalendarStore.state.wheres = (res.data.wheres) ? res.data.wheres : [] - CalendarStore.state.contribtype = (res.data.contribtype) ? res.data.contribtype : [] - GlobalStore.state.settings = (res.data.settings) ? [...res.data.settings] : [] - GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : [] - GlobalStore.state.paymenttypes = (res.data.paymenttypes) ? [...res.data.paymenttypes] : [] - GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : [] + 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 : [] + CalendarStore.state.operators = (res.data.operators) ? res.data.operators : [] + CalendarStore.state.wheres = (res.data.wheres) ? res.data.wheres : [] + CalendarStore.state.contribtype = (res.data.contribtype) ? res.data.contribtype : [] + GlobalStore.state.settings = (res.data.settings) ? [...res.data.settings] : [] + GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : [] + GlobalStore.state.paymenttypes = (res.data.paymenttypes) ? [...res.data.paymenttypes] : [] + GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : [] - if (showall) { - GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : [] - GlobalStore.state.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : [] - GlobalStore.state.mypage = (res.data.mypage) ? [...res.data.mypage] : [] + if (showall) { + GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : [] + GlobalStore.state.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : [] + GlobalStore.state.mypage = (res.data.mypage) ? [...res.data.mypage] : [] + } + + if (res.data.myuser) { + UserStore.mutations.authUser(res.data.myuser) + + UserStore.mutations.updateLocalStorage(res.data.myuser) + } + + CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager + + if (res.data.myuser === null && UserStore.state.isLogged) { + // Fai Logout + UserStore.actions.logout() + GlobalStore.state.RightDrawerOpen = true + } } - if (res.data.myuser) { - UserStore.mutations.authUser(res.data.myuser) - - UserStore.mutations.updateLocalStorage(res.data.myuser) - } - - CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager - }) .catch((error) => { console.log('error dbLoad', error) diff --git a/src/store/Modules/UserStore.ts b/src/store/Modules/UserStore.ts index 80172ed..c84cc1d 100644 --- a/src/store/Modules/UserStore.ts +++ b/src/store/Modules/UserStore.ts @@ -48,6 +48,7 @@ export const DefaultProfile: IUserProfile = { username_telegram: '', teleg_id: 0, teleg_checkcode: 0, + manage_telegram: false, paymenttypes: [] } @@ -185,6 +186,12 @@ namespace Getters { }, 'getRefLink') + const isVerificato = b.read((mystate: IUserState) => { + const teleg_ok = mystate.my.profile.teleg_id > 0 + + return teleg_ok + }, 'isVerificato') + export const getters = { get isUserInvalid() { return isUserInvalid() @@ -231,6 +238,9 @@ namespace Getters { get getPaymenttypeById() { return getPaymenttypeById() }, + get isVerificato() { + return isVerificato() + }, } } @@ -680,6 +690,8 @@ namespace Actions { Mutations.mutations.updateLocalStorage(myuser) + GlobalStore.actions.loadSite() + } } diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index f7f845d..6997d1b 100644 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -406,6 +406,7 @@ export const fieldsTable = { AddCol({ name: 'profile.country_pay', field: 'profile', subfield: 'country_pay', label_trans: 'reg.country_pay', fieldtype: tools.FieldType.nationality }), AddCol({ name: 'profile.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id' }), AddCol({ name: 'profile.teleg_checkcode', field: 'profile', subfield: 'teleg_checkcode', label_trans: 'reg.teleg_checkcode' }), + AddCol({ name: 'profile.manage_telegram', field: 'profile', subfield: 'manage_telegram', label_trans: 'reg.manage_telegram', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'profile.paymenttypes', field: 'profile', subfield: 'paymenttypes', label_trans: 'reg.paymenttype', fieldtype: tools.FieldType.multiselect, jointable: 'paymenttypes' }), AddCol({ name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }), AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),