feat(web): authoring query/mutation hooks + MSW handlers + shadcn select/checkbox/alert-dialog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 00:22:59 +02:00
parent f3bab3336c
commit b23a48c310
9 changed files with 647 additions and 13 deletions
+30
View File
@@ -32,3 +32,33 @@ export const objectsPage: AdminObjectPage = {
limit: 50,
offset: 0,
};
export type FieldDefinitionView = components["schemas"]["FieldDefinitionView"];
export type TermView = components["schemas"]["TermView"];
export type AuthorityView = components["schemas"]["AuthorityView"];
export const fieldDefinitions: FieldDefinitionView[] = [
{ key: "inscription", data_type: "text", vocabulary_id: null, authority_kind: null,
required: true, group: "Description", labels: [{ lang: "en", label: "Inscription" }, { lang: "sv", label: "Inskription" }] },
{ key: "count_seen", data_type: "integer", vocabulary_id: null, authority_kind: null,
required: false, group: null, labels: [{ lang: "en", label: "Count seen" }] },
{ key: "made_on", data_type: "date", vocabulary_id: null, authority_kind: null,
required: false, group: null, labels: [{ lang: "en", label: "Made on" }] },
{ key: "is_fragment", data_type: "boolean", vocabulary_id: null, authority_kind: null,
required: false, group: null, labels: [{ lang: "en", label: "Is fragment" }] },
{ key: "title_ml", data_type: "localized_text", vocabulary_id: null, authority_kind: null,
required: false, group: null, labels: [{ lang: "en", label: "Title" }] },
{ key: "material", data_type: "term", vocabulary_id: "v-material", authority_kind: null,
required: false, group: null, labels: [{ lang: "en", label: "Material" }] },
{ key: "maker", data_type: "authority", vocabulary_id: null, authority_kind: "person",
required: false, group: null, labels: [{ lang: "en", label: "Maker" }] },
];
export const materialTerms: TermView[] = [
{ id: "t-bronze", external_uri: null, labels: [{ lang: "en", label: "Bronze" }, { lang: "sv", label: "Brons" }] },
{ id: "t-wood", external_uri: null, labels: [{ lang: "en", label: "Wood" }] },
];
export const personAuthorities: AuthorityView[] = [
{ id: "a-ada", kind: "person", external_uri: null, labels: [{ lang: "en", label: "Ada Lovelace" }] },
];