fix: generate metadata object and field names in camel case (#2250)
Fixes #2249
This commit is contained in:
@ -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()),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user