mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Remove unused imports and redundant code
This commit is contained in:
@@ -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<
|
||||
|
||||
Reference in New Issue
Block a user