feat: checklist multi-type assignments, tab layouts for Fahrzeuge/Ausruestung, admin cleanup

- Migration 074: convert checklist vorlage single FK fields to junction tables
  (vorlage_fahrzeug_typen, vorlage_fahrzeuge, vorlage_ausruestung_typen, vorlage_ausruestungen)
- Backend checklist service: multi-type create/update/query with array fields
- Backend cleanup service: add checklist-history and reset-checklist-history targets
- Frontend types/service: singular FK fields replaced with arrays (fahrzeug_typ_ids, etc.)
- Frontend Checklisten.tsx: multi-select Autocomplete pickers for all assignment types
- Fahrzeuge.tsx/Ausruestung.tsx: add tab layout (Uebersicht + Einstellungen), inline type CRUD
- FahrzeugEinstellungen/AusruestungEinstellungen: replaced with redirects to tab URLs
- Sidebar: add Uebersicht sub-items, update Einstellungen paths to tab URLs
- DataManagementTab: add checklist-history cleanup and reset sections

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthias Hochmeister
2026-03-28 18:57:46 +01:00
parent 893fbe43a0
commit 4349de9bc9
14 changed files with 1078 additions and 1188 deletions

View File

@@ -26,14 +26,14 @@ export interface AusruestungTyp {
export interface ChecklistVorlage {
id: number;
name: string;
fahrzeug_typ_id?: number;
fahrzeug_typ?: FahrzeugTyp;
fahrzeug_id?: string;
fahrzeug_name?: string;
ausruestung_id?: string;
ausruestung_name?: string;
ausruestung_typ_id?: number;
ausruestung_typ?: string;
fahrzeug_typ_ids?: number[];
fahrzeug_ids?: string[];
ausruestung_typ_ids?: number[];
ausruestung_ids?: string[];
fahrzeug_typ_names?: string[];
fahrzeug_names?: string[];
ausruestung_typ_names?: string[];
ausruestung_names?: string[];
intervall?: 'weekly' | 'monthly' | 'quarterly' | 'halfyearly' | 'yearly' | 'custom' | null;
intervall_tage?: number;
beschreibung?: string;
@@ -114,7 +114,6 @@ export const CHECKLIST_STATUS_COLORS: Record<ChecklistAusfuehrungStatus, 'defaul
};
export interface ChecklistVorlageFilter {
fahrzeug_typ_id?: number;
aktiv?: boolean;
}
@@ -126,10 +125,10 @@ export interface ChecklistAusfuehrungFilter {
export interface CreateVorlagePayload {
name: string;
fahrzeug_typ_id?: number | null;
fahrzeug_id?: string | null;
ausruestung_typ_id?: number | null;
ausruestung_id?: string | null;
fahrzeug_typ_ids?: number[];
fahrzeug_ids?: string[];
ausruestung_typ_ids?: number[];
ausruestung_ids?: string[];
intervall?: 'weekly' | 'monthly' | 'quarterly' | 'halfyearly' | 'yearly' | 'custom' | null;
intervall_tage?: number | null;
beschreibung?: string | null;
@@ -138,10 +137,10 @@ export interface CreateVorlagePayload {
export interface UpdateVorlagePayload {
name?: string;
fahrzeug_typ_id?: number | null;
fahrzeug_id?: string | null;
ausruestung_typ_id?: number | null;
ausruestung_id?: string | null;
fahrzeug_typ_ids?: number[];
fahrzeug_ids?: string[];
ausruestung_typ_ids?: number[];
ausruestung_ids?: string[];
intervall?: 'weekly' | 'monthly' | 'quarterly' | 'halfyearly' | 'yearly' | 'custom' | null;
intervall_tage?: number | null;
beschreibung?: string | null;