hotfix(FE): Pass sales data to ClosingDetail and fix sales API

This commit is contained in:
rstubryan
2025-12-10 15:05:52 +07:00
parent 8c2683c440
commit d7199fad53
4 changed files with 30 additions and 20 deletions
+5 -4
View File
@@ -20,10 +20,11 @@ export class ClosingApiService extends BaseApiService<Closing, null, null> {
id: number
): Promise<BaseApiResponse<ClosingSales> | undefined> {
try {
const getPenjualanPath = `${id}/penjualan`;
return await this.customRequest<BaseApiResponse<ClosingSales>>(
getPenjualanPath
);
const getPenjualanPath = `${this.basePath}/${id}/penjualan`;
const getPenjualanRes =
await httpClient<BaseApiResponse<ClosingSales>>(getPenjualanPath);
return getPenjualanRes;
} catch (error) {
if (axios.isAxiosError<BaseApiResponse<ClosingSales>>(error)) {
return error.response?.data;