feat: create getAllIncomingSapronakSummaryFetcher and getAllOutgoingSapronakSummaryFetcher method

This commit is contained in:
ValdiANS
2026-01-19 14:46:29 +07:00
parent 949b5cbc12
commit e143668f82
+18
View File
@@ -11,6 +11,8 @@ import {
ClosingSapronakCalculation,
ClosingProductionData,
ClosingHppExpedition,
ClosingIncomingSapronakSummary,
ClosingOutgoingSapronakSummary,
} from '@/types/api/closing';
import { BaseApiResponse } from '@/types/api/api-general';
import { httpClient, httpClientFetcher } from '@/services/http/client';
@@ -62,6 +64,14 @@ export class ClosingApiService extends BaseApiService<Closing, null, null> {
);
}
async getAllIncomingSapronakSummaryFetcher(
endpoint: string
): Promise<BaseApiResponse<ClosingIncomingSapronakSummary[]>> {
return await httpClientFetcher<
BaseApiResponse<ClosingIncomingSapronakSummary[]>
>(endpoint);
}
async getAllOutgoingSapronakFetcher(
endpoint: string
): Promise<BaseApiResponse<ClosingOutgoingSapronak[]>> {
@@ -70,6 +80,14 @@ export class ClosingApiService extends BaseApiService<Closing, null, null> {
);
}
async getAllOutgoingSapronakSummaryFetcher(
endpoint: string
): Promise<BaseApiResponse<ClosingOutgoingSapronakSummary[]>> {
return await httpClientFetcher<
BaseApiResponse<ClosingOutgoingSapronakSummary[]>
>(endpoint);
}
async getGeneralInfo(
id: number
): Promise<BaseApiResponse<ClosingGeneralInformation> | undefined> {