Rollen Chunk 6: Team-Tab mit Matrix-Kalender und Genehmigungen
Docker Image / test (push) Canceled after 0s
Docker Image / image (push) Canceled after 0s

This commit is contained in:
loki committed 2026-10-11 20:19:08 +02:00
1 parent 45cf022192
commit 8d0f6d8cc7
1 file changed
+33
+33
View File
@@ -239,3 +239,36 @@ export function saveSettings(
body: JSON.stringify(input),
});
}
export interface TeamMember {
id: string;
name: string;
email: string;
role: "admin" | "teamleiter" | "benutzer";
entitlementUnits: number;
carryoverUnits: number;
usedUnits: number;
pendingUnits: number;
remainingUnits: number;
requests: VacationRequest[];
trash: number;
sickDays: SickDay[];
weekdayTargets: Record<number, number> | null;
holidays: string[];
}
export function getTeam(
year: number,
): Promise<{ year: number; team: TeamMember[] }> {
return request(`/api/team?year=${year}`);
}
export function decideVacation(
id: number,
action: "genehmigen" | "ablehnen",
): Promise<{ status: string }> {
return request(`/api/vacation/${id}/status`, {
method: "POST",
body: JSON.stringify({ action }),
});
}