diff --git a/apps/hub/app/(app)/admin/heliport/_components/Form.tsx b/apps/hub/app/(app)/admin/heliport/_components/Form.tsx index 93893c55..518e05fe 100644 --- a/apps/hub/app/(app)/admin/heliport/_components/Form.tsx +++ b/apps/hub/app/(app)/admin/heliport/_components/Form.tsx @@ -9,6 +9,7 @@ import { useState } from "react"; import { deleteHeliport, upsertHeliport } from "../action"; import { Button } from "../../../../_components/ui/Button"; import { redirect } from "next/navigation"; +import toast from "react-hot-toast"; export const HeliportForm = ({ heliport }: { heliport?: Heliport }) => { const form = useForm({ @@ -24,6 +25,7 @@ export const HeliportForm = ({ heliport }: { heliport?: Heliport }) => { setLoading(true); await upsertHeliport(values, heliport?.id); setLoading(false); + toast.success("Daten gespeichert"); if (!heliport) redirect(`/admin/Heliport`); })} className="flex flex-wrap gap-3" diff --git a/apps/hub/app/(app)/admin/keyword/_components/Form.tsx b/apps/hub/app/(app)/admin/keyword/_components/Form.tsx index f3687ca0..d1a13fee 100644 --- a/apps/hub/app/(app)/admin/keyword/_components/Form.tsx +++ b/apps/hub/app/(app)/admin/keyword/_components/Form.tsx @@ -10,6 +10,7 @@ import { deleteKeyword, upsertKeyword } from "../action"; import { Button } from "../../../../_components/ui/Button"; import { redirect } from "next/navigation"; import { ListInput } from "_components/ui/List"; +import toast from "react-hot-toast"; export const KeywordForm = ({ keyword }: { keyword?: Keyword }) => { const form = useForm({ @@ -25,6 +26,7 @@ export const KeywordForm = ({ keyword }: { keyword?: Keyword }) => { setLoading(true); await upsertKeyword(values, keyword?.id); setLoading(false); + toast.success("Daten gespeichert"); if (!keyword) redirect(`/admin/keyword`); })} className="grid grid-cols-6 gap-3" diff --git a/apps/hub/app/(app)/admin/penalty/_components/form.tsx b/apps/hub/app/(app)/admin/penalty/_components/form.tsx index 40870519..8003c3fa 100644 --- a/apps/hub/app/(app)/admin/penalty/_components/form.tsx +++ b/apps/hub/app/(app)/admin/penalty/_components/form.tsx @@ -6,6 +6,7 @@ import { PenaltyOptionalDefaults, PenaltyOptionalDefaultsSchema } from "@repo/db import { Button } from "_components/ui/Button"; import { Switch } from "_components/ui/Switch"; import { useForm } from "react-hook-form"; +import toast from "react-hot-toast"; export const ReasonForm = ({ penalty, @@ -27,6 +28,7 @@ export const ReasonForm = ({ onSubmit={form.handleSubmit(async (penalty) => { if (!penalty.id) return; const newPenalty = await editPenalty(penalty.id, penalty); + toast.success("Daten gespeichert"); form.reset(newPenalty); })} > diff --git a/apps/hub/app/(app)/admin/station/_components/Form.tsx b/apps/hub/app/(app)/admin/station/_components/Form.tsx index 9160d056..121a1fda 100644 --- a/apps/hub/app/(app)/admin/station/_components/Form.tsx +++ b/apps/hub/app/(app)/admin/station/_components/Form.tsx @@ -9,6 +9,7 @@ import { useState } from "react"; import { deleteStation, upsertStation } from "../action"; import { Button } from "../../../../_components/ui/Button"; import { redirect } from "next/navigation"; +import toast from "react-hot-toast"; export const StationForm = ({ station }: { station?: Station }) => { const form = useForm({ @@ -24,6 +25,7 @@ export const StationForm = ({ station }: { station?: Station }) => { setLoading(true); await upsertStation(values, station?.id); setLoading(false); + toast.success("Daten gespeichert"); if (!station) redirect(`/admin/station`); })} className="grid grid-cols-6 gap-3"