Feat/show page metadata (#2234)
* Fix view fetch bug * Finished types * Removed console.log * Fixed todo * Working Object Show Page * Minor fixes * Fix custom object requests pending (#2240) * Fix custom object requests pending * fix typo * Fix various bugs * Typo * Fix * Fix * Fix --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -31,7 +31,8 @@ export const SettingsObjectFieldDataType = ({
|
||||
value,
|
||||
}: SettingsObjectFieldDataTypeProps) => {
|
||||
const theme = useTheme();
|
||||
const { label, Icon } = dataTypes[value];
|
||||
|
||||
const { label, Icon } = dataTypes?.[value];
|
||||
|
||||
return (
|
||||
<StyledDataType value={value}>
|
||||
|
||||
@ -37,6 +37,18 @@ export const SettingsObjectFieldItemTableRow = ({
|
||||
const theme = useTheme();
|
||||
const { Icon } = useLazyLoadIcon(fieldItem.icon ?? '');
|
||||
|
||||
// TODO: parse with zod and merge types with FieldType (create a subset of FieldType for example)
|
||||
const fieldDataTypeIsSupported = [
|
||||
'text',
|
||||
'number',
|
||||
'boolean',
|
||||
'url',
|
||||
].includes(fieldItem.type);
|
||||
|
||||
if (!fieldDataTypeIsSupported) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledObjectFieldTableRow>
|
||||
<StyledNameTableCell>
|
||||
|
||||
Reference in New Issue
Block a user