WIP Добавила даты в стор
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
import * as moment from "moment/moment";
|
||||
moment.locale("ru");
|
||||
const state = () => ({
|
||||
currentDate: moment(),
|
||||
workingHours: {
|
||||
start: "8:00",
|
||||
end: "18:00",
|
||||
},
|
||||
selectedDates: {
|
||||
from: moment(),
|
||||
to: moment().clone().add(6, "day"),
|
||||
},
|
||||
});
|
||||
|
||||
const getters = {};
|
||||
|
||||
const actions = {};
|
||||
const actions = {
|
||||
changeSelectedDates({ commit }, dates) {
|
||||
commit("setSelectedDates", dates);
|
||||
},
|
||||
};
|
||||
|
||||
const mutations = {};
|
||||
const mutations = {
|
||||
setSelectedDates(state, data) {
|
||||
state.selectedDates = { ...data };
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
state,
|
||||
|
||||
Reference in New Issue
Block a user