diff options
author | Mateja <mail@matejamaric.com> | 2021-03-19 14:16:32 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-03-19 15:45:07 +0100 |
commit | 1306d59960fadbd5637960e60b9a00f547a1aeb9 (patch) | |
tree | 07e7ff9670b57e8f1718c5cb5a8cc816a5c6673a /resources/js/components | |
parent | 074bff2e79d91610a936f329ac8f603049c3b334 (diff) | |
download | yota-laravel-1306d59960fadbd5637960e60b9a00f547a1aeb9.tar.gz yota-laravel-1306d59960fadbd5637960e60b9a00f547a1aeb9.zip |
Work on `reservation.vue` component:
- Use data properties instead of computed properties
- Use v-model for checkbox
Diffstat (limited to 'resources/js/components')
-rw-r--r-- | resources/js/components/reservation.vue | 8 |
1 files changed, 4 insertions, 4 deletions
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] } } } |