fix permissions

This commit is contained in:
Matthias Hochmeister
2026-03-25 08:42:45 +01:00
parent 43b7093996
commit eb92dfcc96
10 changed files with 26 additions and 32 deletions

View File

@@ -112,7 +112,7 @@ export default function BestellungDetail() {
const erinnerungen = data?.erinnerungen ?? [];
const historie = data?.historie ?? [];
const canEdit = hasPermission('bestellungen:edit');
const canEdit = hasPermission('bestellungen:create');
const nextStatus = bestellung ? getNextStatus(bestellung.status) : null;
// ── Mutations ──

View File

@@ -96,10 +96,10 @@ function FahrzeugBuchungen() {
const { user } = useAuth();
const { hasPermission } = usePermissionContext();
const notification = useNotification();
const canCreate = hasPermission('kalender:create_bookings');
const canWrite = hasPermission('kalender:edit_bookings');
const canCancelOwn = hasPermission('kalender:cancel_own_bookings');
const canChangeBuchungsArt = hasPermission('kalender:manage_categories');
const canCreate = hasPermission('kalender:manage_bookings');
const canWrite = hasPermission('kalender:manage_bookings');
const canCancelOwn = hasPermission('kalender:manage_bookings');
const canChangeBuchungsArt = hasPermission('kalender:create');
// ── Week navigation ────────────────────────────────────────────────────────
const [currentWeekStart, setCurrentWeekStart] = useState<Date>(() =>

View File

@@ -1746,8 +1746,8 @@ export default function Kalender() {
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
const canWriteEvents = hasPermission('kalender:create');
const canWriteBookings = hasPermission('kalender:edit_bookings');
const canCreateBookings = hasPermission('kalender:create_bookings');
const canWriteBookings = hasPermission('kalender:manage_bookings');
const canCreateBookings = hasPermission('kalender:manage_bookings');
// ── Tab ─────────────────────────────────────────────────────────────────────
const [activeTab, setActiveTab] = useState(() => {

View File

@@ -272,7 +272,7 @@ export default function UebungDetail() {
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
const canWrite = hasPermission('kalender:create');
const canSeeAttendees = hasPermission('kalender:mark_attendance');
const canSeeAttendees = hasPermission('kalender:create');
const [markAttendanceOpen, setMarkAttendanceOpen] = useState(false);
const [rsvpLoading, setRsvpLoading] = useState<'zugesagt' | 'abgesagt' | null>(null);