[feat][FE] Enable deletion of custom fields in workspace (#4802)
**Context** Fixes https://github.com/twentyhq/twenty/issues/4597 Enables deletion of custom fields that aren't active nor of type relation ([BE PR](https://github.com/twentyhq/twenty/pull/4780)) **How was it tested?** Locally tested <img width="541" alt="Capture d’écran 2024-04-04 à 13 33 18" src="https://github.com/twentyhq/twenty/assets/51697796/bc462b86-b494-409e-9836-69bdaeb812cb"> <img width="661" alt="Capture d’écran 2024-04-04 à 13 34 25" src="https://github.com/twentyhq/twenty/assets/51697796/8fe47114-545e-48b5-a107-34be531b7ea5">
This commit is contained in:
@ -32,6 +32,7 @@ import { Table } from '@/ui/layout/table/components/Table';
|
||||
import { TableHeader } from '@/ui/layout/table/components/TableHeader';
|
||||
import { TableSection } from '@/ui/layout/table/components/TableSection';
|
||||
import { Breadcrumb } from '@/ui/navigation/bread-crumb/components/Breadcrumb';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
const StyledDiv = styled.div`
|
||||
display: flex;
|
||||
@ -188,6 +189,10 @@ export const SettingsObjectDetail = () => {
|
||||
ActionIcon={
|
||||
<SettingsObjectFieldInactiveActionDropdown
|
||||
isCustomField={!!disabledMetadataField.isCustom}
|
||||
isRelationType={
|
||||
disabledMetadataField.type ===
|
||||
FieldMetadataType.Relation
|
||||
}
|
||||
scopeKey={disabledMetadataField.id}
|
||||
onActivate={() =>
|
||||
activateMetadataField(disabledMetadataField)
|
||||
|
||||
Reference in New Issue
Block a user