feat(frontend): Kalender (Modul 25)

/calendar Monatsansicht mit Voelkerdaten aus Durchsichten, Aufgaben,
Behandlungen, Fuetterungen, Ernten und Koeniginnen-Zuweisungen;
Bienenstand-Filter, Monatsnavigation, Klick auf Ereignis fuehrt zum
verknuepften Objekt. Nav um Kalender-Link ergaenzt.
This commit is contained in:
Nick Szaunig committed 2026-08-22 22:39:48 +02:00
1 parent fef1177a2c
commit 9b078022ff
5 files changed
+254 -1

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
import { apiFetch } from "@/lib/auth/api-client";
import { CalendarEvent, CalendarQuery } from "./types";
export function fetchCalendarEvents(query: CalendarQuery): Promise<CalendarEvent[]> {
const params = new URLSearchParams({ from: query.from, to: query.to });
if (query.apiaryId) params.set("apiaryId", query.apiaryId);
return apiFetch<CalendarEvent[]>(`/calendar?${params.toString()}`);
}
@@ -0,0 +1,22 @@
export type CalendarEventType =
| "TASK"
| "INSPECTION"
| "TREATMENT"
| "FEEDING"
| "HARVEST"
| "QUEEN_ASSIGNMENT";
export interface CalendarEvent {
id: string;
type: CalendarEventType;
date: string;
title: string;
relatedType: string;
relatedId: string;
}
export interface CalendarQuery {
from: string;
to: string;
apiaryId?: string;
}