- Bot Telegram ...
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user