Hide toggle isSyncLabelName for standardObject field edition (#11713)

# Introduction
closes https://github.com/twentyhq/core-team-issues/issues/880
This commit is contained in:
Paul Rastoin
2025-04-24 13:51:10 +02:00
committed by GitHub
parent cc211550ae
commit b545ebc53b

View File

@ -28,13 +28,13 @@ import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
import { H2Title, IconArchive, IconArchiveOff } from 'twenty-ui/display';
import { Button } from 'twenty-ui/input';
import { Section } from 'twenty-ui/layout';
import { FieldMetadataType } from '~/generated-metadata/graphql';
import { useNavigateApp } from '~/hooks/useNavigateApp';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
import { Button } from 'twenty-ui/input';
import { H2Title, IconArchive, IconArchiveOff } from 'twenty-ui/display';
import { Section } from 'twenty-ui/layout';
//TODO: fix this type
type SettingsDataModelFieldEditFormValues = z.infer<
@ -208,7 +208,8 @@ export const SettingsObjectFieldEdit = () => {
fieldMetadataItem={fieldMetadataItem}
maxLength={FIELD_NAME_MAXIMUM_LENGTH}
canToggleSyncLabelWithName={
fieldMetadataItem.type !== FieldMetadataType.RELATION
fieldMetadataItem.type !== FieldMetadataType.RELATION &&
fieldMetadataItem.isCustom === true
}
/>
</Section>