refactor(FE): Remove unused imports and redundant code

This commit is contained in:
rstubryan
2026-02-20 14:17:26 +07:00
parent de0f9ae985
commit 1f2f3acebb
90 changed files with 222 additions and 474 deletions
@@ -65,7 +65,7 @@ const getTableColumns = (
header: 'No',
flex: 0.5,
align: 'center',
cell: ({ row, index }) => index + 1,
cell: ({ index }) => index + 1,
footer: 'Total',
},
{
@@ -49,7 +49,7 @@ const getTableColumns = (total?: DebtSupplier['total']): PdfColumn[] => {
header: 'No',
flex: 0.5,
align: 'center',
cell: ({ row, index }) => index + 1,
cell: ({ index }) => index + 1,
footer: 'Total',
},
{
@@ -2,7 +2,7 @@
import ExcelJS from 'exceljs';
import { formatDate } from '@/lib/helper';
import { DebtRow, DebtSupplier } from '@/types/api/report/debt-supplier';
import { DebtSupplier } from '@/types/api/report/debt-supplier';
interface DebtSupplierExportExcelParams {
data: DebtSupplier[];
@@ -1,7 +1,6 @@
import DataStateSkeleton from '@/components/helper/skeleton/DataStateSkeleton';
import Table from '@/components/Table';
import { DebtRow } from '@/types/api/report/debt-supplier';
import { Icon } from '@iconify/react';
import { ColumnDef } from '@tanstack/react-table';
const DebtSupplierSkeleton = ({
@@ -129,7 +129,7 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
filterModal.closeModal();
setIsSubmitted(true);
},
onReset: (values) => {
onReset: () => {
setFilterParams({
start_date: undefined,
end_date: undefined,
@@ -170,10 +170,6 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
: [],
[debtSupplier]
);
const meta =
isResponseSuccess(debtSupplier) && debtSupplier?.meta
? debtSupplier.meta
: null;
// ===== EXPORT DATA FETCHER =====
const debtSupplierExport = useCallback(async (): Promise<