Fix: output number in month form

This commit is contained in:
2021-08-04 21:17:40 +02:00
parent a021fe8093
commit 5683b57e24
3 changed files with 41 additions and 42 deletions

View File

@@ -161,38 +161,37 @@ const travail = {
updateMonth(state, { date, month }) {
state.months[date] = month
},
createMonth (state, { date, month }) {
state.months[date] = month
createMonth (state, { date, month }) {
state.months[date] = month
},
setRange(state, range) {
state.range = range
},
},
setRange(state, range) {
state.range = range
},
actions: {
updateMonth(context, { date, month }) {
// update month's datas
if (date in context.state.months) {
context.commit('updateMonth', { date, month })
} else {
console.log("This month does not exists")
}
},
createMonth(context, { date, month }) {
// Create a new month
if (!(date in context.state.months)) {
console.log(date)
context.commit('createMonth', { date, month })
console.log(context.state.months)
} else {
console.log("This month already exists")
}
},
setRange(context, range) {
context.commit("setRange", range)
},
},
actions: {
updateMonth(context, { date, month }) {
// update month's datas
if (date in context.state.months) {
context.commit('updateMonth', { date, month })
} else {
console.log("This month does not exists")
}
},
createMonth(context, { date, month }) {
// Create a new month
if (!(date in context.state.months)) {
console.log(date)
context.commit('createMonth', { date, month })
console.log(context.state.months)
} else {
console.log("This month already exists")
}
},
setRange(context, range) {
context.commit("setRange", range)
},
},
}
export default travail