feat(FE): Closing Finance and adjust reports expense filter request

This commit is contained in:
randy-ar
2025-12-16 17:52:59 +07:00
parent 9c09395677
commit b02b458034
15 changed files with 1476 additions and 254 deletions
+1 -22
View File
@@ -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');