diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue index b6a0344e8..564fc74b7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/StartDate.vue @@ -28,14 +28,13 @@ export default { const date = e.target.previousSibling.value; this.$store.dispatch('updateStartDate', date) - .then(this.$toast.open({type: 'success', message: this.$t('startdate.update')})) .catch(({name, violations}) => { if (name === 'ValidationException' || name === 'AccessException') { violations.forEach((violation) => this.$toast.open({message: violation})); } else { this.$toast.open({message: 'An error occurred'}) } - }); + }) }, }, computed: { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 570a3b670..77cc4800e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -69,13 +69,14 @@ const store = createStore({ return []; }, buildPayload(state) { + console.log('end date', state.endDate); return { type: 'accompanying_period_work', id: state.work.id, - startDate: state.startDate === null ? null : { + startDate: state.startDate === null || state.startDate === '' ? null : { datetime: datetimeToISO(ISOToDate(state.startDate)) }, - endDate: state.endDate === null ? null : { + endDate: state.endDate === null || state.endDate === '' ? null : { datetime: datetimeToISO(ISOToDate(state.endDate)) }, note: state.note,