diff options
Diffstat (limited to 'resources/js/components/reservation.vue')
-rw-r--r-- | resources/js/components/reservation.vue | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/resources/js/components/reservation.vue b/resources/js/components/reservation.vue index 5389e1a..ec430ab 100644 --- a/resources/js/components/reservation.vue +++ b/resources/js/components/reservation.vue @@ -25,21 +25,21 @@ export default { props: [ 'reservationIndex' ], data() { return { - reservation: {} + reservation: this.$store.getters.getDataRow(this.reservationIndex) } }, - mounted() { - this.reservation = _.cloneDeep(this.$store.getters.getData[this.reservationIndex]); - }, methods: { updateRow() { - + this.$store.dispatch('pushReservation', { + index: this.reservationIndex, + reservation: this.reservation + }); }, restoreRow() { - this.reservation = _.cloneDeep(this.$store.getters.getData[this.reservationIndex]); + this.reservation = this.$store.getters.getDataRow(this.reservationIndex); }, deleteRow() { - + this.$store.dispatch('removeReservation', this.reservationIndex); } } } |