mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 23:05:46 +00:00
fix: move and rename report to expense-report.ts
This commit is contained in:
@@ -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');
|
||||
Reference in New Issue
Block a user