second commit
This commit is contained in:
@@ -40,7 +40,7 @@ const GET_DOCID = `${BASE_URL}eTendering/download/docId?docId=`
|
||||
const DOWNLOAD_DOC = `${BASE_URL}eTendering/download/docId?docId=`
|
||||
const TWO_FACTOR_AUTH = `${BASE_URL}contractor/two-factor-auth?status=`
|
||||
const AUCTION_LOGIN = `https://api.godemo.in/Auction/auction/loginWithoutDecryption`
|
||||
const GET_AUCTION_DETAILS = `${BASE_URL_Auction}api/auction/getAuction/id?id=`
|
||||
const GET_AUCTION_DETAILS = `${BASE_URL_Auction}api/auction/getAuction/id`
|
||||
const TANDER_PURCHASE_STATUS = `https://procurelinc.in/EProcurementSB/tenderPayment/transactionStatus?orderNo=`
|
||||
const GET_MY_AUCTION = `${BASE_URL_Auction}api/auction/getMyAuction`
|
||||
const GET_MY_TENDER = "https://procurelinc.in/EProcurementSB/tenderBidding/getAllPurchasedTendersByConId"
|
||||
@@ -61,10 +61,12 @@ const ITEM_DOCUMENT_DOWNLOAD = `${BASE_URL_Auction}api/auction/home/downloadDocu
|
||||
|
||||
// Rohit
|
||||
const DASHBOARD_COUNT = `${BASE_URL_Auction}api/auction/home/dashboard/counts`
|
||||
const AUCTION_ONE_TIME_BID =`${BASE_URL_Auction}api/bidding/getBidForAuction`
|
||||
|
||||
export {
|
||||
// Rohit
|
||||
DASHBOARD_COUNT,
|
||||
AUCTION_ONE_TIME_BID,
|
||||
ITEM_DOCUMENT_DOWNLOAD,
|
||||
ITEM_DETAIL,
|
||||
TECHNICAL_DOCUMENT_SUBMIT,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
||||
import { fetchDashboard, fetchLiveAuction, fetchLiveTender, fetchPurchaseAuction, fetchPurchaseTender, offlineAuctionPurchase, userLogin } from './apis';
|
||||
import { fetchAuctionItem, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchPurchaseAuction, fetchPurchaseTender, offlineAuctionPurchase, userLogin } from './apis';
|
||||
|
||||
// User
|
||||
|
||||
@@ -74,4 +74,17 @@ export const useOfflineAuctionPurchase = () => {
|
||||
return useMutation({
|
||||
mutationFn: (payload: any) => offlineAuctionPurchase(payload),
|
||||
});
|
||||
};
|
||||
|
||||
// EMD
|
||||
export const useEmdCheck = () => {
|
||||
return useMutation({
|
||||
mutationFn: (payload: any) => fetchEmdCheck(payload),
|
||||
});
|
||||
};
|
||||
|
||||
export const useAuctionItem = () => {
|
||||
return useMutation({
|
||||
mutationFn: (payload: any) => fetchAuctionItem(payload),
|
||||
});
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from "axios";
|
||||
import { DASHBOARD_COUNT, GET_MY_AUCTION, GET_MY_TENDER, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION } from "./ApiUrls";
|
||||
import { DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_MY_AUCTION, GET_MY_TENDER, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION, PURCHASE_OFFLINE_AUCTION, REVERSE_AUCTION_ITEM } from "./ApiUrls";
|
||||
import { apiCall } from "../../Axios/Axios";
|
||||
|
||||
// User
|
||||
@@ -39,8 +39,35 @@ export const fetchLiveAuction = async (payload: any): Promise<any> => {
|
||||
// Auction Purchase offline
|
||||
export const offlineAuctionPurchase = async (payload: any): Promise<any> => {
|
||||
try {
|
||||
const response = await axios.post(PROCEED_PURCHASE_AUCTION, payload);
|
||||
return response.data;
|
||||
const response = await apiCall<any>('post', `${PURCHASE_OFFLINE_AUCTION}`, payload);
|
||||
return response;
|
||||
} catch (error: any) {
|
||||
throw error.response?.data || error.message;
|
||||
}
|
||||
};
|
||||
|
||||
// EMD
|
||||
|
||||
export const fetchEmdCheck = async (payload: any): Promise<any> => {
|
||||
try {
|
||||
const response = await apiCall<any>('get', `${EMD_CHECK}`, {}, payload);
|
||||
return response;
|
||||
} catch (error: any) {
|
||||
throw error.response?.data || error.message;
|
||||
}
|
||||
};
|
||||
|
||||
export const fetchAuctionItem = async (payload: any): Promise<any> => {
|
||||
try {
|
||||
if (payload.status == 'Reverse') {
|
||||
const response = await apiCall<any>('get', `${REVERSE_AUCTION_ITEM}`, {}, payload);
|
||||
return response;
|
||||
} else {
|
||||
const response = await apiCall<any>('get', `${FORARD_AUCTION_ITEM}`, {}, payload);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
} catch (error: any) {
|
||||
throw error.response?.data || error.message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user