etender live and purchased list

This commit is contained in:
Jaanu423
2026-01-07 10:41:31 +05:30
parent 59fb7e0df4
commit ce40aa388f
25 changed files with 16431 additions and 40 deletions
+58 -14
View File
@@ -1,12 +1,13 @@
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, 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 { apiCall } from "../../Axios/Axios";
// User
export const userLogin = async (payload: { emailAdd: string, password: string }): Promise<any> => {
try {
const response = await axios.post(LOG_IN_URL, { ...payload, divice: "mobileApp" });
// const response = await axios.post(LOG_IN_URL, { ...payload, divice: "mobileApp" });
const response = await axios.post(TENDER_LOGIN, { ...payload, device: "mobileApp" });
return response.data;
} catch (error: any) {
throw error.response?.data || error.message;
@@ -18,17 +19,8 @@ export const fetchDashboard = async (): Promise<any> => {
return data
}
export const fetchPurchaseTender = async (): Promise<any> => {
const data = await apiCall<any>('get', `${GET_MY_TENDER}`);
return data
}
export const fetchLiveTender = async (): Promise<any> => {
const data = await apiCall<any>('get', `${LIVE_TENDER}`);
return data
}
export const fetchPurchaseAuction = async (): Promise<any> => {
const data = await apiCall<any>('get', `${GET_MY_AUCTION}`);
export const fetchPurchaseAuction = async (payload: any): Promise<any> => {
const data = await apiCall<any>('get', `${GET_MY_AUCTION}`, {}, { payload });
return data
}
export const fetchLiveAuction = async (payload: any): Promise<any> => {
@@ -44,4 +36,56 @@ export const offlineAuctionPurchase = async (payload: any): Promise<any> => {
} catch (error: any) {
throw error.response?.data || error.message;
}
};
};
// Tender Purchase offline
export const offlineTenderPurchase = async (payload: any): Promise<any> => {
try {
const response = await apiCall<any>('post', PURCHASE_TENDER_OFFLINE, payload);
return response.data;
} catch (error: any) {
throw error.response?.data || error.message;
}
};
// tender
export const fetchPurchaseTender = async (payload: any): Promise<any> => {
const data = await apiCall<any>(
'get',
`${GET_MY_TENDER}`, {},
{ payload }
);
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}`
);
console.log('API response:', data);
return data;
};