mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
fixes
This commit is contained in:
@@ -46,6 +46,12 @@ if (root === 'banner') {
|
||||
})
|
||||
.use(store)
|
||||
.use(i18n)
|
||||
.use(VueToast, {
|
||||
position: "bottom-right",
|
||||
type: "error",
|
||||
duration: 5000,
|
||||
dismissible: true
|
||||
})
|
||||
.component('banner', Banner)
|
||||
.mount('#banner-accompanying-course');
|
||||
});
|
||||
|
@@ -444,11 +444,11 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
||||
body.gender = payload.data.gender;
|
||||
console.log('id', payload.data.id, 'and body', body);
|
||||
patchPerson(payload.data.id, body)
|
||||
.then(person => new Promise((resolve, reject) => {
|
||||
console.log('patch person', person);
|
||||
commit('updatePerson', { target: payload.target, person: person });
|
||||
resolve();
|
||||
}));
|
||||
.then(person => new Promise((resolve, reject) => {
|
||||
console.log('patch person', person);
|
||||
commit('updatePerson', { target: payload.target, person: person });
|
||||
resolve();
|
||||
}));
|
||||
}
|
||||
else if (payload.type === 'thirdparty') {
|
||||
body.name = payload.data.text;
|
||||
@@ -457,10 +457,10 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
||||
body.address = { id: payload.data.address.address_id };
|
||||
console.log('id', payload.data.id, 'and body', body);
|
||||
patchThirdparty(payload.data.id, body)
|
||||
.then(thirdparty => new Promise((resolve, reject) => {
|
||||
console.log('patch thirdparty', thirdparty);
|
||||
commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
|
||||
resolve();
|
||||
.then(thirdparty => new Promise((resolve, reject) => {
|
||||
console.log('patch thirdparty', thirdparty);
|
||||
commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
|
||||
resolve();
|
||||
}));
|
||||
}
|
||||
},
|
||||
@@ -495,14 +495,18 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
||||
})
|
||||
},
|
||||
toggleConfidential({ commit }, payload) {
|
||||
const url = `/api/1.0/person/accompanying-course/${id}.json`
|
||||
const url = `/api/1.0/person/accompanying-course/${id}/confidential.json`
|
||||
const body = { type: "accompanying_period", confidential: payload }
|
||||
|
||||
return makeFetch('PATCH', url, body)
|
||||
console.log('url', url, 'body', body);
|
||||
|
||||
return makeFetch('POST', url, body)
|
||||
.then((response) => {
|
||||
console.log('response', response);
|
||||
commit('toggleConfidential', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error', error)
|
||||
commit('catchError', error);
|
||||
throw error;
|
||||
})
|
||||
@@ -773,10 +777,10 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
||||
"object": {
|
||||
"type": "accompanying_period",
|
||||
"id": id
|
||||
},
|
||||
"class": "Chill\\PersonBundle\\Entity\\AccompanyingPeriod",
|
||||
"roles": [
|
||||
"CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_CONFIDENTIAL"
|
||||
},
|
||||
"class": "Chill\\PersonBundle\\Entity\\AccompanyingPeriod",
|
||||
"roles": [
|
||||
"CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_CONFIDENTIAL"
|
||||
]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user