pre merge

This commit is contained in:
Abin Toppo
2026-01-14 13:37:51 +05:30
parent efec7d480f
commit 4b0717ff6d
19 changed files with 13598 additions and 509 deletions
+25 -12
View File
@@ -1,5 +1,5 @@
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
import { contractorStageThreeSubmit, contractorStageTwoSubmit, fetchAuctionItem, fetchCityDropdown, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchMasterData, fetchPurchaseAuction, fetchPurchaseAuctionList, fetchPurchaseTender, fetchTenderById, getAuction, getDesignation, getRagistrationState, offlineAuctionPurchase, offlineTenderPurchase, partnerShipSubmit, proceedToBid, registerContractor, sendAadhaarOtp, submitEnvelopeA, submitEnvelopeB, uploadEnvelopeFile, userAuctionLogin, userLogin, verifyAadhaarOtp, verifyGstNumber, verifyPanHandler, viewAuctionDocumentDownload, viewAuctionDocuments, viewAuctionItemDocuments, fetchPurchaseAuctionPage } from './apis';
import { contractorStageThreeSubmit, contractorStageTwoSubmit, fetchAuctionItem, fetchCityDropdown, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchMasterData, fetchPurchaseAuction, fetchPurchaseAuctionList, fetchPurchaseTender, fetchTenderById, getAuction, getDesignation, getRagistrationState, offlineAuctionPurchase, offlineTenderPurchase, partnerShipSubmit, proceedToBid, registerContractor, sendAadhaarOtp, submitEnvelopeA, submitEnvelopeB, uploadEnvelopeFile, userAuctionLogin, userLogin, verifyAadhaarOtp, verifyGstNumber, verifyPanHandler, viewAuctionDocumentDownload, viewAuctionDocuments, viewAuctionItemDocuments, fetchPurchaseAuctionPage, tenderDetails, fetchLiveTenderById } from './apis';
// User
@@ -36,18 +36,18 @@ export const useFetchPurchaseTender = () => {
getNextPageParam: (lastPage, allPages) => {
const { totalCount } = lastPage;
const totalPages = Math.ceil(totalCount / size);
const totalPages = Math.ceil(totalCount / 10);
const nextPage = allPages.length;
return nextPage < totalPages ? nextPage : undefined;
},
return page < totalPages ? page + 1 : undefined;
},
select: (data) => ({
...data,
result: data.pages.flatMap(
(page: any) => page?.data ?? []
),
}),
});
select: (data) => ({
...data,
result: data.pages.flatMap(
(page: any) => page?.data ?? []
),
}),
});
};
@@ -298,3 +298,16 @@ export const useAucitonDocDownload = () => {
export const useTenderDetails = () => {
return useMutation({
mutationFn: (tenderId) => tenderDetails(tenderId),
});
};
export const useFetchLiveTenderById = (tenderId:number) => {
return useQuery({
queryKey: ['fetchLiveTenderById', tenderId],
queryFn: () => fetchLiveTenderById(tenderId)
});
};