feat: simplify field preview logic in Settings (#5541)
Closes #5382 TODO: - [x] Test all field previews in app - [x] Fix tests - [x] Fix JSON preview
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { mapPaginatedObjectMetadataItemsToObjectMetadataItems } from '@/object-metadata/utils/mapPaginatedObjectMetadataItemsToObjectMetadataItems';
|
||||
import {
|
||||
FieldMetadataType,
|
||||
ObjectEdge,
|
||||
ObjectMetadataItemsQuery,
|
||||
} from '~/generated-metadata/graphql';
|
||||
@ -237,6 +238,48 @@ const customObjectMetadataItemEdge: ObjectEdge = {
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'fieldEdge',
|
||||
node: {
|
||||
__typename: 'field',
|
||||
id: 'e07fcc3f-beec-4d91-8488-9d1d2cfa5f99',
|
||||
type: FieldMetadataType.Select,
|
||||
name: 'priority',
|
||||
label: 'Priority',
|
||||
description: 'A custom Select example',
|
||||
icon: 'IconWarning',
|
||||
isCustom: true,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
options: [
|
||||
{
|
||||
id: '2b98dc02-0d99-4f3e-890e-e2e6b8f3196c',
|
||||
value: 'LOW',
|
||||
label: 'Low',
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
id: 'd925a8de-d8ec-4b59-a079-64f4012e3311',
|
||||
value: 'MEDIUM',
|
||||
label: 'Medium',
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
value: 'HIGH',
|
||||
label: 'High',
|
||||
color: 'red',
|
||||
},
|
||||
],
|
||||
isNullable: true,
|
||||
createdAt: '2024-04-08T12:48:49.538Z',
|
||||
updatedAt: '2024-04-08T12:48:49.538Z',
|
||||
defaultValue: null,
|
||||
relationDefinition: null,
|
||||
fromRelationMetadata: null,
|
||||
toRelationMetadata: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user