This commit is contained in:
Abin Toppo
2026-01-19 11:53:51 +05:30
13 changed files with 863 additions and 22 deletions
+1
View File
@@ -25,6 +25,7 @@ const colors = {
border: '#E5E7EB',
lightGray: '#F9FAFB',
disabled: '#D1D5DB',
gray:'#b9babb',
// Additional
placeholder: '#9CA3AF',
+1
View File
@@ -21,6 +21,7 @@ const NavigationString = {
LiveTenderDetail:'LiveTenderDetail',
AuctionDetail: 'AuctionDetail',
Profile:'Profile',
ViewTenderDetail:'ViewTenderDetail',
KycWebViewScreen:'KycWebViewScreen'
}
export default NavigationString
+2 -2
View File
@@ -8,7 +8,7 @@ import BottomTab from './Bottom';
export default function MainStack() {
const Stack = createStackNavigator();
const option = { headerShown: false };
const fadeTransition = {
const fadeTransition = {
gestureDirection: 'horizontal',
transitionSpec: {
open: { animation: 'timing', config: { duration: 300 } },
@@ -46,7 +46,7 @@ export default function MainStack() {
<Stack.Screen name={NavigationString.Registration} component={Screens.Registration} options={option} />
<Stack.Screen name={NavigationString.Partnership} component={Screens.Partnership} options={option} />
<Stack.Screen name={NavigationString.LiveTenderDetail} component={Screens.LiveTenderDetail} options={option} />
<Stack.Screen name={NavigationString.KycWebViewScreen} component={Screens.KycWebViewScreen} options={option} />
<Stack.Screen name={NavigationString.ViewTenderDetail} component={Screens.ViewTenderDetail} options={option} /> <Stack.Screen name={NavigationString.KycWebViewScreen} component={Screens.KycWebViewScreen} options={option} />
</Stack.Navigator>
);
}
+1 -1
View File
@@ -116,7 +116,7 @@ const LiveTender = () => {
<FlatList
data={data?.result ?? []}
keyExtractor={(item) => String(item.auctionId)}
keyExtractor={(item) => String(item.tenderId)}
renderItem={renderItem}
showsVerticalScrollIndicator={false}
contentContainerStyle={{ paddingBottom: 50, paddingTop: 10 }}
+31 -11
View File
@@ -1,4 +1,4 @@
import { StyleSheet, Text, View, ScrollView, StatusBar, TouchableOpacity, RefreshControl, ActivityIndicator } from 'react-native'
import { StyleSheet, Text, View, ScrollView, StatusBar, TouchableOpacity, RefreshControl, ActivityIndicator, Platform } from 'react-native'
import React, { useCallback, useEffect } from 'react'
import { InsideHeader } from '../../Component/Index'
import colors from '../../Constant/Color'
@@ -9,7 +9,7 @@ const ProceedToBidDetail = () => {
// Sample data based on your JSON
const route = useRoute<any>();
const tenderDataId = route.params?.tender;
const { data, refetch,isRefetching } = useProceedToBid(tenderDataId?.tenderId);
const { data, refetch, isRefetching } = useProceedToBid(tenderDataId?.tenderId);
const { data: tenderResponse, refetch: tenderRefetch }: any = useFetchTenderById(tenderDataId?.tenderId);
const tenderData = tenderResponse?.data;
const [refreshing, setRefreshing] = React.useState(false);
@@ -22,11 +22,11 @@ const ProceedToBidDetail = () => {
// Format date from array
const handleStartBidding = () => {
setLoading(true);
setLoading(true);
try {
setLoading(true);
navigation.navigate('TenderBidding', { tenderId:tenderDataId.tenderId});
navigation.navigate('TenderBidding', { tenderId: tenderDataId.tenderId });
} catch (error) {
console.log("Error in starting bidding: ", error);
@@ -183,9 +183,9 @@ const ProceedToBidDetail = () => {
{tenderData?.envelopeA_Logs && (
<View style={styles.section}>
<Text style={styles.sectionTitle}>Submission Logs</Text>
{tenderData?.envelopeA_Logs&& <EnvelopeLogCard log={tenderData?.envelopeA_Logs} title="Envelope A Submission" />}
{ tenderData?.envelopeB_Logs&&<EnvelopeLogCard log={tenderData?.envelopeB_Logs} title="Envelope B Submission" />}
{tenderData?.envelopeC_Logs && <EnvelopeLogCard log={tenderData?.envelopeC_Logs} title="Envelope C Submission" />}
{tenderData?.envelopeA_Logs && <EnvelopeLogCard log={tenderData?.envelopeA_Logs} title="Envelope A Submission" />}
{tenderData?.envelopeB_Logs && <EnvelopeLogCard log={tenderData?.envelopeB_Logs} title="Envelope B Submission" />}
{tenderData?.envelopeC_Logs && <EnvelopeLogCard log={tenderData?.envelopeC_Logs} title="Envelope C Submission" />}
</View>
)}
@@ -259,12 +259,17 @@ const ProceedToBidDetail = () => {
{
tenderData?.proceedtoBid && !tenderData?.viewBid && tenderData?.biddingStatus && tenderData?.bidWithdrawStatus === false ? (
<TouchableOpacity style={styles.proceedButton} onPress={handleStartBidding} disabled={isRefetching}>
<TouchableOpacity style={styles.proceedButton} onPress={handleStartBidding} disabled={isRefetching}>
<Text style={styles.proceedButtonText}>{loading ? <ActivityIndicator size={'small'} color={'#ffff'} /> : 'Start Bidding'}</Text>
</TouchableOpacity>
) : <Text style={styles.footerText}>One time bidding is completed</Text>
} </View>
) :
// <Text style={styles.footerText}>One time bidding is completed</Text>
<TouchableOpacity onPress={() => navigation.navigate('ViewTenderDetail', tenderData)} style={[styles.actionButton, { borderColor: colors.primary, borderWidth: 1 }]}>
<Text>View Tender Bid Detail</Text>
</TouchableOpacity>
}
</View>
</View>
)
@@ -585,4 +590,19 @@ const styles = StyleSheet.create({
color: colors.darkGray,
fontSize: 14,
},
actionButton: {
width: '100%',
height: 48,
borderRadius: 12,
justifyContent: 'center',
alignItems: 'center',
...Platform.select({
ios: {
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 4,
},
}),
},
});
@@ -108,8 +108,6 @@ const PurchaseTenderTile = ({ item, onPressDetails }: any) => {
onPress={() => {
if (isLive) {
navigation.navigate('ProceedToBidDetail', { tender });
}else{
navigation.navigate('LiveTenderDetail', tender)
}
}}
activeOpacity={0.85}
+634
View File
@@ -0,0 +1,634 @@
import { ScrollView, StyleSheet, Text, View, TouchableOpacity, SafeAreaView, Alert } from 'react-native'
import React from 'react'
import { InsideHeader } from '../../Component/Index'
import colors from '../../Constant/Color'
import { useFetchLiveTenderById, useFetchTenderBidDetailById, useFetchTenderById } from '../../Services/BBPS/Hooks'
import { useRoute } from '@react-navigation/native'
import {
Mail,
FileText,
CheckCircle,
AlertCircle,
Briefcase,
Calendar,
Download,
Folder,
Hash,
Receipt,
IndianRupee,
Building,
Tag,
Settings,
PlayCircle,
Square,
Type,
SpellCheck,
File,
Circle,
ArrowLeft,
FileSpreadsheet
} from 'lucide-react-native'
import ReactNativeBlobUtil from 'react-native-blob-util';
import { GET_DOCID } from '../../Services/BBPS/ApiUrls'
import { useSelector } from 'react-redux'
const ViewTenderDetail = () => {
const route: any = useRoute()
const { data: tenderResponse }: any = useFetchLiveTenderById(route?.params?.tenderId);
const tender = tenderResponse?.data;
console.log("tender data : ", tender)
const { data } = useFetchTenderBidDetailById(route?.params?.tenderId)
const Token = useSelector((state: any) => state.token.token)
console.log("dasdddddddddddddddddddd : ", data)
const formatDate = (dateArray: any) => {
if (!dateArray) return "N/A";
const [year, month, day, hour, minute] = dateArray;
return `${day.toString().padStart(2, '0')}/${month.toString().padStart(2, '0')}/${year} ${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
};
const getLabelTypeText = (type: any) => {
switch (type) {
case 1: return "Text";
case 2: return "Number";
case 3: return "Document";
case 4: return "Currency";
default: return "Unknown";
}
};
const renderInfoCard = (title: string, value: string, IconComponent: any) => (
<View style={styles.infoCard}>
<View style={styles.infoHeader}>
<IconComponent size={18} color={colors.primary} />
<Text style={styles.infoTitle}>{title}</Text>
</View>
<Text style={styles.infoValue}>{value || "N/A"}</Text>
</View>
);
const handleDownload = async (doc: any) => {
console.log("doc details : ", doc)
try {
const { dirs } = ReactNativeBlobUtil.fs;
const path = `${dirs.DownloadDir}/${doc?.documentFileName}.pdf`;
const downloadUrl = `${GET_DOCID}${doc?.docEnvelopeSeqId}`;
console.log("download url : ", downloadUrl)
const response = await ReactNativeBlobUtil.config({
fileCache: true,
addAndroidDownloads: {
useDownloadManager: true,
notification: true,
path,
mime: 'application/pdf',
title: `${doc?.documentFileName}.pdf`,
description: 'Downloading document',
mediaScannable: true,
},
}).fetch('GET', downloadUrl, {
Authentication:`Bearer ${Token?.token}`,
Accept: 'application/pdf',
});
const stat = await ReactNativeBlobUtil.fs.stat(path);
console.log('File size:', stat.size);
console.log("start : ", stat)
Alert.alert('Download complete', `File saved to: ${path}`);
console.log("file response : ", response)
} catch (error: any) {
Alert.alert('Error', error?.message || 'Something went wrong while downloading.');
}
};
const renderEnvelopeSection = (title: string, data: any, isDocument = false) => {
if (!data || data.length === 0) return null;
return (
<View style={styles.envelopeSection}>
<View style={styles.sectionHeader}>
<Mail size={24} color={colors.primary} />
<Text style={styles.sectionTitle}>{title}</Text>
</View>
{data.map((item: any, index: number) => (
<View key={index} style={styles.envelopeItem}>
<View style={styles.envelopeHeader}>
<Text style={styles.labelName}>
{item.labelNameA || item.labelNameB || "Document"}
</Text>
{item.labelMandatoryA || item.labelMandatoryB ? (
<Text style={styles.mandatoryTag}>Required</Text>
) : null}
</View>
{item.fieldValue && (
<View style={styles.fieldRow}>
<Type size={16} color={colors.gray} />
<Text style={styles.fieldValue}>{item.fieldValue}</Text>
</View>
)}
{item.fieldValueInWord && (
<View style={styles.fieldRow}>
<SpellCheck size={16} color={colors.gray} />
<Text style={styles.fieldValueInWord}>{item.fieldValueInWord}</Text>
</View>
)}
{item.documentFileName && (
<TouchableOpacity style={styles.documentButton} onPress={()=>handleDownload(item)}>
<File size={18} color={colors.white} />
<Text style={styles.documentText}>{item.documentFileName}</Text>
<Download size={18} color={colors.white} />
</TouchableOpacity>
)}
<View style={styles.metaInfo}>
<Text style={styles.metaText}>
Type: {getLabelTypeText(item.labelTypeA || item.labelTypeB)}
</Text>
{item.docEnvelopeSeqId && (
<Text style={styles.metaText}>ID: {item.docEnvelopeSeqId}</Text>
)}
</View>
</View>
))}
</View>
);
};
return (
<SafeAreaView style={styles.safeArea}>
<View style={styles.container}>
<InsideHeader title="Tender Bid Detail" showArrow />
<ScrollView
style={styles.scrollView}
showsVerticalScrollIndicator={false}
contentContainerStyle={styles.scrollContent}
>
{/* Status Banner */}
<View style={[
styles.statusBanner,
data?.status === "Success" ? styles.successBanner : styles.errorBanner
]}>
{data?.status === "Success" ? (
<CheckCircle size={24} color={colors.success} />
) : (
<AlertCircle size={24} color={colors.error} />
)}
<View style={styles.statusContent}>
<Text style={styles.statusTitle}>{data?.message}</Text>
<Text style={styles.statusSubtitle}>Status: {data?.status}</Text>
</View>
</View>
{/* Tender Overview */}
<View style={styles.overviewSection}>
<View style={styles.sectionHeader}>
<FileText size={24} color={colors.primary} />
<Text style={styles.sectionTitle}>Tender Overview</Text>
</View>
<View style={styles.gridContainer}>
<View style={styles.gridRow}>
{renderInfoCard("Tender No.", data?.data?.tenderNumber, Hash)}
</View>
<View style={styles.gridRow}>
{renderInfoCard("NIT No.", data?.data?.nitNo, Receipt)}
{renderInfoCard("EMD Amount", `₹${data?.data?.emdInFig}`, IndianRupee)}
</View>
<View style={styles.gridRow}>
{renderInfoCard("PAC Value", `₹${data?.data?.pacValue}`, Building)}
{renderInfoCard("Type", data?.data?.typesOfTender, Tag)}
</View>
</View>
{/* Work Description */}
<View style={styles.descriptionCard}>
<View style={styles.infoHeader}>
<Briefcase size={20} color={colors.primary} />
<Text style={styles.infoTitle}>Work Description</Text>
</View>
<Text style={styles.descriptionText}>{data?.data?.nameofWork}</Text>
</View>
{/* Timeline */}
<View style={styles.timelineCard}>
<View style={styles.infoHeader}>
<Calendar size={20} color={colors.primary} />
<Text style={styles.infoTitle}>Timeline</Text>
</View>
<View style={styles.timelineRow}>
<PlayCircle size={18} color={colors.success} />
<View style={styles.timelineItem}>
<Text style={styles.timelineLabel}>Start Date</Text>
<Text style={styles.timelineValue}>
{formatDate(data?.data?.submittedStartDate)}
</Text>
</View>
</View>
<View style={styles.timelineRow}>
<Square size={18} color={colors.error} />
<View style={styles.timelineItem}>
<Text style={styles.timelineLabel}>End Date</Text>
<Text style={styles.timelineValue}>
{formatDate(data?.data?.submittedEndDate)}
</Text>
</View>
</View>
</View>
{/* Bid Options */}
<View style={styles.optionsCard}>
<View style={styles.infoHeader}>
<Settings size={20} color={colors.primary} />
<Text style={styles.infoTitle}>Bid Options</Text>
</View>
<View style={styles.optionsGrid}>
<View style={[
styles.optionBadge,
data?.data?.bidWithdraw === "Allowed" ? styles.allowedBadge : styles.notAllowedBadge
]}>
<Text style={styles.optionText}>Bid Withdrawal</Text>
<Text style={styles.optionStatus}>{data?.data?.bidWithdraw}</Text>
</View>
<View style={[
styles.optionBadge,
data?.data?.reBid === "Allowed" ? styles.allowedBadge : styles.notAllowedBadge
]}>
<Text style={styles.optionText}>Re-Bid</Text>
<Text style={styles.optionStatus}>{data?.data?.reBid}</Text>
</View>
</View>
</View>
</View>
{/* Envelope Sections */}
{data?.data?.showEA && renderEnvelopeSection("Envelope A", data?.data?.tenderEnvelopeAList)}
{data?.data?.showEB && renderEnvelopeSection("Envelope B", data?.data?.tenderEnvelopeBList)}
{/* Envelope C - Document Section */}
{data?.data?.showEC && data?.data?.tenderEnvelopeCViewBidResDTO && (
<View style={styles.envelopeSection}>
<View style={styles.sectionHeader}>
<Mail size={24} color={colors.primary} />
<Text style={styles.sectionTitle}>Envelope C</Text>
</View>
{data?.data?.tenderEnvelopeCViewBidResDTO.map((item: any, index: number) => (
<View key={index} style={styles.documentCard}>
<Folder size={40} color={colors.primary} />
<View style={styles.documentInfo}>
<Text style={styles.documentName}>
{item.documentFileName || "Document"}
</Text>
<Text style={styles.documentMeta}>Department User ID: {item.deptUserId}</Text>
</View>
{item.documentFileName && (
<TouchableOpacity style={styles.downloadButton}>
{/* <Download size={24} color={colors.primary} /> */}
</TouchableOpacity>
)}
</View>
))}
</View>
)}
{/* Envelope Status Indicators */}
<View style={styles.envelopeStatusSection}>
<View style={styles.statusGrid}>
<View style={styles.statusIndicator}>
<View style={[
styles.statusDot,
data?.data?.showEA ? styles.activeDot : styles.inactiveDot
]} />
<Text style={styles.statusText}>Envelope A</Text>
</View>
<View style={styles.statusIndicator}>
<View style={[
styles.statusDot,
data?.data?.showEB ? styles.activeDot : styles.inactiveDot
]} />
<Text style={styles.statusText}>Envelope B</Text>
</View>
<View style={styles.statusIndicator}>
<View style={[
styles.statusDot,
data?.data?.showEC ? styles.activeDot : styles.inactiveDot
]} />
<Text style={styles.statusText}>Envelope C</Text>
</View>
</View>
</View>
</ScrollView>
</View>
</SafeAreaView>
)
}
export default ViewTenderDetail
const styles = StyleSheet.create({
safeArea: {
flex: 1,
backgroundColor: colors.white,
},
container: {
flex: 1,
},
scrollView: {
flex: 1,
},
scrollContent: {
paddingBottom: 30,
},
statusBanner: {
flexDirection: 'row',
alignItems: 'center',
padding: 16,
marginHorizontal: 16,
marginTop: 16,
borderRadius: 12,
backgroundColor: colors.successLight,
},
successBanner: {
backgroundColor: colors.successLight,
},
errorBanner: {
backgroundColor: colors.error,
},
statusContent: {
flex: 1,
marginLeft: 12,
},
statusTitle: {
fontSize: 14,
fontWeight: '600',
color: colors.darkText,
marginBottom: 4,
},
statusSubtitle: {
fontSize: 12,
color: colors.gray,
},
overviewSection: {
marginHorizontal: 16,
marginTop: 24,
},
sectionHeader: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 20,
},
sectionTitle: {
fontSize: 20,
fontWeight: '700',
color: colors.darkText,
marginLeft: 12,
},
gridContainer: {
marginBottom: 20,
},
gridRow: {
flexDirection: 'row',
justifyContent: 'space-between',
marginBottom: 12,
},
infoCard: {
flex: 1,
backgroundColor: colors.white,
padding: 16,
borderRadius: 12,
marginHorizontal: 4,
borderWidth: 1,
borderColor: colors.lightGray,
},
infoHeader: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 8,
},
infoTitle: {
fontSize: 12,
fontWeight: '600',
color: colors.gray,
marginLeft: 8,
},
infoValue: {
fontSize: 16,
fontWeight: '700',
color: colors.darkText,
},
descriptionCard: {
backgroundColor: colors.white,
padding: 16,
borderRadius: 12,
borderWidth: 1,
borderColor: colors.lightGray,
marginBottom: 16,
},
descriptionText: {
fontSize: 14,
color: colors.darkText,
lineHeight: 20,
marginTop: 8,
},
timelineCard: {
backgroundColor: colors.white,
padding: 16,
borderRadius: 12,
borderWidth: 1,
borderColor: colors.lightGray,
marginBottom: 16,
},
timelineRow: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 12,
},
timelineItem: {
flex: 1,
marginLeft: 12,
},
timelineLabel: {
fontSize: 12,
color: colors.gray,
marginBottom: 4,
},
timelineValue: {
fontSize: 14,
fontWeight: '600',
color: colors.darkText,
},
optionsCard: {
backgroundColor: colors.primaryLight,
padding: 16,
borderRadius: 12,
borderWidth: 1,
borderColor: colors.lightGray,
marginBottom: 24,
},
optionsGrid: {
flexDirection: 'row',
justifyContent: 'space-between',
marginTop: 12,
},
optionBadge: {
flex: 1,
alignItems: 'center',
paddingVertical: 12,
borderRadius: 8,
marginHorizontal: 4,
},
allowedBadge: {
backgroundColor: colors.successLight,
borderWidth: 1,
borderColor: colors.success,
},
notAllowedBadge: {
backgroundColor: colors.error,
borderWidth: 1,
borderColor: colors.error,
},
optionText: {
fontSize: 12,
color: colors.gray,
marginBottom: 4,
},
optionStatus: {
fontSize: 14,
fontWeight: '700',
},
envelopeSection: {
marginHorizontal: 16,
marginTop: 24,
},
envelopeItem: {
backgroundColor: colors.white,
padding: 16,
borderRadius: 12,
borderWidth: 1,
borderColor: colors.lightGray,
marginBottom: 12,
},
envelopeHeader: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
marginBottom: 12,
},
labelName: {
fontSize: 16,
fontWeight: '700',
color: colors.darkText,
},
mandatoryTag: {
fontSize: 12,
fontWeight: '600',
color: colors.error,
backgroundColor: colors.primaryHighlight,
paddingHorizontal: 8,
paddingVertical: 4,
borderRadius: 6,
},
fieldRow: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 8,
},
fieldValue: {
fontSize: 14,
color: colors.darkText,
marginLeft: 8,
flex: 1,
},
fieldValueInWord: {
fontSize: 13,
color: colors.gray,
fontStyle: 'italic',
marginLeft: 8,
flex: 1,
},
documentButton: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: colors.primary,
padding: 12,
borderRadius: 8,
marginTop: 12,
},
documentText: {
flex: 1,
fontSize: 14,
color: colors.white,
marginLeft: 12,
marginRight: 8,
},
metaInfo: {
flexDirection: 'row',
justifyContent: 'space-between',
marginTop: 12,
paddingTop: 12,
borderTopWidth: 1,
borderTopColor: colors.lightGray,
},
metaText: {
fontSize: 12,
color: colors.gray,
},
documentCard: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: colors.white,
padding: 16,
borderRadius: 12,
borderWidth: 1,
borderColor: colors.lightGray,
marginBottom: 12,
},
documentInfo: {
flex: 1,
marginLeft: 16,
},
documentName: {
fontSize: 14,
fontWeight: '600',
color: colors.darkText,
marginBottom: 4,
},
documentMeta: {
fontSize: 12,
color: colors.gray,
},
downloadButton: {
padding: 8,
},
envelopeStatusSection: {
marginHorizontal: 16,
marginTop: 24,
marginBottom: 30,
},
statusGrid: {
flexDirection: 'row',
justifyContent: 'space-around',
},
statusIndicator: {
alignItems: 'center',
},
statusDot: {
width: 12,
height: 12,
borderRadius: 6,
marginBottom: 8,
},
activeDot: {
backgroundColor: colors.success,
},
inactiveDot: {
backgroundColor: colors.gray,
},
statusText: {
fontSize: 12,
color: colors.gray,
},
})
+3 -3
View File
@@ -19,6 +19,7 @@ import ProceedToPurTender from "./Tender/ProceedToPurTender";
import PurchaseTenderList from "./Tender/PurchaseTenderList";
import Tender from "./Tender/Tender";
import TenderBidding from "./Tender/tenderBidding/TenderBidding";
import ViewTenderDetail from "./Tender/ViewTenderDetail";
const Screens = {
@@ -41,9 +42,8 @@ const Screens = {
Registration,
Partnership,
LiveTenderDetail,
ProfileTab,
ProfileTab, ,
KycWebViewScreen
ViewTenderDetail
}
export default Screens
+3 -1
View File
@@ -84,6 +84,7 @@ const GET_ENVELOPE_C = `${BASE_URL}eTendering/getEnvelopeCTemplate/tenderId?tend
const SUBMIT_ENVELOPE_C_UPLOAD = `${BASE_URL}tenderBidding/getSaveEnvelopeCData`
const GET_CONTRACTOR_PROFILE =`${BASE_URL}contractor/getcontractorfulldetails`
const ESETU_VARIFICATION = `${BASE_URL}tenderBidding/eSetuAdharVarification`
const TENDER_BID_DETAIL = `${BASE_URL}tenderBidding/viewToBid?tenderId=`
@@ -163,6 +164,7 @@ export {
SUBMIT_ENVELOPE_C_UPLOAD,
GET_TENDER_BY_ID,
GET_CONTRACTOR_PROFILE,
ESETU_VARIFICATION
ESETU_VARIFICATION,
TENDER_BID_DETAIL
};
+7 -1
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, tenderDetails, fetchLiveTenderById, fetchContractorProfile, updateUserProfile, eSetuAdharVarification } 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, fetchContractorProfile, updateUserProfile, eSetuAdharVarification, fetchTenderBidDetailById } from './apis';
// User
@@ -175,6 +175,12 @@ export const useFetchTenderById = (tenderId: string) => {
enabled: !!tenderId, // prevents running with undefined id
});
}
export const useFetchTenderBidDetailById = (tenderId: string) => {
return useQuery({
queryKey: ['fetchTenderBidDetailById', tenderId],
queryFn: () => fetchTenderBidDetailById(tenderId),
});
}
export const useProceedToBid = (tenderId?: string) => {
return useQuery({
queryKey: ['proceedToBid', tenderId],
+8 -1
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import { AUCTION_DOCUMENT_DOWNLOAD, DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_AUCTION_DETAILS, 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, PURCHASE_AUCTION_LIST, PURCHASE_OFFLINE_AUCTION, REVERSE_AUCTION_ITEM, VIEW_AUCTION_DOCUMENTS, VIEW_AUCTION_ITEM_DETAIL, STAGETHREE, REJ_STAGE_TWO, GETCONTRACTORBYSTATE, GET_MASTER_DATA, ALL_DESIGNATION, GET_REGISTRATION_STATE, PARTNER_API_ENDPOINT, SAVE_CONTRACTOR_STAGE1, VERIFY_GST, VERIFY_ADHAR, SEND_ADHAROTP, SUBMIT_ENVELOPE_FILE_B, SUBMIT_ENVELOPE_FILE_A, SUBMIT_ENVELOPE_A, SUBMIT_ENVELOPE_B, VERIFY_ORGPAN, PURCHASE_AUCTION_PAGE, GET_TENDER_BY_ID, GET_CONTRACTOR_PROFILE, CONTRACTOR_PROFILE_UPDATE,
ESETU_VARIFICATION } from "./ApiUrls";
ESETU_VARIFICATION, TENDER_BID_DETAIL } from "./ApiUrls";
import { apiCall } from "../../Axios/Axios";
// User
@@ -144,6 +144,13 @@ export const fetchTenderById = async (tenderId: string): Promise<any> => {
);
return data;
};
export const fetchTenderBidDetailById = async (tenderId: string): Promise<any> => {
const data = await apiCall<any>(
'get',
`${TENDER_BID_DETAIL}${tenderId}`
);
return data;
};
export const proceedToBid = async (tenderId: string): Promise<any> => {
const data = await apiCall<any>(