feat(web): adopt MutationError across create/object forms; distinguish edit-form fetch error (#63)

This commit is contained in:
2026-06-08 17:32:36 +02:00
parent 6e02ac874f
commit aeb1b084d9
7 changed files with 31 additions and 30 deletions
+2 -5
View File
@@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
import type { components } from "../api/schema";
import { useAuthorities, useCreateAuthority } from "../api/queries";
import { LabelEditor } from "../components/label-editor";
import { MutationError } from "../components/mutation-error";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
@@ -141,11 +142,7 @@ export function AuthoritiesPage() {
</p>
)}
{create.isError && (
<p role="alert" className="text-xs text-destructive">
{t("form.rejected")}
</p>
)}
<MutationError error={create.error} />
<Button type="submit" size="sm" disabled={create.isPending}>
{t("authorities.create")}