fix(FE): delete dummy data and separate service api file

This commit is contained in:
randy-ar
2026-01-13 12:03:45 +07:00
parent 6a58be8c67
commit b9212d1241
5 changed files with 49 additions and 357 deletions
+39
View File
@@ -0,0 +1,39 @@
import { BaseApiService } from '@/services/api/base';
import { BaseApiResponse } from '@/types/api/api-general';
import { DebtSupplier } from '@/types/api/report/debt-supplier';
export class DebtSupplierApiService extends BaseApiService<
DebtSupplier,
unknown,
unknown
> {
constructor(basePath: string) {
super(basePath);
}
async getDebtSupplierReport(
supplier_ids?: string,
filter_by?: string,
start_date?: string,
end_date?: string,
page?: number,
limit?: number
): Promise<BaseApiResponse<DebtSupplier[]> | undefined> {
return await this.customRequest<BaseApiResponse<DebtSupplier[]>>(
`debt-supplier`,
{
method: 'GET',
params: {
supplier_ids: supplier_ids,
filter_by: filter_by,
start_date: start_date,
end_date: end_date,
page: page,
limit: limit,
},
}
);
}
}
export const DebtSupplierApi = new DebtSupplierApiService('reports');