fix(app): bug fix when creating an event
Build and Push Docker image / build-and-push (push) Successful in 5m51s
Details
Build and Push Docker image / build-and-push (push) Successful in 5m51s
Details
This commit is contained in:
parent
ad2a69e6fe
commit
bca8d10016
|
@ -46,9 +46,6 @@ export default function CreateEvent({onSuccess, onAbort}: {
|
||||||
|
|
||||||
const createEventMutation = useMutation({
|
const createEventMutation = useMutation({
|
||||||
mutationFn: async () => {
|
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({
|
return await pb.collection("events").create({
|
||||||
...formValues.values,
|
...formValues.values,
|
||||||
eventAdmins: formValues.values.eventAdmins.map((member) => member.id),
|
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.
|
Du kannst auch alle Werte die du hier angibst später noch bearbeiten.
|
||||||
</ShowHelp>
|
</ShowHelp>
|
||||||
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.Col span={{base: 12, sm: 6}}>
|
<Grid.Col span={{base: 12, sm: 6}}>
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default function EventOverview() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
(user && user.REALM === "LDAP") && <>
|
(user) && <>
|
||||||
<Collapse in={showCreateEvent} className={"section"}>
|
<Collapse in={showCreateEvent} className={"section"}>
|
||||||
<CreateEvent
|
<CreateEvent
|
||||||
onAbort={showCreateEventHandler.close}
|
onAbort={showCreateEventHandler.close}
|
||||||
|
|
Loading…
Reference in New Issue