Fix generated data
This commit is contained in:
@@ -131,7 +131,7 @@ function changeEvent({ start }: { start: string }) {
|
|||||||
boatData.value.map((b) => {
|
boatData.value.map((b) => {
|
||||||
return (b.blocks = newBlocks.filter((block) => block.boatId === b.$id));
|
return (b.blocks = newBlocks.filter((block) => block.boatId === b.$id));
|
||||||
});
|
});
|
||||||
setTimeout(() => calendar.value?.scrollToTime('09:00'), 10); // Should figure out why we need this setTimeout...
|
setTimeout(() => calendar.value?.scrollToTime('09:00'), 100); // Should figure out why we need this setTimeout...
|
||||||
}
|
}
|
||||||
|
|
||||||
const disabledBefore = computed(() => {
|
const disabledBefore = computed(() => {
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ import {
|
|||||||
export const useScheduleStore = defineStore('schedule', () => {
|
export const useScheduleStore = defineStore('schedule', () => {
|
||||||
// TODO: Implement functions to dynamically pull this data.
|
// TODO: Implement functions to dynamically pull this data.
|
||||||
const reservations = ref<Reservation[]>(getSampleReservations());
|
const reservations = ref<Reservation[]>(getSampleReservations());
|
||||||
|
const timeblocks = ref<Timeblock[]>(getSampleTimeBlocks());
|
||||||
|
|
||||||
const getTimeblocksForDate = (date: string): Timeblock[] => {
|
const getTimeblocksForDate = (date: string): Timeblock[] => {
|
||||||
return getSampleTimeBlocks().filter((b) =>
|
return timeblocks.value.filter((b) =>
|
||||||
compareDate(parsed(b.start) as Timestamp, parsed(date) as Timestamp)
|
compareDate(parsed(b.start) as Timestamp, parsed(date) as Timestamp)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user