integrated etender biding detail
This commit is contained in:
+20
-26
@@ -1,5 +1,5 @@
|
||||
import axios from "axios";
|
||||
import { DASHBOARD_COUNT, GET_MY_AUCTION, GET_MY_TENDER, GET_TENDER_DETAILS, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION, PURCHASE_TENDER_OFFLINE, TENDER_LOGIN } from "./ApiUrls";
|
||||
import { DASHBOARD_COUNT, GET_MY_AUCTION, GET_MY_TENDER, GET_TENDER_DETAILS, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION, PROCEED_TO_BID, PURCHASE_TENDER_OFFLINE, TENDER_LOGIN } from "./ApiUrls";
|
||||
import { apiCall } from "../../Axios/Axios";
|
||||
|
||||
// User
|
||||
@@ -19,8 +19,8 @@ export const fetchDashboard = async (): Promise<any> => {
|
||||
return data
|
||||
}
|
||||
|
||||
export const fetchPurchaseAuction = async (payload: any): Promise<any> => {
|
||||
const data = await apiCall<any>('get', `${GET_MY_AUCTION}`, {}, { payload });
|
||||
export const fetchPurchaseAuction = async (): Promise<any> => {
|
||||
const data = await apiCall<any>('get', `${GET_MY_AUCTION}`);
|
||||
return data
|
||||
}
|
||||
export const fetchLiveAuction = async (payload: any): Promise<any> => {
|
||||
@@ -49,43 +49,37 @@ export const offlineTenderPurchase = async (payload: any): Promise<any> => {
|
||||
};
|
||||
|
||||
// tender
|
||||
export const fetchPurchaseTender = async (payload: any): Promise<any> => {
|
||||
const data = await apiCall<any>(
|
||||
export const fetchPurchaseTender = async ({
|
||||
page,
|
||||
size,
|
||||
}: {
|
||||
page: number;
|
||||
size: number;
|
||||
}) => {
|
||||
return apiCall<any>(
|
||||
'get',
|
||||
`${GET_MY_TENDER}`, {},
|
||||
{ payload }
|
||||
`${GET_MY_TENDER}?page=${page}&size=${size}`
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
|
||||
// export const fetchPurchaseTender = async (
|
||||
// page: number,
|
||||
// size: number
|
||||
// ): Promise<any> => {
|
||||
// const data = await apiCall<any>(
|
||||
// 'get',
|
||||
// `${GET_MY_TENDER}?page=0&size=${size}`
|
||||
// );
|
||||
|
||||
// console.log('Purchased Tenders Response:', data);
|
||||
// return data;
|
||||
// };
|
||||
|
||||
|
||||
export const fetchLiveTender = async (): Promise<any> => {
|
||||
const data = await apiCall<any>('get', `${LIVE_TENDER}`);
|
||||
return data
|
||||
}
|
||||
export const fetchTenderById = async (tenderId: string): Promise<any> => {
|
||||
console.log('Fetching tender with ID:', tenderId);
|
||||
|
||||
const data = await apiCall<any>(
|
||||
'get',
|
||||
`https://procurelinc.in/EProcurementSB/eTendering/getTenderById?tenderId=${tenderId}`
|
||||
`${GET_TENDER_DETAILS}${tenderId}`
|
||||
);
|
||||
|
||||
console.log('API response:', data);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const proceedToBid = async (tenderId: string): Promise<any> => {
|
||||
const data = await apiCall<any>(
|
||||
'get',
|
||||
`${PROCEED_TO_BID}${tenderId}`
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user