diff --git a/src/services/api/closing.ts b/src/services/api/closing.ts index 66f88c76..8e2f784c 100644 --- a/src/services/api/closing.ts +++ b/src/services/api/closing.ts @@ -1,6 +1,9 @@ import { BaseApiService } from './base'; import { BaseApiResponse } from '@/types/api/api-general'; -import { ClosingSales } from '@/types/api/closing/closing'; +import { + ClosingSales, + ClosingCosExpedition, +} from '@/types/api/closing/closing'; export class ClosingApiService extends BaseApiService< ClosingSales, @@ -23,6 +26,19 @@ export class ClosingApiService extends BaseApiService< return undefined; } } + + async getHppEkspedisi( + id: number + ): Promise | undefined> { + try { + const getHppEkspedisiPath = `http://localhost:4010/api/closing/${id}/hpp-ekspedisi`; + return await this.customRequest>( + getHppEkspedisiPath + ); + } catch { + return undefined; + } + } } export const ClosingApi = new ClosingApiService('/closings');