- Enable Edit Event into dialog form ... (and save to the db)
- Event: enabled drag and drop (date) - Q-Select components in every table field external: Where, Operators, etc... - CMyEditor: Add HTML Editor to the details field ! - Added button Color for change font color to the text. - Complete insert Events Site
This commit is contained in:
@@ -276,6 +276,8 @@ namespace Mutations {
|
||||
return CalendarStore.state.operators
|
||||
else if (table === 'wheres')
|
||||
return CalendarStore.state.wheres
|
||||
else if (table === 'contribtype')
|
||||
return CalendarStore.state.contribtype
|
||||
else if (table === 'bookings')
|
||||
return CalendarStore.state.bookedevent
|
||||
else if (table === 'users')
|
||||
@@ -493,6 +495,8 @@ namespace Actions {
|
||||
// console.log('loadAfterLogin')
|
||||
actions.clearDataAfterLoginOnlyIfActiveConnection()
|
||||
|
||||
await Actions.actions.loadSite()
|
||||
|
||||
state.arrConfig = await globalroutines(null, 'readall', 'config', null)
|
||||
}
|
||||
|
||||
@@ -624,10 +628,39 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
async function loadSite(context) {
|
||||
// console.log('CalendarStore: loadAfterLogin')
|
||||
// Load local data
|
||||
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
|
||||
|
||||
const showall = UserStore.state.isAdmin || UserStore.state.isManager ? '1' : '0'
|
||||
|
||||
const myuserid = (UserStore.state.userId) ? UserStore.state.userId : '0'
|
||||
|
||||
const ris = 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 : []
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error dbLoad', error)
|
||||
// UserStore.mutations.setErrorCatch(error)
|
||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
||||
})
|
||||
|
||||
return ris
|
||||
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
setConta: b.dispatch(setConta),
|
||||
createPushSubscription: b.dispatch(createPushSubscription),
|
||||
loadAfterLogin: b.dispatch(loadAfterLogin),
|
||||
loadSite: b.dispatch(loadSite),
|
||||
clearDataAfterLogout: b.dispatch(clearDataAfterLogout),
|
||||
clearDataAfterLoginOnlyIfActiveConnection: b.dispatch(clearDataAfterLoginOnlyIfActiveConnection),
|
||||
prova: b.dispatch(prova),
|
||||
|
||||
Reference in New Issue
Block a user