Merge branch 'testing' of https://git.zeptic.in/rohit/Procurelinc into dev

This commit is contained in:
Abin Toppo
2026-01-28 16:11:24 +05:30
10 changed files with 82 additions and 729 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ console.log("api payload", data)
'Content-Type': contentType || 'application/json',
},
});
console.log("api response",response)
console.log("method : ", method)
console.log("url : ", url)
console.log("params : ", params)
console.log("data : ", data)
return response.data;
} catch (error: any) {
const errorMessage = error?.response?.data?.error;
-1
View File
@@ -21,7 +21,6 @@ const NavigationString = {
LiveTenderDetail:'LiveTenderDetail',
AuctionDetail: 'AuctionDetail',
Profile:'Profile',
ViewTenderDetail:'ViewTenderDetail',
ResetPassword:'ResetPassword',
KycWebViewScreen:'KycWebViewScreen',
StageThreeScreen:'StageThree'
-1
View File
@@ -46,7 +46,6 @@ export default function MainStack() {
<Stack.Screen name={NavigationString.Partnership} component={Screens.Partnership} options={option} />
<Stack.Screen name={NavigationString.LiveTenderDetail} component={Screens.LiveTenderDetail} options={option} />
<Stack.Screen name={NavigationString.ResetPassword} component={Screens.ResetPassword} options={option} />
<Stack.Screen name={NavigationString.ViewTenderDetail} component={Screens.ViewTenderDetail} options={option} />
<Stack.Screen name={NavigationString.KycWebViewScreen} component={Screens.KycWebViewScreen} options={option} />
<Stack.Screen name={NavigationString.StageThreeScreen} component={Screens.StageThreeScreen} options={option} />
-2
View File
@@ -73,8 +73,6 @@ const LiveTender = () => {
if (isLoading) {
return <Skelton />;
}
console.log("data live : ", data )
return (
<View style={{ flex: 1 }}>
<SearchInput onChange={() => { }} placeholder="Search...." />
+1 -2
View File
@@ -265,8 +265,7 @@ const ProceedToBidDetail = () => {
</TouchableOpacity>
) :
// <Text style={styles.footerText}>One time bidding is completed</Text>
null
<Text style={styles.footerText}>One time bidding is completed</Text>
}
</View>
</View>
+10 -4
View File
@@ -3,14 +3,16 @@ import { View, Text, FlatList, StyleSheet, TouchableOpacity, Alert } from 'react
import { InsideHeader, Loader } from '../../Component/Index';
import colors from '../../Constant/Color';
import { CreditCard, Calendar, User, DollarSign, ArrowRight } from 'lucide-react-native';
import { useSelector } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import { useOfflineTenderPurchase } from '../../Services/BBPS/Hooks';
import { StackActions, useNavigation } from '@react-navigation/native';
import NavigationString from '../../Constant/NavigationString';
import { showErrorAlert, showToast } from '../../Constant/ShowDailog';
import { clearPurchaseTender } from '../../Redux/Slices/SelectedPurchaseTender';
const ProceedToPurTender = () => {
const navigation: any = useNavigation();
const Dispatch = useDispatch()
const [loading, setLoading] = useState(false);
const SelectedPurchaseList = useSelector((state: any) => state.selectPurchaseTender);
@@ -28,7 +30,7 @@ const ProceedToPurTender = () => {
const handleOfflinePurchase = async () => {
const orderNo = `ORD${Date.now()}`;
const body = {
tenderDetails: SelectedPurchaseList.map((item: any, index:number) => ({
tenderDetails: SelectedPurchaseList.map((item: any, index: number) => ({
gst: item.gst,
regId: item.regId || 0,
deptId: item.deptId || 1,
@@ -53,9 +55,13 @@ const ProceedToPurTender = () => {
mutate(body, {
onSuccess: (res) => {
console.log(res, '---------------------purchsase response');
if(res.statusCode === 200 ){
if (res.statusCode === 200) {
showToast(res.message);
navigation.dispatch(StackActions.pop(2));
Dispatch(
clearPurchaseTender()
);
}
},
onError: (error) => {
@@ -124,7 +130,7 @@ const ProceedToPurTender = () => {
<FlatList
data={SelectedPurchaseList}
renderItem={renderItem}
keyExtractor={(item) => item.tenderId.toString()}
keyExtractor={(item) => item?.tenderId?.toString()}
contentContainerStyle={styles.container}
/>
</View>
-633
View File
@@ -1,633 +0,0 @@
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'
import EnvelopeCExcelPreview from './Component/EnvelopeCExcelPreview'
import { showSuccessAlert } from '../../Constant/ShowDailog'
const ViewTenderDetail = () => {
const route = useRoute<any>()
console.log("jjo",route?.params?.tenderId)
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)
showSuccessAlert(`Download complete `);
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&& 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,{backgroundColor:colors.lightGray,borderRadius:20,padding:10}]}>
<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>
))}
</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>
<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>
<EnvelopeCExcelPreview tenderId={tender[0]} buttonEnable={false}/>
</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:8,
},
labelName: {
fontSize: 16,
fontWeight: '700',
color: colors.primary,
},
mandatoryTag: {
fontSize: 12,
fontWeight: '600',
color: colors.error,
backgroundColor: colors.primaryHighlight,
paddingHorizontal: 8,
paddingVertical: 4,
borderRadius: 6,
},
fieldRow: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 4,
},
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,
},
})
@@ -41,21 +41,22 @@ interface InfoRowProps {
const TenderBidding = () => {
const route = useRoute<any>();
const navigation = useNavigation();
console.log("-=-=-=-=-=", route)
console.log("ROUTE DATA", route)
const tenderId = useState<any>(route.params?.tenderId || null);
const { data: tenderResponse, refetch: tenderRefetch }: any = useFetchTenderById(route.params?.tenderId);
const bidData= tenderResponse?.data;
const bidData = tenderResponse?.data;
console.log(" --------------1", bidData)
const { data: tender, refetch } = useProceedToBid(route.params?.tenderId);
const tenderData = tender?.data
const { data:tender, refetch } = useProceedToBid(route.params?.tenderId);
const tenderData= tender?.data
const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
console.log(" --------------2", tenderData)
const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
const [envelopForm, setEnvelopForm] = useState<EnvelopeFormState>({
A: {},
B: {},
@@ -330,7 +331,7 @@ const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
const handleSubmitEnvelopeA = async () => {
console.log("hitting here ", envelopForm?.[activeEnvelope])
if (!validateEnvelope()) {
Alert.alert('Validation Error', 'Please fill all mandatory fields');
return;
@@ -437,7 +438,7 @@ const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
}
console.log("bidData : ", bidData)
console.log("tender data : ", tenderData)
// console.log( `bold ${tenderData?.[`tenderEnvelope${activeEnvelope}List`]}`,tenderData?.[`tenderEnvelope${activeEnvelope}List`])
// console.log( `bold ${tenderData?.[`tenderEnvelope${activeEnvelope}List`]}`,tenderData?.[`tenderEnvelope${activeEnvelope}List`])
return (
<View style={styles.container}>
<InsideHeader title="Tender Bidding" showArrow />
@@ -473,29 +474,14 @@ const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
<EnvelopeButton
title="Envelope B"
envelopeType="B"
onPress={() => {
if (tenderData?.envelopeASubmittStatus) {
setActiveEnvelope('B')
} else {
Alert.alert('Info', 'Submit Envelop A First')
}
}}
onPress={() => setActiveEnvelope('B')}
/>
)}
{tenderData?.showEC && (
<EnvelopeButton
title="Envelope C"
envelopeType="C"
onPress={() => {
if(tenderData?.showEB){ if (tenderData?.envelopeBSubmittStatus ) {
setActiveEnvelope('C')
} else {
Alert.alert('Info', 'Submit Envelop B First')
}}else{
setActiveEnvelope('C')
}
}}
onPress={() => setActiveEnvelope('C')}
/>
)}
</View>
@@ -503,7 +489,7 @@ const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
{/* Envelope A List */}
{tenderData?.[`tenderEnvelope${activeEnvelope}List`]?.length > 0 && bidData?.envelopeB_Logs === null && (
{tenderData?.[`tenderEnvelope${activeEnvelope}List`]?.length > 0 && (
<View style={styles.card}>
<Text style={styles.sectionTitle}>Envelope {activeEnvelope} Details</Text>
<FlatList
@@ -544,37 +530,37 @@ const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
</>
) : (
<EnvelopeCExcelPreview tenderId={tenderData} buttonEnable={true}/>
<EnvelopeCExcelPreview tenderId={tenderData} buttonEnable={true} />
)}
</View>
)}
<View style={styles.footer}>
{hasEnvelopes() && activeEnvelope !== 'C' &&
!(activeEnvelope === 'A' && bidData.envelopeASubmittStatus) &&
!(activeEnvelope === 'B' && bidData.envelopeBSubmittStatus) ? (
{hasEnvelopes() && activeEnvelope !== 'C' ? (
<TouchableOpacity
style={styles.primaryButton}
onPress={() => {
if (activeEnvelope === 'A') {
if (!check) {
Alert.alert('Info', 'check first terms & condition');
return;
}
if (activeEnvelope === 'A') {
handleSubmitEnvelopeA();
} else if (activeEnvelope === 'B') {
if (!check) {
Alert.alert('Info', 'check first terms & condition');
return;
}
handleSubmitEnvelopeB();
}
}}
>
<Text style={styles.primaryButtonText}>
{loading ? (
<ActivityIndicator size={'small'} color={'#fff'} />
) : (
`Submit Bid (${activeEnvelope})`
)}
{loading ? <ActivityIndicator size={'small'} color={'#fff'} /> : `Submit Bid (${activeEnvelope})`}
</Text>
</TouchableOpacity>
) : (
@@ -585,8 +571,7 @@ const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
<Text style={styles.secondaryButtonText}>Go Back</Text>
</TouchableOpacity>
)}
</View>
</View>
</ScrollView>
</View>
-2
View File
@@ -21,7 +21,6 @@ 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 = {
@@ -45,7 +44,6 @@ const Screens = {
Partnership,
LiveTenderDetail,
ProfileTab,
ViewTenderDetail,
ResetPassword,
KycWebViewScreen,
StageThreeScreen
-3
View File
@@ -400,9 +400,6 @@ export const uploadEnvelopeFile = async ({
return data
}
export const tenderDetails = async (tenderId:any ): Promise<any> => {
const data = await apiCall<any>('get', `${GET_TENDER_DETAILS}${tenderId}`, );
return data