feat(web): inline status-aware errors on term/authority edit rows + delete dialog (#63)
This commit is contained in:
@@ -5,6 +5,7 @@ import type { components } from "../api/schema";
|
||||
import { useUpdateAuthority, useDeleteAuthority } 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";
|
||||
@@ -56,6 +57,7 @@ export function AuthorityRow({ authority, kind, lang }: { authority: AuthorityVi
|
||||
{t("form.cancel")}
|
||||
</Button>
|
||||
</div>
|
||||
<MutationError error={updateAuthority.error} />
|
||||
</li>
|
||||
);
|
||||
}
|
||||
@@ -71,6 +73,7 @@ export function AuthorityRow({ authority, kind, lang }: { authority: AuthorityVi
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
updateAuthority.reset();
|
||||
setLabels(authority.labels as LabelInput[]);
|
||||
setUri(authority.external_uri ?? "");
|
||||
setEditing(true);
|
||||
|
||||
Reference in New Issue
Block a user