feat(scheduling): ignoreAllDayEvents option

This commit is contained in:
Ronni Baslund
2026-06-07 08:53:31 +02:00
parent 2cb13a1a14
commit f41475ac3b
7 changed files with 184 additions and 5 deletions
+8 -1
View File
@@ -25,6 +25,7 @@ interface EventType {
maximumDaysInFuture: number
availabilityScheduleId: string
locationType: string
ignoreAllDayEvents: boolean
isActive: boolean
}
interface MinuteInterval { startMinute: number; endMinute: number }
@@ -258,6 +259,7 @@ const etForm = reactive({
maximumDaysInFuture: 60,
availabilityScheduleId: '',
locationType: 'jitsi',
ignoreAllDayEvents: true,
})
const etEditingId = ref<string | null>(null)
const etSlugTouched = ref(false)
@@ -271,7 +273,7 @@ function openEt(et?: EventType) {
slotIntervalMinutes: et.slotIntervalMinutes, bufferBeforeMinutes: et.bufferBeforeMinutes,
bufferAfterMinutes: et.bufferAfterMinutes, minimumNoticeMinutes: et.minimumNoticeMinutes,
maximumDaysInFuture: et.maximumDaysInFuture, availabilityScheduleId: et.availabilityScheduleId,
locationType: et.locationType,
locationType: et.locationType, ignoreAllDayEvents: et.ignoreAllDayEvents ?? true,
})
etSlugTouched.value = true // don't auto-rewrite an existing slug
} else {
@@ -280,6 +282,7 @@ function openEt(et?: EventType) {
title: '', slug: '', durationMinutes: 30, slotIntervalMinutes: 15,
bufferBeforeMinutes: 0, bufferAfterMinutes: 0, minimumNoticeMinutes: 60,
maximumDaysInFuture: 60, availabilityScheduleId: availability.value[0]?._id ?? '', locationType: 'jitsi',
ignoreAllDayEvents: true,
})
etSlugTouched.value = false
}
@@ -608,6 +611,10 @@ const detailTabs = computed(() => [
<option value="in_person">In person</option><option value="custom">Custom</option>
</select>
</label>
<label class="daytoggle">
<input type="checkbox" v-model="etForm.ignoreAllDayEvents" />
Ignore all-day events when checking availability
</label>
</div>
<template #footer>
<UiButton variant="ghost" @click="etOpen = false">Cancel</UiButton>