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:
@ -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