mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-28 09:12:37 +03:00
fix: generate metadata object and field names in camel case (#2250)
Fixes #2249
This commit is contained in:
parent
781a1de8f4
commit
b30233d582
@ -40,7 +40,6 @@
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.kebabcase": "^4.1.1",
|
||||
"lodash.upperfirst": "^4.3.1",
|
||||
"luxon": "^3.3.0",
|
||||
"react": "^18.2.0",
|
||||
"react-data-grid": "7.0.0-beta.13",
|
||||
@ -146,7 +145,6 @@
|
||||
"@types/lodash.camelcase": "^4.3.7",
|
||||
"@types/lodash.debounce": "^4.0.7",
|
||||
"@types/lodash.kebabcase": "^4.1.7",
|
||||
"@types/lodash.upperfirst": "^4.3.7",
|
||||
"@types/luxon": "^3.3.0",
|
||||
"@types/react-datepicker": "^4.11.2",
|
||||
"@types/scroll-into-view": "^1.16.0",
|
||||
|
@ -1,5 +1,4 @@
|
||||
import toCamelCase from 'lodash.camelcase';
|
||||
import upperFirst from 'lodash.upperfirst';
|
||||
|
||||
import { ObjectFieldDataType } from '@/settings/data-model/types/ObjectFieldDataType';
|
||||
import { Field } from '~/generated-metadata/graphql';
|
||||
@ -12,6 +11,6 @@ export const formatMetadataFieldInput = (
|
||||
description: input.description?.trim() ?? null,
|
||||
icon: input.icon,
|
||||
label: input.label.trim(),
|
||||
name: upperFirst(toCamelCase(input.label.trim())),
|
||||
name: toCamelCase(input.label.trim()),
|
||||
type: input.type,
|
||||
});
|
||||
|
@ -1,5 +1,4 @@
|
||||
import toCamelCase from 'lodash.camelcase';
|
||||
import upperFirst from 'lodash.upperfirst';
|
||||
|
||||
import { MetadataObject } from '../types/MetadataObject';
|
||||
|
||||
@ -13,6 +12,6 @@ export const formatMetadataObjectInput = (
|
||||
icon: input.icon,
|
||||
labelPlural: input.labelPlural.trim(),
|
||||
labelSingular: input.labelSingular.trim(),
|
||||
namePlural: upperFirst(toCamelCase(input.labelPlural.trim())),
|
||||
nameSingular: upperFirst(toCamelCase(input.labelSingular.trim())),
|
||||
namePlural: toCamelCase(input.labelPlural.trim()),
|
||||
nameSingular: toCamelCase(input.labelSingular.trim()),
|
||||
});
|
||||
|
@ -5656,13 +5656,6 @@
|
||||
dependencies:
|
||||
"@types/lodash" "*"
|
||||
|
||||
"@types/lodash.upperfirst@^4.3.7":
|
||||
version "4.3.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash.upperfirst/-/lodash.upperfirst-4.3.8.tgz#b488f406f2325f4271c6904f7f9fb560ad6be813"
|
||||
integrity sha512-/R/drl34clakjVOVSgUryl7R18RgAuUWYXKuc3S7Aozw2DW+iqE6hvZJugMtdfzML0fGXs+UCDjafCkctlgIug==
|
||||
dependencies:
|
||||
"@types/lodash" "*"
|
||||
|
||||
"@types/lodash@*", "@types/lodash@^4.14.167":
|
||||
version "4.14.197"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.197.tgz#e95c5ddcc814ec3e84c891910a01e0c8a378c54b"
|
||||
@ -13691,11 +13684,6 @@ lodash.uniq@^4.5.0:
|
||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||
integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==
|
||||
|
||||
lodash.upperfirst@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"
|
||||
integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==
|
||||
|
||||
lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0, lodash@~4.17.0:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
|
Loading…
Reference in New Issue
Block a user