mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
Merge branch 'feat/FE/US-334/expedition-hpp-report' into 'development'
[FEAT/FE][US#334] Slicing and Integrate API Expedition HPP Report Table See merge request mbugroup/lti-web-client!111
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
ClosingOverhead,
|
||||
ClosingSapronakCalculation,
|
||||
ClosingProductionData,
|
||||
ClosingHppExpedition,
|
||||
} from '@/types/api/closing';
|
||||
import { BaseApiResponse } from '@/types/api/api-general';
|
||||
import { httpClient, httpClientFetcher } from '@/services/http/client';
|
||||
@@ -156,6 +157,24 @@ export class ClosingApiService extends BaseApiService<Closing, null, null> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async getHppEkspedisi(
|
||||
id: number
|
||||
): Promise<BaseApiResponse<ClosingHppExpedition> | undefined> {
|
||||
try {
|
||||
const getHppEkspedisiPath = `${this.basePath}/${id}/expedition-hpp`;
|
||||
const getHppEkspedisiRes =
|
||||
await httpClient<BaseApiResponse<ClosingHppExpedition>>(
|
||||
getHppEkspedisiPath
|
||||
);
|
||||
return getHppEkspedisiRes;
|
||||
} catch (error) {
|
||||
if (axios.isAxiosError<BaseApiResponse<ClosingHppExpedition>>(error)) {
|
||||
return error.response?.data;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const ClosingApi = new ClosingApiService('/closings');
|
||||
|
||||
Reference in New Issue
Block a user