fix(FE): fix merge conflict

This commit is contained in:
randy-ar
2025-12-10 16:53:50 +07:00
80 changed files with 4803 additions and 1423 deletions
+18
View File
@@ -18,6 +18,7 @@ import {
dummyGetPerhitunganSapronak,
} from '@/dummy/closing.dummy';
import { httpClient, httpClientFetcher } from '@/services/http/client';
import { ClosingSales } from '@/types/api/closing';
export class ClosingApiService extends BaseApiService<Closing, null, null> {
constructor(basePath: string) {
@@ -57,6 +58,23 @@ export class ClosingApiService extends BaseApiService<Closing, null, null> {
}
}
async getPenjualan(
id: number
): Promise<BaseApiResponse<ClosingSales> | undefined> {
try {
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;
}
return undefined;
}
}
async getAllIncomingSapronakFetcher(
endpoint: string
): Promise<BaseApiResponse<ClosingIncomingSapronak[]>> {