mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
feat(FE-345): Add getHppEkspedisi to ClosingApiService
This commit is contained in:
@@ -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<BaseApiResponse<ClosingCosExpedition> | undefined> {
|
||||
try {
|
||||
const getHppEkspedisiPath = `http://localhost:4010/api/closing/${id}/hpp-ekspedisi`;
|
||||
return await this.customRequest<BaseApiResponse<ClosingCosExpedition>>(
|
||||
getHppEkspedisiPath
|
||||
);
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const ClosingApi = new ClosingApiService('/closings');
|
||||
|
||||
Reference in New Issue
Block a user