diff --git a/ui2/src/features/document/components/DocumentDetails/CustomFields.tsx b/ui2/src/features/document/components/DocumentDetails/CustomFields.tsx index 3ec660090..15f7e4d96 100644 --- a/ui2/src/features/document/components/DocumentDetails/CustomFields.tsx +++ b/ui2/src/features/document/components/DocumentDetails/CustomFields.tsx @@ -17,7 +17,14 @@ import { } from "@/features/document/apiSlice" import {selectCurrentNodeID} from "@/features/ui/uiSlice" import type {CFV, PanelMode} from "@/types" -import {Button, ComboboxItem, Select, Skeleton, TextInput} from "@mantine/core" +import { + Button, + ComboboxItem, + Select, + Skeleton, + Text, + TextInput +} from "@mantine/core" export default function CustomFields() { const mode: PanelMode = useContext(PanelContext) @@ -35,8 +42,11 @@ export default function CustomFields() { const [updateDocumentCustomFields, {error}] = useUpdateDocumentCustomFieldsMutation() const [updateDocumentType] = useUpdateDocumentTypeMutation() - const {data: documentCustomFields, isSuccess: isSuccessDocumentCustomFields} = - useGetDocumentCustomFieldsQuery(docID ?? skipToken) + const { + data: documentCustomFields, + isSuccess: isSuccessDocumentCustomFields, + isError: isErrorGetDocCF + } = useGetDocumentCustomFieldsQuery(docID ?? skipToken) useEffect(() => { if (documentCustomFields && documentCustomFields.length > 0) { @@ -172,6 +182,11 @@ export default function CustomFields() { clearable /> {genericCustomFieldsComponents} + {isErrorGetDocCF && ( + + Error while fetching custom fields. Error code cf98g62m. + + )} {showSaveButton && } {error && (