diff options
author | Mateja Marić <mail@matejamaric.com> | 2021-03-22 15:21:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 15:21:40 +0100 |
commit | 6ab102bc4be617255d5eab77faebb1cada65b370 (patch) | |
tree | 09fcff5953cc6ca3702335e717ca72f865124d1c /resources/js/components/reservations.vue | |
parent | 21e9e94e76a21516edc3d1e4d0462a0ba75aafa4 (diff) | |
parent | db976a9fb0434df0095ea9f1b8858213d57e7535 (diff) | |
download | yota-laravel-2.0.0.tar.gz yota-laravel-2.0.0.zip |
Use Vue.js and Vuex.
Diffstat (limited to 'resources/js/components/reservations.vue')
-rw-r--r-- | resources/js/components/reservations.vue | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/resources/js/components/reservations.vue b/resources/js/components/reservations.vue new file mode 100644 index 0000000..0c420b8 --- /dev/null +++ b/resources/js/components/reservations.vue @@ -0,0 +1,62 @@ +<template> + <div> + <call-sign-filter @sign-changed="filterChanged()"></call-sign-filter> + + <div class="table-responsive mt-2"> + <table id="ajax-table" class="table table-striped table-bordered" style="white-space:nowrap;"><!-- table-hover --> + <thead class="thead-dark"> + <tr> + <th>ID</th> + <th>Approved</th> + <th>Operator Callsign</th> + <th>QSO</th> + <th>From</th> + <th>To</th> + <th>Special Callsign</th> + <th>Frequencies</th> + <th>Modes</th> + <th>Operator Name</th> + <th>Operator Email</th> + <th>Operator Phone</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + <reservation-view v-for="(reservation, index) in reservations" + :key="reservation.id" :reservation-index="index"> + </reservation-view> + </tbody> + </table> + </div> + </div> +</template> + +<script> +import callSignFilter from './call-sign-filter.vue'; +import reservationView from './reservation.vue'; + +export default { + components: { callSignFilter, reservationView }, + mounted() { + this.$store.dispatch('pullReservations'); + }, + computed: { + reservations() { + return this.$store.getters.getData; + } + }, + methods: { + filterChanged() { + this.$store.dispatch('pullReservations'); + } + } +} +</script> + +<style scoped> +@media only screen and (min-width:961px) { + .table-responsive { + max-height: 80vh; + } +} +</style> |