Rollen Chunk 6: Team-Tab mit Matrix-Kalender und Genehmigungen
This commit is contained in:
1 parent
45cf022192
commit
8d0f6d8cc7
1 file changed
+33
@@ -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 }),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user