fix(app): bug fix when creating an event
Build and Push Docker image / build-and-push (push) Successful in 5m51s Details

This commit is contained in:
Valentin Kolb 2024-05-14 17:07:01 +02:00
parent ad2a69e6fe
commit bca8d10016
2 changed files with 1 additions and 5 deletions

View File

@ -46,9 +46,6 @@ export default function CreateEvent({onSuccess, onAbort}: {
const createEventMutation = useMutation({
mutationFn: async () => {
if (!user || user.REALM === "LDAP") {
throw new Error("Nur mit StuVe IT Account eingeloggte Personen können Events erstellen")
}
return await pb.collection("events").create({
...formValues.values,
eventAdmins: formValues.values.eventAdmins.map((member) => member.id),
@ -79,7 +76,6 @@ export default function CreateEvent({onSuccess, onAbort}: {
Du kannst auch alle Werte die du hier angibst später noch bearbeiten.
</ShowHelp>
<Grid>
<Grid.Col span={{base: 12, sm: 6}}>

View File

@ -30,7 +30,7 @@ export default function EventOverview() {
</div>
{
(user && user.REALM === "LDAP") && <>
(user) && <>
<Collapse in={showCreateEvent} className={"section"}>
<CreateEvent
onAbort={showCreateEventHandler.close}