diff --git a/src/components/CreateMonth.vue b/src/components/CreateMonth.vue
index cb1d136..ff38d64 100644
--- a/src/components/CreateMonth.vue
+++ b/src/components/CreateMonth.vue
@@ -8,27 +8,27 @@
diff --git a/src/components/MonthPresentation.vue b/src/components/MonthPresentation.vue
index cecfb43..f2d88fa 100644
--- a/src/components/MonthPresentation.vue
+++ b/src/components/MonthPresentation.vue
@@ -8,32 +8,32 @@
{{ TheMonth.ca_theo ?? "∅"}}€
-
+
{{ TheMonth.ca_retro ?? "∅"}}€
-
+
{{ TheMonth.ca_react ?? "∅"}}€
-
+
{{ TheMonth.nbr_seances ?? "∅"}}
-
+
{{ TheMonth.retro ?? "∅"}}€
-
+
{{ TheMonth.remuneration ?? "∅"}}€
-
+
@@ -74,7 +74,7 @@ export default {
this.editing = !this.editing
},
save: function () {
- this.updateMonth({date: this.TheDate, month: this.monthCopy})
+ this.updateMonth({date: this.TheDate, month: {...this.monthCopy}})
this.toggleEdit()
},
cancel: function () {
diff --git a/src/store/travail/index.js b/src/store/travail/index.js
index dd6ead5..ad038af 100644
--- a/src/store/travail/index.js
+++ b/src/store/travail/index.js
@@ -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