feat: add export to excel

This commit is contained in:
ValdiANS
2026-01-12 17:31:35 +07:00
parent 70eac011f3
commit aff05c6b1a
@@ -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 */}