From 865bb1f30a0c4567522525fb0be9fd99bd796ecf Mon Sep 17 00:00:00 2001
From: Mateja <mail@matejamaric.com>
Date: Sat, 13 Mar 2021 17:56:37 +0100
Subject: Adding boilerplate code.

---
 resources/js/components/reservations.vue | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 resources/js/components/reservations.vue

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

diff --git a/resources/js/components/reservations.vue b/resources/js/components/reservations.vue
new file mode 100644
index 0000000..48e54f5
--- /dev/null
+++ b/resources/js/components/reservations.vue
@@ -0,0 +1,9 @@
+<template>
+  
+</template>
+
+<script>
+export default {
+  
+}
+</script>
-- 
cgit v1.2.3


From 294146dd14c412e0cd6c715685bcbce0ff92b865 Mon Sep 17 00:00:00 2001
From: Mateja <mail@matejamaric.com>
Date: Wed, 17 Mar 2021 12:59:27 +0100
Subject: Started work on reservation components.

---
 resources/js/components/reservations.vue | 49 ++++++++++++++++++++++++++++++--
 1 file changed, 47 insertions(+), 2 deletions(-)

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

diff --git a/resources/js/components/reservations.vue b/resources/js/components/reservations.vue
index 48e54f5..278dfa4 100644
--- a/resources/js/components/reservations.vue
+++ b/resources/js/components/reservations.vue
@@ -1,9 +1,54 @@
 <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('fillReservations');
+  },
+  computed: {
+    reservations() {
+      return this.$store.getters.getData;
+    }
+  },
+  methods: {
+    filterChanged() {
+      this.$store.dispatch('fillReservations');
+    }
+  }
 }
 </script>
-- 
cgit v1.2.3


From 2f5e8adb8d310690db54aca55382f4733e337a85 Mon Sep 17 00:00:00 2001
From: Mateja <mail@matejamaric.com>
Date: Sat, 20 Mar 2021 19:42:18 +0100
Subject: Better names for Vuex actions and mutations.

---
 resources/js/components/reservations.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/resources/js/components/reservations.vue b/resources/js/components/reservations.vue
index 278dfa4..8849474 100644
--- a/resources/js/components/reservations.vue
+++ b/resources/js/components/reservations.vue
@@ -38,7 +38,7 @@ import reservationView from './reservation.vue';
 export default {
   components: { callSignFilter, reservationView },
   mounted() {
-    this.$store.dispatch('fillReservations');
+    this.$store.dispatch('pullReservations');
   },
   computed: {
     reservations() {
@@ -47,7 +47,7 @@ export default {
   },
   methods: {
     filterChanged() {
-      this.$store.dispatch('fillReservations');
+      this.$store.dispatch('pullReservations');
     }
   }
 }
-- 
cgit v1.2.3


From ce6dbf4d6f1340a02899faa3c4984b3493270ce8 Mon Sep 17 00:00:00 2001
From: Mateja <mail@matejamaric.com>
Date: Sun, 21 Mar 2021 20:31:12 +0100
Subject: Limit reservations table height to fit on desktop screens.

---
 resources/js/components/reservations.vue | 8 ++++++++
 1 file changed, 8 insertions(+)

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

diff --git a/resources/js/components/reservations.vue b/resources/js/components/reservations.vue
index 8849474..0c420b8 100644
--- a/resources/js/components/reservations.vue
+++ b/resources/js/components/reservations.vue
@@ -52,3 +52,11 @@ export default {
   }
 }
 </script>
+
+<style scoped>
+@media only screen and (min-width:961px) {
+  .table-responsive {
+    max-height: 80vh;
+  }
+}
+</style>
-- 
cgit v1.2.3

