rdv: fix adding thirdparty when creating a rdv

This commit is contained in:
nobohan
2021-07-19 11:30:06 +02:00
parent 206347de91
commit 4b8736ae57
2 changed files with 14 additions and 10 deletions

View File

@@ -17,19 +17,18 @@ const removeIdFromValue = (string, id) => {
return str;
};
// const activity = {
// accompanyingPeriod: window.accompanyingPeriod,
// persons: [],
// thirdParties: [],
// users: []
// }; // TODO: get this object from window.activity ?
console.log(window.entity)
/*
* Assign missing keys for the ConcernedGroups component
*/
const mapEntity = (entity) => {
Object.assign(entity, {thirdParties: entity.professionals, users: entity.invites});
return entity;
};
const store = createStore({
strict: debug,
state: {
activity: window.entity,
activity: mapEntity(window.entity),
},
mutations: {