From 534a24edbff94a62c90277fdffb0683add9e5e92 Mon Sep 17 00:00:00 2001 From: Matthias Hochmeister Date: Sat, 28 Mar 2026 17:30:40 +0100 Subject: [PATCH] fix: use PATCH for vehicle type update and correct permission check in FahrzeugEinstellungen --- frontend/src/pages/FahrzeugEinstellungen.tsx | 2 +- frontend/src/services/fahrzeugTypen.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/FahrzeugEinstellungen.tsx b/frontend/src/pages/FahrzeugEinstellungen.tsx index 4e672ae..ac14bbe 100644 --- a/frontend/src/pages/FahrzeugEinstellungen.tsx +++ b/frontend/src/pages/FahrzeugEinstellungen.tsx @@ -38,7 +38,7 @@ export default function FahrzeugEinstellungen() { const { hasPermission } = usePermissionContext(); const { showSuccess, showError } = useNotification(); - const canEdit = hasPermission('fahrzeuge:edit'); + const canEdit = hasPermission('checklisten:manage_templates'); const { data: fahrzeugTypen = [], isLoading } = useQuery({ queryKey: ['fahrzeug-typen'], diff --git a/frontend/src/services/fahrzeugTypen.ts b/frontend/src/services/fahrzeugTypen.ts index 61e62db..c0a0beb 100644 --- a/frontend/src/services/fahrzeugTypen.ts +++ b/frontend/src/services/fahrzeugTypen.ts @@ -18,7 +18,7 @@ export const fahrzeugTypenApi = { }, update: async (id: number, data: Partial): Promise => { - const r = await api.put(`/api/fahrzeug-typen/${id}`, data); + const r = await api.patch(`/api/fahrzeug-typen/${id}`, data); return r.data.data; },