Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ export function ObjectDetail() {
|
|||||||
return byLang ?? byEnglish ?? key;
|
return byLang ?? byEnglish ?? key;
|
||||||
};
|
};
|
||||||
|
|
||||||
const flexible = Object.entries(object.fields as Record<string, unknown>);
|
const flexible = Object.entries(object.fields);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="overflow-auto p-4">
|
<div className="overflow-auto p-4">
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function ObjectEditForm() {
|
|||||||
recording_date: object.recording_date ?? null,
|
recording_date: object.recording_date ?? null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaults = { core, fields: object.fields as Record<string, unknown> };
|
const defaults = { core, fields: object.fields };
|
||||||
|
|
||||||
const onSubmit = async (values: ObjectFormValues) => {
|
const onSubmit = async (values: ObjectFormValues) => {
|
||||||
setError(null);
|
setError(null);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const STEPS: Visibility[] = ["draft", "internal", "public"];
|
|||||||
|
|
||||||
export function PublishControl({ object }: { object: AdminObjectView }) {
|
export function PublishControl({ object }: { object: AdminObjectView }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const current = object.visibility as Visibility;
|
const current = object.visibility;
|
||||||
const { forward, back } = adjacentTransitions(current);
|
const { forward, back } = adjacentTransitions(current);
|
||||||
const setVisibility = useSetVisibility();
|
const setVisibility = useSetVisibility();
|
||||||
const [confirmOpen, setConfirmOpen] = useState(false);
|
const [confirmOpen, setConfirmOpen] = useState(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user