mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
feat(FE): Support fetching HPP ekspedisi by kandang
This commit is contained in:
@@ -162,6 +162,23 @@ export class ClosingApiService extends BaseApiService<Closing, null, null> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async getHppEkspedisiByKandang(
|
||||
closingId: number,
|
||||
kandangId: number
|
||||
): Promise<BaseApiResponse<ClosingHppExpedition> | undefined> {
|
||||
try {
|
||||
const path = `${this.basePath}/${closingId}/${kandangId}/expedition-hpp`;
|
||||
return await httpClient<BaseApiResponse<ClosingHppExpedition>>(path, {
|
||||
method: 'GET',
|
||||
});
|
||||
} 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