fix permissions
This commit is contained in:
@@ -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 ──
|
||||
|
||||
@@ -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>(() =>
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user