From e69c462b7059c6ef8f930f08ad6b9294c081c72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20M?= Date: Wed, 21 Feb 2024 18:59:51 +0100 Subject: [PATCH] feat: allow backend to rename field of custom object (#4097) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: allow backend to rename field of custom object * feat: allow custom field label edition in Settings Closes #4080 * fix: avoid renaming standard fields --------- Co-authored-by: Thaïs Guigon --- .../SettingsObjectFieldFormSection.tsx | 4 +--- .../data-model/SettingsObjectFieldEdit.tsx | 1 - .../field-metadata/field-metadata.service.ts | 18 ++++++++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx index 94418ad882..f452d06b36 100644 --- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldFormSection.tsx @@ -9,7 +9,6 @@ import { Section } from '@/ui/layout/section/components/Section'; type SettingsObjectFieldFormSectionProps = { disabled?: boolean; - disableNameEdition?: boolean; name?: string; description?: string; iconKey?: string; @@ -31,7 +30,6 @@ const StyledInputsContainer = styled.div` export const SettingsObjectFieldFormSection = ({ disabled, - disableNameEdition, name = '', description = '', iconKey = 'IconUsers', @@ -57,7 +55,7 @@ export const SettingsObjectFieldFormSection = ({ onChange?.({ label: value }); } }} - disabled={disabled || disableNameEdition} + disabled={disabled} fullWidth /> diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx index 4e1eff2954..4bc96b263b 100644 --- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx +++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx @@ -209,7 +209,6 @@ export const SettingsObjectFieldEdit = () => {