fix: reactivity bug with ListReservationsPage
All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 2m32s

This commit is contained in:
2024-06-21 23:44:34 -04:00
parent ff8e54449a
commit a11b2a0568
5 changed files with 36 additions and 64 deletions

View File

@@ -22,7 +22,7 @@
class="q-pa-none">
<q-card
clas="q-ma-md"
v-if="!futureUserReservations.length">
v-if="!reservationStore.futureUserReservations.length">
<q-card-section>
<div class="text-h6">You don't have any upcoming bookings!</div>
<div class="text-h8">Why don't you go make one?</div>
@@ -41,7 +41,7 @@
</q-card>
<div v-else>
<div
v-for="reservation in futureUserReservations"
v-for="reservation in reservationStore.futureUserReservations"
:key="reservation.$id">
<ReservationCardComponent :modelValue="reservation" />
</div>
@@ -51,7 +51,7 @@
name="past"
class="q-pa-none">
<div
v-for="reservation in pastUserReservations"
v-for="reservation in reservationStore.pastUserReservations"
:key="reservation.$id">
<ReservationCardComponent :modelValue="reservation" />
</div>
@@ -63,7 +63,7 @@ import { useReservationStore } from 'src/stores/reservation';
import ReservationCardComponent from 'src/components/scheduling/ReservationCardComponent.vue';
import { onMounted, ref } from 'vue';
const { futureUserReservations, pastUserReservations } = useReservationStore();
const reservationStore = useReservationStore();
onMounted(() => useReservationStore().fetchUserReservations());