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

@@ -134,16 +134,16 @@ const createReservationFromInterval = (interval: Interval | Reservation) => {
function handleSwipe({ ...event }) {
event.direction === 'right' ? calendar.value?.prev() : calendar.value?.next();
}
function boatReservationEvents(
const boatReservationEvents = (
timestamp: Timestamp,
resource: Boat | undefined
) {
if (!resource) return [];
): Reservation[] => {
if (!resource) return [] as Reservation[];
return reservationStore.getReservationsByDate(
getDate(timestamp),
(resource as Boat).$id
);
}
).value;
};
function onToday() {
calendar.value.moveToToday();
}