Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve the softdelete style #6846

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const useHandleToggleTrashColumnFilter = ({

const handleToggleTrashColumnFilter = useCallback(() => {
const trashFieldMetadata = objectMetadataItem.fields.find(
(field) => field.name === 'deletedAt',
(field: { name: string }) => field.name === 'deletedAt',
);

if (!isDefined(trashFieldMetadata)) return;
Expand All @@ -52,7 +52,7 @@ export const useHandleToggleTrashColumnFilter = ({
operand: ViewFilterOperand.IsNotEmpty,
displayValue: '',
definition: {
label: `Deleted ${objectMetadataItem.namePlural}`,
label: `Deleted`,
iconName: 'IconTrash',
pacyL2K19 marked this conversation as resolved.
Show resolved Hide resolved
fieldMetadataId: trashFieldMetadata.id,
type: filterType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
IconEyeOff,
IconFileExport,
IconFileImport,
IconRotate2,
IconSettings,
IconTag,
IconTrash,
} from 'twenty-ui';

import { useObjectNamePluralFromSingular } from '@/object-metadata/hooks/useObjectNamePluralFromSingular';
Expand Down Expand Up @@ -165,8 +165,7 @@ export const RecordIndexOptionsDropdownContent = ({
handleToggleTrashColumnFilter();
closeDropdown();
}}
LeftIcon={IconTrash}
accent="danger"
LeftIcon={IconRotate2}
text={`Deleted ${objectNamePlural}`}
/>
</DropdownMenuItemsContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export {
IconRestore,
IconRocket,
IconRotate,
IconRotate2,
IconSearch,
IconSend,
IconSettings,
Expand Down
Loading