fix: move and rename report to expense-report.ts

This commit is contained in:
ValdiANS
2026-04-20 00:29:55 +07:00
parent 5a668c469f
commit aa4da686c6
+31
View File
@@ -0,0 +1,31 @@
import { BaseApiService } from '@/services/api/base';
import { httpClientFetcher } from '@/services/http/client';
import { BaseApiResponse } from '@/types/api/api-general';
import {
ReportDepreciation,
ReportExpense,
} from '@/types/api/report/report-expense';
export class ReportExpenseApiService extends BaseApiService<
ReportExpense,
unknown,
unknown
> {
constructor(basePath: string) {
super(basePath);
}
async getAllFetcher(
endpoint: string
): Promise<BaseApiResponse<ReportExpense[]>> {
return await httpClientFetcher<BaseApiResponse<ReportExpense[]>>(endpoint);
}
}
export const ReportExpenseApi = new ReportExpenseApiService('/reports/expense');
export const DepreciationReportApi = new BaseApiService<
ReportDepreciation,
unknown,
unknown
>('/reports/expense/depreciation');