feat(events): reliable holiday skipping for recurrences + UI badge; clean logs
Backend: generate EventException on create/update when skip_holidays or recurrence changes; emit RecurrenceException (EXDATE) with exact occurrence start time (UTC) API: return master events with RecurrenceRule + RecurrenceException Frontend: map RecurrenceException → recurrenceException; ensure SkipHolidays instances never render on holidays; place TentTree icon (black) next to main event icon via template Docs: update README and Copilot instructions for recurrence/holiday behavior Cleanup: remove dataSource and debug console logs
This commit is contained in:
@@ -8,10 +8,18 @@ export interface Event {
|
||||
extendedProps: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export async function fetchEvents(groupId: string, showInactive = false) {
|
||||
const res = await fetch(
|
||||
`/api/events?group_id=${encodeURIComponent(groupId)}&show_inactive=${showInactive ? '1' : '0'}`
|
||||
);
|
||||
export async function fetchEvents(
|
||||
groupId: string,
|
||||
showInactive = false,
|
||||
options?: { start?: Date; end?: Date; expand?: boolean }
|
||||
) {
|
||||
const params = new URLSearchParams();
|
||||
params.set('group_id', groupId);
|
||||
params.set('show_inactive', showInactive ? '1' : '0');
|
||||
if (options?.start) params.set('start', options.start.toISOString());
|
||||
if (options?.end) params.set('end', options.end.toISOString());
|
||||
if (options?.expand) params.set('expand', options.expand ? '1' : '0');
|
||||
const res = await fetch(`/api/events?${params.toString()}`);
|
||||
const data = await res.json();
|
||||
if (!res.ok || data.error) throw new Error(data.error || 'Fehler beim Laden der Termine');
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user