feat(web): inline status-aware errors on term/authority edit rows + delete dialog (#63)

This commit is contained in:
2026-06-08 17:27:02 +02:00
parent dd131ee740
commit 6e02ac874f
5 changed files with 62 additions and 4 deletions
+3
View File
@@ -5,6 +5,7 @@ import type { components } from "../api/schema";
import { useUpdateTerm, useDeleteTerm } from "../api/queries";
import { LabelEditor } from "../components/label-editor";
import { DeleteConfirmDialog } from "../components/delete-confirm-dialog";
import { MutationError } from "../components/mutation-error";
import { ExternalUriLink } from "../components/external-uri-link";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
@@ -50,6 +51,7 @@ export function TermRow({ vocabularyId, term, lang }: { vocabularyId: string; te
{t("form.cancel")}
</Button>
</div>
<MutationError error={updateTerm.error} />
</li>
);
}
@@ -65,6 +67,7 @@ export function TermRow({ vocabularyId, term, lang }: { vocabularyId: string; te
variant="ghost"
size="sm"
onClick={() => {
updateTerm.reset();
setLabels(term.labels as LabelInput[]);
setUri(term.external_uri ?? "");
setEditing(true);