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