Fix update of timblock

This commit is contained in:
2024-04-30 17:04:55 -04:00
parent b66afb5692
commit 28600578f1
4 changed files with 48 additions and 43 deletions

View File

@@ -90,17 +90,13 @@ interface BoatData extends Boat {
const scheduleStore = useScheduleStore();
const boatStore = useBoatStore();
const selectedBlock = ref<Timeblock | null>(null);
const selectedBlock = defineModel<Timeblock | null>();
const selectedDate = ref(today());
const boatData = ref<BoatData[]>(boatStore.boats);
const calendar = ref<QCalendarDay | null>(null);
const emit = defineEmits<{
updateBoatTime: [block: Timeblock];
}>();
function handleSwipe({ ...event }) {
event.direction === 'right' ? calendar.value?.prev() : calendar.value?.next();
}
@@ -168,8 +164,6 @@ function selectBlock(event: MouseEvent, scope: DayBodyScope, block: Timeblock) {
selectedBlock.value === block
? (selectedBlock.value = null)
: (selectedBlock.value = block);
emit('updateBoatTime', block);
}
function changeEvent({ start }: { start: string }) {