mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 09:03:48 +00:00
calendar app: fix error on users on startup
This commit is contained in:
@@ -81,6 +81,7 @@ export default {
|
||||
},
|
||||
addPersonsInvolved({commit, dispatch}, payload) {
|
||||
console.log('### action addPersonsInvolved', payload.result.type);
|
||||
console.log('### action addPersonsInvolved payload result', payload.result);
|
||||
switch (payload.result.type) {
|
||||
case 'person':
|
||||
let aPersons = document.getElementById("chill_activitybundle_activity_persons");
|
||||
|
@@ -91,6 +91,10 @@ export default {
|
||||
|
||||
return sources;
|
||||
},
|
||||
getInitialDate(state) {
|
||||
console.log('initialDate', state.activity.startDate);
|
||||
return state.activity.startDate;
|
||||
},
|
||||
/**
|
||||
* get the user data for a specific user
|
||||
*
|
||||
|
@@ -57,4 +57,8 @@ if (null !== store.getters.getMainUser) {
|
||||
store.commit('showUserOnCalendar', {ranges: true, remotes: true, user: store.getters.getMainUser});
|
||||
}
|
||||
|
||||
for (let u of store.state.activity.users) {
|
||||
store.commit('showUserOnCalendar', {ranges: false, remotes: false, user: u});
|
||||
}
|
||||
|
||||
export default store;
|
||||
|
@@ -19,9 +19,8 @@ const removeIdFromValue = (string, id) => {
|
||||
* Assign missing keys for the ConcernedGroups component
|
||||
*/
|
||||
const mapEntity = (entity) => {
|
||||
console.log('mapEntity', entity);
|
||||
let calendar = { ...entity};
|
||||
Object.assign(calendar, {thirdParties: entity.professionals, users: entity.invites});
|
||||
Object.assign(calendar, {thirdParties: entity.professionals});
|
||||
|
||||
if (entity.startDate !== null ) {
|
||||
calendar.startDate = ISOToDatetime(entity.startDate.datetime);
|
||||
@@ -35,8 +34,6 @@ const mapEntity = (entity) => {
|
||||
calendar.calendarRange.id = `range_${entity.calendarRange.id}`;
|
||||
}
|
||||
|
||||
console.log('new calendar object ', calendar);
|
||||
|
||||
return calendar;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user