From 0260de9a6e1609e28ccbef02eda03f83230439b9 Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Tue, 14 May 2024 23:44:13 +0200 Subject: [PATCH] feat(events): redirected user to /events/entries after he created an entry for and event slot --- src/components/auth/modals/LoginModal.tsx | 2 +- src/components/auth/modals/RegisterModal.tsx | 8 ++++++-- .../EventComponents/EventSettings/EditEventImage.tsx | 3 +++ src/pages/events/s/EventListSlotView.tsx | 4 ++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/auth/modals/LoginModal.tsx b/src/components/auth/modals/LoginModal.tsx index 76446cd..1bd3b55 100644 --- a/src/components/auth/modals/LoginModal.tsx +++ b/src/components/auth/modals/LoginModal.tsx @@ -79,7 +79,7 @@ export default function LoginModal() { label={"Anmeldename"} placeholder={ formValues.values.authMethod === "ldap" ? - "vorname.nachname" : "Anmeldename oder Email" + "vorname.nachname" : "Anmeldename" } {...formValues.getInputProps("username")} /> diff --git a/src/components/auth/modals/RegisterModal.tsx b/src/components/auth/modals/RegisterModal.tsx index 4bd562a..79591fd 100644 --- a/src/components/auth/modals/RegisterModal.tsx +++ b/src/components/auth/modals/RegisterModal.tsx @@ -45,8 +45,12 @@ export default function RegisterModal() { onSuccess: () => { handler.close() formValues.reset() - showSuccessNotification("Account erfolgreich angelegt") - showSuccessNotification("Bitte bestätige deine E-Mail Adresse") + showSuccessNotification( + "Account erfolgreich angelegt. " + + "Bitte überprüfe deine E-Mails und klicke auf den Bestätigungslink. " + + "Das verschicken der E-Mail kann einige Minuten dauern. " + + "Falls du keine E-Mail erhalten hast überprüfe bitte deinen Spam Ordner." + ) } }) diff --git a/src/pages/events/e/:eventId/EventComponents/EventSettings/EditEventImage.tsx b/src/pages/events/e/:eventId/EventComponents/EventSettings/EditEventImage.tsx index e288897..a06bee8 100644 --- a/src/pages/events/e/:eventId/EventComponents/EventSettings/EditEventImage.tsx +++ b/src/pages/events/e/:eventId/EventComponents/EventSettings/EditEventImage.tsx @@ -38,6 +38,8 @@ export default function EditEventImage({event}: { event: EventModel }) { Setzte die Stimmung für dein Event mit einem Bild. Das Bild wird auf der öffentlichen Eventseite angezeigt. +
+ Am besten eignet sich ein quadratisches Bild ohne Text.
@@ -47,6 +49,7 @@ export default function EditEventImage({event}: { event: EventModel }) { !image &&
setImage(files[0])} fileCount={image ? 1 : 0} maxFileCount={1} diff --git a/src/pages/events/s/EventListSlotView.tsx b/src/pages/events/s/EventListSlotView.tsx index 201e777..85493ab 100644 --- a/src/pages/events/s/EventListSlotView.tsx +++ b/src/pages/events/s/EventListSlotView.tsx @@ -11,6 +11,7 @@ import {FieldEntries} from "@/components/formUtil/FromInput/types.ts"; import {showSuccessNotification} from "@/components/util.tsx"; import InnerHtml from "@/components/InnerHtml"; import FormInput from "@/components/formUtil/FromInput"; +import {useNavigate} from "react-router-dom"; export default function EventListSlotView({slot, list, refetch}: { list: EventListModel, @@ -33,6 +34,8 @@ export default function EventListSlotView({slot, list, refetch}: { const {pb, user} = usePB() + const navigate = useNavigate() + const createEntryMutation = useMutation({ mutationFn: async (data: FieldEntries) => { await pb.collection("eventListSlotEntries").create({ @@ -45,6 +48,7 @@ export default function EventListSlotView({slot, list, refetch}: { showSuccessNotification("Eintrag erfolgreich erstellt") expandedHandler.close() refetch() + navigate(`/events/entries`) } })