mirror of
https://github.com/lingble/twenty.git
synced 2025-11-26 19:04:58 +00:00
Fix new field type enums in parseFieldType (#2361)
* Fix new field type enums in parseFieldType * Fix with GraphQL enum
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { FieldType } from '@/ui/object/field/types/FieldType';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
export const parseFieldType = (fieldType: string): FieldType => {
|
||||
if (fieldType === 'url') {
|
||||
export const parseFieldType = (fieldType: FieldMetadataType): FieldType => {
|
||||
if (fieldType === FieldMetadataType.Url) {
|
||||
return 'URL_V2';
|
||||
}
|
||||
|
||||
if (fieldType === 'money') {
|
||||
if (fieldType === FieldMetadataType.Money) {
|
||||
return 'MONEY_AMOUNT_V2';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user