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, ClosingSapronakCalculation,
ClosingProductionData, ClosingProductionData,
ClosingHppExpedition, ClosingHppExpedition,
ClosingIncomingSapronakSummary,
ClosingOutgoingSapronakSummary,
} from '@/types/api/closing'; } from '@/types/api/closing';
import { BaseApiResponse } from '@/types/api/api-general'; import { BaseApiResponse } from '@/types/api/api-general';
import { httpClient, httpClientFetcher } from '@/services/http/client'; 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( async getAllOutgoingSapronakFetcher(
endpoint: string endpoint: string
): Promise<BaseApiResponse<ClosingOutgoingSapronak[]>> { ): 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( async getGeneralInfo(
id: number id: number
): Promise<BaseApiResponse<ClosingGeneralInformation> | undefined> { ): Promise<BaseApiResponse<ClosingGeneralInformation> | undefined> {