mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-345): Add getHppEkspedisi to ClosingApiService
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
import { BaseApiService } from './base';
|
import { BaseApiService } from './base';
|
||||||
import { BaseApiResponse } from '@/types/api/api-general';
|
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<
|
export class ClosingApiService extends BaseApiService<
|
||||||
ClosingSales,
|
ClosingSales,
|
||||||
@@ -23,6 +26,19 @@ export class ClosingApiService extends BaseApiService<
|
|||||||
return undefined;
|
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');
|
export const ClosingApi = new ClosingApiService('/closings');
|
||||||
|
|||||||
Reference in New Issue
Block a user