mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-05 10:54:15 +03: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:
parent
88ca846f83
commit
b98d474308
@ -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';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user