From 44b9f94cec0152ff827fc1d58b6fd03eae2d5ea6 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Tue, 9 Dec 2025 13:27:15 +0700 Subject: [PATCH] feat(FE-345): Add getHppEkspedisi to ClosingApiService --- src/services/api/closing.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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');