refactor: remove unused DataTable component and clean up filter logic in FullPagePageIndex

This commit is contained in:
Firman Ramdhani
2026-07-23 16:50:09 +07:00
parent 8f2eecd8ae
commit 94e7b99712
7 changed files with 20 additions and 308 deletions
@@ -13,7 +13,11 @@ import {
} from 'ag-grid-community';
import { Box, Group, TextInput, Indicator, CloseButton } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { Search, Filter, Settings } from 'lucide-react';
import {
Search,
Filter,
// Settings
} from 'lucide-react';
import { DataGrid, StatusBadge, PageActions } from '../../../../components';
import type { PageActionProps } from '../../../../components';
@@ -205,7 +209,7 @@ export function EnterpriseDataTable<E extends BaseEntity>(props: EnterpriseDataT
// Local UI State
// ---------------------------------------------------------------------------
const [openedFilter, { open: openFilter, close: closeFilter }] = useDisclosure(false);
const [openedSetting, { open: openSetting, close: closeSetting }] = useDisclosure(false);
// const [openedSetting, { open: openSetting, close: closeSetting }] = useDisclosure(false);
const moduleTitle = config.tabTitle || t(`${config.translationNamespace}:title`);
// Reference to the AG Grid API for programmatic interaction
@@ -829,14 +833,14 @@ export function EnterpriseDataTable<E extends BaseEntity>(props: EnterpriseDataT
tooltipLabel: t('common:actions.filter'),
onClick: openFilter,
},
{
key: 'setting',
icon: <Settings size={16} />,
variant: 'default',
showLabel: false,
tooltipLabel: t('common:actions.setting'),
onClick: openSetting,
},
// {
// key: 'setting',
// icon: <Settings size={16} />,
// variant: 'default',
// showLabel: false,
// tooltipLabel: t('common:actions.setting'),
// onClick: openSetting,
// },
]}
/>
</Group>
@@ -907,11 +911,11 @@ export function EnterpriseDataTable<E extends BaseEntity>(props: EnterpriseDataT
onFilter={handleFilterApply}
/>
<TableSettingDrawer
{/* <TableSettingDrawer
opened={openedSetting}
onClose={closeSetting}
title={t('common:tableSettingTitle', { module: moduleTitle })}
/>
/> */}
</Box>
);
}
@@ -631,7 +631,7 @@ export function EnterpriseDetailPageProvider<E extends BaseEntity = BaseEntity>(
style: { fontSize: 12 },
};
}}
actions={pageActions}
actions={detailData ? pageActions : []}
{...pageHeaderPropsValue}
moduleKey={moduleKey}
titleProps={{