bug fix for atemschutz

This commit is contained in:
Matthias Hochmeister
2026-03-01 19:19:12 +01:00
parent 2630224edd
commit 6495ca94d1
17 changed files with 5116 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
export type BuchungsArt = 'intern' | 'extern' | 'wartung' | 'reservierung' | 'sonstiges';
export const BUCHUNGS_ART_LABELS: Record<BuchungsArt, string> = {
intern: 'Intern',
extern: 'Extern',
wartung: 'Wartung/Service',
reservierung: 'Reservierung',
sonstiges: 'Sonstiges',
};
export const BUCHUNGS_ART_COLORS: Record<BuchungsArt, string> = {
intern: '#1976d2',
extern: '#e65100',
wartung: '#616161',
reservierung: '#7b1fa2',
sonstiges: '#00695c',
};
export interface FahrzeugBuchungListItem {
id: string;
fahrzeug_id: string;
fahrzeug_name: string;
fahrzeug_kennzeichen?: string | null;
titel: string;
buchungs_art: BuchungsArt;
beginn: string; // ISO
ende: string; // ISO
abgesagt: boolean;
gebucht_von_name?: string | null;
}
export interface FahrzeugBuchung extends FahrzeugBuchungListItem {
beschreibung?: string | null;
kontakt_person?: string | null;
kontakt_telefon?: string | null;
gebucht_von: string;
abgesagt_grund?: string | null;
erstellt_am: string;
aktualisiert_am: string;
}
export interface Fahrzeug {
id: string;
name: string;
kennzeichen?: string | null;
typ: string;
is_active: boolean;
archived_at?: string | null;
}
export interface CreateBuchungInput {
fahrzeugId: string;
titel: string;
beschreibung?: string | null;
beginn: string; // ISO
ende: string; // ISO
buchungsArt: BuchungsArt;
kontaktPerson?: string | null;
kontaktTelefon?: string | null;
}

View File

@@ -0,0 +1,64 @@
// ---------------------------------------------------------------------------
// Frontend events types — mirrors backend events model
// ---------------------------------------------------------------------------
export interface VeranstaltungKategorie {
id: string;
name: string;
beschreibung?: string | null;
farbe: string; // hex color e.g. '#1976d2'
icon?: string | null; // MUI icon name
erstellt_am: string;
aktualisiert_am: string;
}
export interface VeranstaltungListItem {
id: string;
titel: string;
beschreibung?: string | null;
ort?: string | null;
kategorie_id?: string | null;
kategorie_name?: string | null;
kategorie_farbe?: string | null;
kategorie_icon?: string | null;
datum_von: string; // ISO string
datum_bis: string; // ISO string
ganztaegig: boolean;
zielgruppen: string[];
alle_gruppen: boolean;
abgesagt: boolean;
anmeldung_erforderlich: boolean;
}
export interface Veranstaltung extends VeranstaltungListItem {
ort_url?: string | null;
max_teilnehmer?: number | null;
anmeldung_bis?: string | null;
erstellt_von: string;
erstellt_von_name?: string | null;
abgesagt_grund?: string | null;
abgesagt_am?: string | null;
erstellt_am: string;
aktualisiert_am: string;
}
export interface GroupInfo {
id: string;
label: string;
}
export interface CreateVeranstaltungInput {
titel: string;
beschreibung?: string | null;
ort?: string | null;
ort_url?: string | null;
kategorie_id?: string | null;
datum_von: string; // ISO
datum_bis: string; // ISO
ganztaegig: boolean;
zielgruppen: string[];
alle_gruppen: boolean;
max_teilnehmer?: number | null;
anmeldung_erforderlich: boolean;
anmeldung_bis?: string | null;
}