refactor: remove unused DataTable component and clean up filter logic in FullPagePageIndex
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
"collapseAll": "Collapse all menu",
|
||||
"searchMenu": "Search menu",
|
||||
"searchData": "Search data",
|
||||
"searchPlaceholder": "Type to search & press Enter...",
|
||||
"searchPlaceholder": "Type to search & press enter...",
|
||||
"collapse": "Collapse",
|
||||
"expandSidebar": "Expand Sidebar",
|
||||
"filterTitle": "Filter {{module}}",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"collapseAll": "Tutup semua menu",
|
||||
"searchMenu": "Cari menu",
|
||||
"searchData": "Cari data",
|
||||
"searchPlaceholder": "Ketik pencarian & tekan Enter...",
|
||||
"searchPlaceholder": "Ketik pencarian & tekan enter...",
|
||||
"collapse": "Tutup",
|
||||
"expandSidebar": "Perluas Bilah Sisi",
|
||||
"filterTitle": "Filter {{module}}",
|
||||
|
||||
@@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user