mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat: add export to excel
This commit is contained in:
@@ -29,6 +29,8 @@ import { ColumnDef } from '@tanstack/react-table';
|
||||
import { report } from 'process';
|
||||
import { PhaseApi } from '@/services/api/daily-checklist/phase';
|
||||
import { EmployeeApi } from '@/services/api/daily-checklist/employee';
|
||||
import { Button } from '@/figma-make/components/base/button';
|
||||
import { Download } from 'lucide-react';
|
||||
|
||||
const MONTH_OPTIONS = [
|
||||
{ value: '1', label: 'Januari' },
|
||||
@@ -262,9 +264,11 @@ export function DailyChecklistReportsContent() {
|
||||
},
|
||||
];
|
||||
|
||||
// const exportToCSV = () => {
|
||||
// toast.info('Export CSV akan segera tersedia');
|
||||
// };
|
||||
const exportToCSV = () => {
|
||||
DailyChecklistApi.exportDailyChecklistReportToExcel(
|
||||
getTableFilterQueryString()
|
||||
);
|
||||
};
|
||||
|
||||
const monthChangeHandler = (value: string) => updateFilter('bulan', value);
|
||||
const yearChangeHandler = (value: string) => updateFilter('tahun', value);
|
||||
@@ -306,13 +310,13 @@ export function DailyChecklistReportsContent() {
|
||||
Laporan lengkap checklist harian
|
||||
</p>
|
||||
</div>
|
||||
{/* <Button
|
||||
<Button
|
||||
onClick={exportToCSV}
|
||||
className='bg-[#0069e0] hover:bg-[#0058c0] text-white'
|
||||
>
|
||||
<Download className='w-4 h-4 mr-2' />
|
||||
Export CSV
|
||||
</Button> */}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Main Card */}
|
||||
|
||||
Reference in New Issue
Block a user