mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
feat(FE): Closing Finance and adjust reports expense filter request
This commit is contained in:
@@ -23,27 +23,6 @@ export class ReportExpenseApiService extends BaseApiService<
|
||||
// Uncomment this when backend is ready
|
||||
return await httpClientFetcher<BaseApiResponse<ReportExpense[]>>(endpoint);
|
||||
}
|
||||
|
||||
async getSingle(
|
||||
id: number
|
||||
): Promise<BaseApiResponse<ReportExpense> | undefined> {
|
||||
// TODO: Remove this block when backend is ready
|
||||
const { dummyGetSingle } = await import('@/dummy/report/expense.dummy');
|
||||
return await dummyGetSingle(id);
|
||||
|
||||
// Uncomment this when backend is ready
|
||||
// try {
|
||||
// const getSinglePath = `${this.basePath}/${id}`;
|
||||
// const getSingleRes =
|
||||
// await httpClient<BaseApiResponse<ReportExpense>>(getSinglePath);
|
||||
// return getSingleRes;
|
||||
// } catch (error) {
|
||||
// if (axios.isAxiosError<BaseApiResponse<ReportExpense>>(error)) {
|
||||
// return error.response?.data;
|
||||
// }
|
||||
// return undefined;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
export const ReportExpenseApi = new ReportExpenseApiService('/report/expense');
|
||||
export const ReportExpenseApi = new ReportExpenseApiService('/reports/expense');
|
||||
|
||||
Reference in New Issue
Block a user