WIP Добавила даты в стор

This commit is contained in:
Daria Golova
2023-06-08 17:02:26 +03:00
parent b3d0bd77bb
commit cbc4ed5b51
5 changed files with 133 additions and 32 deletions

View File

@@ -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,