mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
fix(FE): fix merge conflict
This commit is contained in:
@@ -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[]>> {
|
||||
|
||||
Reference in New Issue
Block a user