From 1306d59960fadbd5637960e60b9a00f547a1aeb9 Mon Sep 17 00:00:00 2001
From: Mateja <mail@matejamaric.com>
Date: Fri, 19 Mar 2021 14:16:32 +0100
Subject: Work on `reservation.vue` component:

- Use data properties instead of computed properties
- Use v-model for checkbox
---
 resources/js/components/reservation.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'resources/js/components/reservation.vue')

diff --git a/resources/js/components/reservation.vue b/resources/js/components/reservation.vue
index 85348bd..aa8b209 100644
--- a/resources/js/components/reservation.vue
+++ b/resources/js/components/reservation.vue
@@ -1,7 +1,7 @@
 <template>
   <tr>
     <td v-text="reservation.id"></td>
-    <td><input type="checkbox" :checked="reservation.approved"/></td>
+    <td><input type="checkbox" v-model="reservation.approved"/></td>
     <td><input type="text" v-model="reservation.operatorCall"></td>
     <td><input type="text" v-model="reservation.qso"></td>
     <td><input type="text" v-model="reservation.fromTime"></td>
@@ -23,9 +23,9 @@
 <script>
 export default {
   props: [ 'reservationIndex' ],
-  computed: {
-    reservation() {
-      return this.$store.getters.getData[this.reservationIndex];
+  data() {
+    return {
+      reservation: this.$store.getters.getData[this.reservationIndex]
     }
   }
 }
-- 
cgit v1.2.3

