{query.data?.items.map(slot => (
diff --git a/src/pages/events/e/:eventId/EventLists/EventListComponents/EditSlotEntryMenu.tsx b/src/pages/events/e/:eventId/EventLists/EventListComponents/EditSlotEntryMenu.tsx
index 4a98524..4622554 100644
--- a/src/pages/events/e/:eventId/EventLists/EventListComponents/EditSlotEntryMenu.tsx
+++ b/src/pages/events/e/:eventId/EventLists/EventListComponents/EditSlotEntryMenu.tsx
@@ -1,4 +1,4 @@
-import {EventListSlotEntriesWithUserModel} from "@/models/EventTypes.ts";
+import {EventListSlotEntriesWithUserModel, EventModel} from "@/models/EventTypes.ts";
import {useMutation} from "@tanstack/react-query";
import {showSuccessNotification} from "@/components/util.tsx";
import {useConfirmModal} from "@/components/ConfirmModal.tsx";
@@ -13,16 +13,19 @@ import {
} from "@/pages/events/e/:eventId/EventLists/EventListComponents/UpdateEntryStatusModal.tsx";
import {MoveEntryModal} from "@/pages/events/e/:eventId/EventLists/EventListComponents/MoveEntryModal.tsx";
import EntryStatusSpoiler from "@/pages/events/e/:eventId/EventLists/EventListComponents/EntryStatusSpoiler.tsx";
-import {getListSchemas} from "@/pages/events/util.ts";
+import {getListSchemas, useEventRights} from "@/pages/events/util.ts";
-export default function EditSlotEntryMenu({entry, refetch}: {
+export default function EditSlotEntryMenu({entry, refetch, event}: {
refetch: () => void,
- entry: EventListSlotEntriesWithUserModel
+ entry: EventListSlotEntriesWithUserModel,
+ event: EventModel
}) {
const {pb} = usePB()
+ const {canEditEvent} = useEventRights(event)
+
const [showStatusEditModal, showStatusEditModalHandler] = useDisclosure(false)
const [showMoveEntryModal, showMoveEntryModalHandler] = useDisclosure(false)
@@ -107,6 +110,7 @@ export default function EditSlotEntryMenu({entry, refetch}: {
}
onClick={toggleConfirmModal}
+ disabled={!canEditEvent}
>
Löschen
diff --git a/src/pages/events/e/:eventId/EventLists/EventListsOverview.tsx b/src/pages/events/e/:eventId/EventLists/EventListsOverview.tsx
index f0a496f..ef48fb7 100644
--- a/src/pages/events/e/:eventId/EventLists/EventListsOverview.tsx
+++ b/src/pages/events/e/:eventId/EventLists/EventListsOverview.tsx
@@ -26,6 +26,7 @@ import {IconArrowRight, IconListSearch, IconLock, IconLockOpen, IconPlus} from "
import {useRef, useState} from "react";
import {useDebouncedState} from "@mantine/hooks";
import {onlyUnique} from "@/lib/util.ts";
+import {useEventRights} from "@/pages/events/util.ts";
/**
* Renders a single List as clickable row (link)
@@ -124,53 +125,57 @@ export default function EventListsOverview({event}: { event: EventModel }) {
const newListNameRef = useRef
(null)
+ const {canEditEvent} = useEventRights(event)
+
return (
-
+
+ Beschreibung
+
+ formValues.setFieldValue("description", value)}
+ />
+
+
+
+
+
+
+ }
{
+ const {canEditEvent} = useEventRights(event)
+
+ const nav = [...viewNav]
+ if (canEditEvent) {
+ nav.push(...editNav)
+ }
+
return <>
@@ -81,11 +82,12 @@ function EventEntry({entry, refetch}: {
>
}
-export default function EventEntries({entries, refetch}: {
+export default function EventEntries({entries, refetch, event}: {
entries: EventListSlotEntriesWithUserModel[],
- refetch: () => void
+ refetch: () => void,
+ event: EventModel
}) {
return