mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
feat(FE-361,363): Add export dropdown to PurchasesPerSupplier tab
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import Tabs from '@/components/Tabs';
|
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 LogisticStockTabs = () => {
|
||||||
const tabs = [
|
const tabs = [
|
||||||
@@ -13,12 +13,12 @@ const LogisticStockTabs = () => {
|
|||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
label: 'Rekapitulasi Pemakaian Barang',
|
label: 'Rekapitulasi Pemakaian Barang',
|
||||||
content: <PurchasesPerSupplierTab />,
|
content: 'Rekapitulasi Pemakaian Barang Tab',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '3',
|
id: '3',
|
||||||
label: 'Rekapitulasi Stock Persediaan Barang',
|
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 { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||||
import Pagination from '@/components/Pagination';
|
import Pagination from '@/components/Pagination';
|
||||||
import Button from '@/components/Button';
|
import Button from '@/components/Button';
|
||||||
|
import Dropdown from '@/components/Dropdown';
|
||||||
|
import MenuItem from '@/components/menu/MenuItem';
|
||||||
|
import Menu from '@/components/menu/Menu';
|
||||||
|
|
||||||
interface Totals {
|
interface Totals {
|
||||||
totalQty: number;
|
totalQty: number;
|
||||||
@@ -219,6 +222,14 @@ const PurchasesPerSupplierTab = () => {
|
|||||||
? purchasePerSupplier.meta
|
? purchasePerSupplier.meta
|
||||||
: undefined;
|
: 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 =====
|
// ===== PAGINATION HANDLERS =====
|
||||||
const handlePageChange = (page: number) => {
|
const handlePageChange = (page: number) => {
|
||||||
setCurrentPage(page);
|
setCurrentPage(page);
|
||||||
@@ -415,7 +426,15 @@ const PurchasesPerSupplierTab = () => {
|
|||||||
<Button color='warning' onClick={resetFilters}>
|
<Button color='warning' onClick={resetFilters}>
|
||||||
Reset
|
Reset
|
||||||
</Button>
|
</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>
|
||||||
<div className='grid grid-cols-12 gap-4'>
|
<div className='grid grid-cols-12 gap-4'>
|
||||||
<SelectInput
|
<SelectInput
|
||||||
Reference in New Issue
Block a user