mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-361,363): Add export dropdown to PurchasesPerSupplier tab
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import Tabs from '@/components/Tabs';
|
||||
import PurchasesPerSupplierTab from '@/components/pages/report/logistic-stock/PurchasesPerSupplierTab';
|
||||
import PurchasesPerSupplierTab from '@/components/pages/report/logistic-stock/tab/PurchasesPerSupplierTab';
|
||||
|
||||
const LogisticStockTabs = () => {
|
||||
const tabs = [
|
||||
@@ -13,12 +13,12 @@ const LogisticStockTabs = () => {
|
||||
{
|
||||
id: '2',
|
||||
label: 'Rekapitulasi Pemakaian Barang',
|
||||
content: <PurchasesPerSupplierTab />,
|
||||
content: 'Rekapitulasi Pemakaian Barang Tab',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
label: 'Rekapitulasi Stock Persediaan Barang',
|
||||
content: <PurchasesPerSupplierTab />,
|
||||
content: 'Rekapitulasi Stock Persediaan Barang Tab',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
+20
-1
@@ -22,6 +22,9 @@ import { isResponseSuccess } from '@/lib/api-helper';
|
||||
import { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||
import Pagination from '@/components/Pagination';
|
||||
import Button from '@/components/Button';
|
||||
import Dropdown from '@/components/Dropdown';
|
||||
import MenuItem from '@/components/menu/MenuItem';
|
||||
import Menu from '@/components/menu/Menu';
|
||||
|
||||
interface Totals {
|
||||
totalQty: number;
|
||||
@@ -219,6 +222,14 @@ const PurchasesPerSupplierTab = () => {
|
||||
? purchasePerSupplier.meta
|
||||
: undefined;
|
||||
|
||||
const handleExportExcel = useCallback(() => {
|
||||
alert('Export to Excel functionality to be implemented.');
|
||||
}, []);
|
||||
|
||||
const handleExportPdf = useCallback(() => {
|
||||
alert('Export to PDF functionality to be implemented.');
|
||||
}, []);
|
||||
|
||||
// ===== PAGINATION HANDLERS =====
|
||||
const handlePageChange = (page: number) => {
|
||||
setCurrentPage(page);
|
||||
@@ -415,7 +426,15 @@ const PurchasesPerSupplierTab = () => {
|
||||
<Button color='warning' onClick={resetFilters}>
|
||||
Reset
|
||||
</Button>
|
||||
<Button color='success'>Export</Button>
|
||||
<Dropdown
|
||||
trigger={<Button color='success'>Export</Button>}
|
||||
align='end'
|
||||
>
|
||||
<Menu className='w-32'>
|
||||
<MenuItem title='Excel' onClick={handleExportExcel} />
|
||||
<MenuItem title='PDF' onClick={handleExportPdf} />
|
||||
</Menu>
|
||||
</Dropdown>
|
||||
</div>
|
||||
<div className='grid grid-cols-12 gap-4'>
|
||||
<SelectInput
|
||||
Reference in New Issue
Block a user