Update SettingsObjectAboutSection.tsx changed "Disable" CTA to "Deact… (#4175)
* Update SettingsObjectAboutSection.tsx changed "Disable" CTA to "Deactivate" * Update SettingsObjects.tsx Additional changes: Disabled sections to inactive * Update SettingsObjectAboutSection.tsx I think you meant changing Disable to Deactivate * Update and rename SettingsObjectDisabledMenuDropDown.tsx to SettingsObjectInactiveMenuDropDown.tsx additional changes to #4153 * Update SettingsObjects.tsx * Update and rename SettingsObjectDisabledMenuDropDown.stories.tsx to SettingsObjectInactiveMenuDropDown.stories.tsx * fix typescript errors * respect issue requirements --------- Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
@ -10,7 +10,7 @@ import { isLabelIdentifierField } from '@/object-metadata/utils/isLabelIdentifie
|
||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||
import { SettingsAboutSection } from '@/settings/data-model/object-details/components/SettingsObjectAboutSection';
|
||||
import { SettingsObjectFieldActiveActionDropdown } from '@/settings/data-model/object-details/components/SettingsObjectFieldActiveActionDropdown';
|
||||
import { SettingsObjectFieldDisabledActionDropdown } from '@/settings/data-model/object-details/components/SettingsObjectFieldDisabledActionDropdown';
|
||||
import { SettingsObjectFieldInactiveActionDropdown } from '@/settings/data-model/object-details/components/SettingsObjectFieldDisabledActionDropdown';
|
||||
import {
|
||||
SettingsObjectFieldItemTableRow,
|
||||
StyledObjectFieldTableRow,
|
||||
@ -94,7 +94,7 @@ export const SettingsObjectDetail = () => {
|
||||
iconKey={activeObjectMetadataItem.icon ?? undefined}
|
||||
name={activeObjectMetadataItem.labelPlural || ''}
|
||||
isCustom={activeObjectMetadataItem.isCustom}
|
||||
onDisable={handleDisableObject}
|
||||
onDeactivate={handleDisableObject}
|
||||
onEdit={() => navigate('./edit')}
|
||||
/>
|
||||
<Section>
|
||||
@ -155,7 +155,7 @@ export const SettingsObjectDetail = () => {
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
onDisable={
|
||||
onDeactivate={
|
||||
isLabelIdentifier
|
||||
? undefined
|
||||
: () => handleDisableField(activeMetadataField)
|
||||
@ -168,7 +168,7 @@ export const SettingsObjectDetail = () => {
|
||||
</TableSection>
|
||||
)}
|
||||
{!!disabledMetadataFields.length && (
|
||||
<TableSection isInitiallyExpanded={false} title="Disabled">
|
||||
<TableSection isInitiallyExpanded={false} title="Inactive">
|
||||
{disabledMetadataFields.map((disabledMetadataField) => (
|
||||
<SettingsObjectFieldItemTableRow
|
||||
key={disabledMetadataField.id}
|
||||
@ -179,7 +179,7 @@ export const SettingsObjectDetail = () => {
|
||||
}
|
||||
fieldMetadataItem={disabledMetadataField}
|
||||
ActionIcon={
|
||||
<SettingsObjectFieldDisabledActionDropdown
|
||||
<SettingsObjectFieldInactiveActionDropdown
|
||||
isCustomField={!!disabledMetadataField.isCustom}
|
||||
scopeKey={disabledMetadataField.id}
|
||||
onActivate={() =>
|
||||
|
||||
@ -11,7 +11,7 @@ import {
|
||||
StyledObjectTableRow,
|
||||
} from '@/settings/data-model/object-details/components/SettingsObjectItemTableRow';
|
||||
import { SettingsObjectCoverImage } from '@/settings/data-model/objects/SettingsObjectCoverImage';
|
||||
import { SettingsObjectDisabledMenuDropDown } from '@/settings/data-model/objects/SettingsObjectDisabledMenuDropDown';
|
||||
import { SettingsObjectInactiveMenuDropDown } from '@/settings/data-model/objects/SettingsObjectInactiveMenuDropDown';
|
||||
import { IconChevronRight, IconPlus, IconSettings } from '@/ui/display/icon';
|
||||
import { H1Title } from '@/ui/display/typography/components/H1Title';
|
||||
import { H2Title } from '@/ui/display/typography/components/H2Title';
|
||||
@ -37,7 +37,7 @@ export const SettingsObjects = () => {
|
||||
const {
|
||||
activateObjectMetadataItem,
|
||||
activeObjectMetadataItems,
|
||||
disabledObjectMetadataItems,
|
||||
inactiveObjectMetadataItems,
|
||||
eraseObjectMetadataItem,
|
||||
} = useObjectMetadataItemForSettings();
|
||||
|
||||
@ -89,25 +89,25 @@ export const SettingsObjects = () => {
|
||||
))}
|
||||
</TableSection>
|
||||
)}
|
||||
{!!disabledObjectMetadataItems.length && (
|
||||
<TableSection title="Disabled">
|
||||
{disabledObjectMetadataItems.map(
|
||||
(disabledObjectMetadataItem) => (
|
||||
{!!inactiveObjectMetadataItems.length && (
|
||||
<TableSection title="Inactive">
|
||||
{inactiveObjectMetadataItems.map(
|
||||
(inactiveObjectMetadataItem) => (
|
||||
<SettingsObjectItemTableRow
|
||||
key={disabledObjectMetadataItem.namePlural}
|
||||
objectItem={disabledObjectMetadataItem}
|
||||
key={inactiveObjectMetadataItem.namePlural}
|
||||
objectItem={inactiveObjectMetadataItem}
|
||||
action={
|
||||
<SettingsObjectDisabledMenuDropDown
|
||||
isCustomObject={disabledObjectMetadataItem.isCustom}
|
||||
scopeKey={disabledObjectMetadataItem.namePlural}
|
||||
<SettingsObjectInactiveMenuDropDown
|
||||
isCustomObject={inactiveObjectMetadataItem.isCustom}
|
||||
scopeKey={inactiveObjectMetadataItem.namePlural}
|
||||
onActivate={() =>
|
||||
activateObjectMetadataItem(
|
||||
disabledObjectMetadataItem,
|
||||
inactiveObjectMetadataItem,
|
||||
)
|
||||
}
|
||||
onErase={() =>
|
||||
eraseObjectMetadataItem(
|
||||
disabledObjectMetadataItem,
|
||||
inactiveObjectMetadataItem,
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user