Fix update of timblock
This commit is contained in:
@@ -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 }) {
|
||||
|
||||
Reference in New Issue
Block a user