diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index bcfa53e45..668385b8a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -439,18 +439,18 @@ export default { ]), startDate: { get() { - return dateToISO(this.$store.state.startDate); + return this.$store.state.startDate; }, set(v) { - this.$store.commit('setStartDate', ISOToDate(v)); + this.$store.commit('setStartDate', v); } }, endDate: { get() { - return dateToISO(this.$store.state.endDate); + return this.$store.state.endDate; }, set(v) { - this.$store.commit('setEndDate', ISOToDate(v)); + this.$store.commit('setEndDate', v); } }, note: { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue index 53e2b72f3..cad070de3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -309,26 +309,26 @@ export default { }, startDate: { get() { - return dateToISO(this.evaluation.startDate); + return this.evaluation.startDate; }, set(v) { - this.$store.commit('setEvaluationStartDate', { key: this.evaluation.key, date: ISOToDate(v) }); + this.$store.commit('setEvaluationStartDate', { key: this.evaluation.key, date: v }); } }, endDate: { get() { - return dateToISO(this.evaluation.endDate); + return this.evaluation.endDate; }, set(v) { - this.$store.commit('setEvaluationEndDate', { key: this.evaluation.key, date: ISOToDate(v) }); + this.$store.commit('setEvaluationEndDate', { key: this.evaluation.key, date: v }); } }, maxDate: { get() { - return dateToISO(this.evaluation.maxDate); + return this.evaluation.maxDate; }, set(v) { - this.$store.commit('setEvaluationMaxDate', { key: this.evaluation.key, date: ISOToDate(v) }); + this.$store.commit('setEvaluationMaxDate', { key: this.evaluation.key, date: v }); } }, warningInterval: { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 4ce0b8ebe..0bfe61d94 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -1,5 +1,5 @@ import { createStore } from 'vuex'; -import { datetimeToISO, ISOToDatetime, intervalDaysToISO, intervalISOToDays } from 'ChillMainAssets/chill/js/date.js'; +import { dateToISO, ISOToDate, datetimeToISO, ISOToDatetime, intervalDaysToISO, intervalISOToDays } from 'ChillMainAssets/chill/js/date.js'; import { findSocialActionsBySocialIssue } from 'ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js'; import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js'; import { fetchResults, makeFetch } from 'ChillMainAssets/lib/api/apiMethods.js'; @@ -13,9 +13,9 @@ const store = createStore({ state: { work: window.accompanyingCourseWork, startDate: window.accompanyingCourseWork.startDate !== null ? - ISOToDatetime(window.accompanyingCourseWork.startDate.datetime) : null, + dateToISO(new Date(window.accompanyingCourseWork.startDate.datetime)) : null, endDate: window.accompanyingCourseWork.endDate !== null ? - ISOToDatetime(window.accompanyingCourseWork.endDate.datetime) : null, + dateToISO(new Date(window.accompanyingCourseWork.endDate.datetime)) : null, note: window.accompanyingCourseWork.note, goalsPicked: window.accompanyingCourseWork.goals, goalsForAction: [], @@ -73,10 +73,10 @@ const store = createStore({ type: 'accompanying_period_work', id: state.work.id, startDate: state.startDate === null ? null : { - datetime: datetimeToISO(state.startDate) + datetime: datetimeToISO(ISOToDate(state.startDate)) }, endDate: state.endDate === null ? null : { - datetime: datetimeToISO(state.endDate) + datetime: datetimeToISO(ISOToDate(state.endDate)) }, note: state.note, persons: state.personsPicked.map(p => ({id: p.id, type: p.type})), @@ -110,9 +110,9 @@ const store = createStore({ id: e.evaluation.id, type: e.evaluation.type }, - startDate: e.startDate !== null ? { datetime: datetimeToISO(e.startDate) } : null, - endDate: e.endDate !== null ? { datetime: datetimeToISO(e.endDate) } : null, - maxDate: e.maxDate !== null ? { datetime: datetimeToISO(e.maxDate) } : null, + startDate: e.startDate !== null ? { datetime: datetimeToISO(ISOToDate(e.startDate)) } : null, + endDate: e.endDate !== null ? { datetime: datetimeToISO(ISOToDate(e.endDate)) } : null, + maxDate: e.maxDate !== null ? { datetime: datetimeToISO(ISOToDate(e.maxDate)) } : null, warningInterval: intervalDaysToISO(e.warningInterval), comment: e.comment, documents: e.documents