mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
take empty date strings into account
This commit is contained in:
@@ -814,7 +814,8 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
||||
},
|
||||
updateStartDate({commit}, payload) {
|
||||
const url = `/api/1.0/person/accompanying-course/${id}.json`;
|
||||
const body = { type: "accompanying_period", openingDate: { datetime: datetimeToISO(ISOToDate(payload)) }};
|
||||
const date = payload === null || payload === '' ? null : { datetime: datetimeToISO(ISOToDate(payload)) }
|
||||
const body = { type: "accompanying_period", openingDate: date};
|
||||
return makeFetch('PATCH', url, body)
|
||||
.then((response) => {
|
||||
commit('updateStartDate', response.openingDate);
|
||||
|
Reference in New Issue
Block a user