feat(persoenliche-ausruestung): show catalog category, remove size/date columns, make zustand admin-configurable

This commit is contained in:
Matthias Hochmeister
2026-04-16 08:19:38 +02:00
parent dac0b79b3b
commit 058ee721e8
14 changed files with 282 additions and 96 deletions

View File

@@ -1,20 +1,10 @@
// Personal Equipment (Persönliche Ausrüstung) — Frontend Types
export type PersoenlicheAusruestungZustand = 'gut' | 'beschaedigt' | 'abgaengig' | 'verloren';
export const ZUSTAND_LABELS: Record<PersoenlicheAusruestungZustand, string> = {
gut: 'Gut',
beschaedigt: 'Beschädigt',
abgaengig: 'Abgängig',
verloren: 'Verloren',
};
export const ZUSTAND_COLORS: Record<PersoenlicheAusruestungZustand, 'success' | 'warning' | 'error' | 'default'> = {
gut: 'success',
beschaedigt: 'warning',
abgaengig: 'error',
verloren: 'default',
};
export interface ZustandOption {
key: string;
label: string;
color: string;
}
export interface PersoenlicheAusruestung {
id: string;
@@ -22,6 +12,7 @@ export interface PersoenlicheAusruestung {
kategorie?: string;
artikel_id?: number;
artikel_bezeichnung?: string;
artikel_kategorie_name?: string;
user_id?: string;
user_display_name?: string;
benutzer_name?: string;
@@ -29,7 +20,7 @@ export interface PersoenlicheAusruestung {
seriennummer?: string;
inventarnummer?: string;
anschaffung_datum?: string;
zustand: PersoenlicheAusruestungZustand;
zustand: string;
notizen?: string;
anfrage_id?: number;
anfrage_position_id?: number;
@@ -48,7 +39,7 @@ export interface CreatePersoenlicheAusruestungPayload {
seriennummer?: string;
inventarnummer?: string;
anschaffung_datum?: string;
zustand?: PersoenlicheAusruestungZustand;
zustand?: string;
notizen?: string;
eigenschaften?: { eigenschaft_id?: number; name: string; wert: string }[];
}
@@ -63,7 +54,7 @@ export interface UpdatePersoenlicheAusruestungPayload {
seriennummer?: string | null;
inventarnummer?: string | null;
anschaffung_datum?: string | null;
zustand?: PersoenlicheAusruestungZustand;
zustand?: string;
notizen?: string | null;
eigenschaften?: { eigenschaft_id?: number | null; name: string; wert: string }[] | null;
}