mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix datepicker for social action
This commit is contained in:
parent
8512a5e1bc
commit
8882c99f5a
@ -227,19 +227,18 @@ export default {
|
||||
},
|
||||
startDate: {
|
||||
get() {
|
||||
let d = this.$store.state.startDate;
|
||||
return dateToISO(d);
|
||||
return this.$store.state.startDate;
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('setStartDate', ISOToDate(value));
|
||||
this.$store.commit('setStartDate', value);
|
||||
}
|
||||
},
|
||||
endDate: {
|
||||
get() {
|
||||
return dateToISO(this.$store.state.endDate);
|
||||
return this.$store.state.endDate;
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('setEndDate', ISOToDate(value));
|
||||
this.$store.commit('setEndDate', value);
|
||||
}
|
||||
},
|
||||
setSocialIssue: {
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
import { createStore } from 'vuex';
|
||||
import { datetimeToISO } from 'ChillMainAssets/chill/js/date.js';
|
||||
import { datetimeToISO, dateToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
import { findSocialActionsBySocialIssue } from 'ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js';
|
||||
// import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
||||
import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods';
|
||||
@ -47,7 +47,7 @@ const store = createStore({
|
||||
id: state.socialActionPicked.id
|
||||
},
|
||||
startDate: {
|
||||
datetime: datetimeToISO(state.startDate)
|
||||
datetime: datetimeToISO(ISOToDate(state.startDate))
|
||||
},
|
||||
persons: []
|
||||
};
|
||||
@ -61,7 +61,7 @@ const store = createStore({
|
||||
|
||||
if (null !== state.endDate) {
|
||||
payload.endDate = {
|
||||
datetime: datetimeToISO(state.endDate)
|
||||
datetime: datetimeToISO(ISOToDate(state.endDate))
|
||||
};
|
||||
}
|
||||
|
||||
@ -111,6 +111,7 @@ const store = createStore({
|
||||
state.startDate = date;
|
||||
},
|
||||
setEndDate(state, date) {
|
||||
console.log(date)
|
||||
state.endDate = date;
|
||||
},
|
||||
setPersonsPickedIds(state, ids) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user