before merge
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
||||
import { fetchAuctionItem, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchPurchaseAuction, fetchPurchaseTender, offlineAuctionPurchase, userLogin } from './apis';
|
||||
import { fetchDashboard, fetchLiveAuction, fetchLiveTender, fetchPurchaseAuction, fetchPurchaseTender, offlineAuctionPurchase, userLogin, offlineTenderPurchase, fetchTenderById, proceedToBid } from './apis';
|
||||
import { contractorStageThreeSubmit, contractorStageTwoSubmit, fetchAuctionItem, fetchCityDropdown, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchMasterData, fetchPurchaseAuction, fetchPurchaseTender, fetchTenderById, getDesignation, getRagistrationState, offlineAuctionPurchase, offlineTenderPurchase, proceedToBid, registerContractor, sendAadhaarOtp, userAuctionLogin, userLogin, verifyAadhaarOtp, verifyGstNumber, verifyPanHandler } from './apis';
|
||||
import { apiCall } from '../../Axios/Axios';
|
||||
|
||||
// User
|
||||
|
||||
export const useLogin = () => {
|
||||
console.log("hitting here")
|
||||
return useMutation({
|
||||
mutationFn: (payload: { emailAdd: string, password: string }) => userLogin(payload),
|
||||
});
|
||||
};
|
||||
export const useAuctionLogin = () => {
|
||||
console.log("hitting here")
|
||||
return useMutation({
|
||||
mutationFn: (payload: { emailAdd: string, password: string }) => userAuctionLogin(payload),
|
||||
});
|
||||
};
|
||||
|
||||
// Dashboard
|
||||
export const useDashboard = () => {
|
||||
@@ -120,4 +127,84 @@ export const useProceedToBid = (tenderId?: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useAuctionItem = () => {
|
||||
return useMutation({
|
||||
mutationFn: (payload: any) => fetchAuctionItem(payload),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// EMD
|
||||
export const useEmdCheck = () => {
|
||||
return useMutation({
|
||||
mutationFn: (payload: any) => fetchEmdCheck(payload),
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetDesignation = () => {
|
||||
return useQuery({
|
||||
queryKey: ['Designation'],
|
||||
queryFn: () => getDesignation()
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
export const useRegisterContractor = () => {
|
||||
return useMutation({
|
||||
mutationFn: (payload: any) => registerContractor(payload),
|
||||
});
|
||||
};
|
||||
|
||||
export const useRagistrationState = () => {
|
||||
return useMutation({
|
||||
mutationFn: () => getRagistrationState(),
|
||||
});
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
export const usefetchMasterData = () => {
|
||||
return useQuery({
|
||||
queryKey: ['MasterData'],
|
||||
queryFn: () => fetchMasterData()
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
export const useCityDropdown = () => {
|
||||
return useMutation({
|
||||
mutationFn: (stateId: number) => fetchCityDropdown(stateId),
|
||||
});
|
||||
};
|
||||
|
||||
export const useVerifyPan = () =>
|
||||
useMutation({
|
||||
mutationFn: verifyPanHandler,
|
||||
});
|
||||
|
||||
|
||||
export const useSendAadhaarOtp = () =>
|
||||
useMutation({
|
||||
mutationFn: sendAadhaarOtp,
|
||||
});
|
||||
|
||||
export const useVerifyAadhaarOtp = () =>
|
||||
useMutation({
|
||||
mutationFn: verifyAadhaarOtp,
|
||||
});
|
||||
|
||||
export const useVerifyGstNumber = () =>
|
||||
useMutation({
|
||||
mutationFn: verifyGstNumber,
|
||||
});
|
||||
|
||||
|
||||
export const useContractorStageTwoSubmit = () =>
|
||||
useMutation({
|
||||
mutationFn: contractorStageTwoSubmit,
|
||||
});
|
||||
|
||||
export const useContractorStageThreeSubmit = () =>
|
||||
useMutation({
|
||||
mutationFn: contractorStageThreeSubmit,
|
||||
});
|
||||
Reference in New Issue
Block a user