Converted some schedule to use backend

This commit is contained in:
2024-05-04 23:17:05 -04:00
parent fa4d83e42d
commit 634cff507c
7 changed files with 83 additions and 60 deletions

View File

@@ -21,9 +21,12 @@ export const useScheduleStore = defineStore('schedule', () => {
if (!timeblocks.value) {
fetchTimeBlocks();
}
return timeblocks.value.filter((b) =>
compareDate(parsed(b.start) as Timestamp, parsed(date) as Timestamp)
);
return timeblocks.value.filter((b) => {
return compareDate(
parseDate(new Date(b.start)) as Timestamp,
parsed(date) as Timestamp
);
});
};
const getBoatReservations = (
@@ -113,9 +116,11 @@ export const useScheduleStore = defineStore('schedule', () => {
return {
reservations,
timeblocks,
getBoatReservations,
getConflictingReservations,
getTimeblocksForDate,
fetchTimeBlocks,
getNewId,
addOrCreateReservation,
isReservationOverlapped,