commit
This commit is contained in:
@@ -8,7 +8,7 @@ import { useDashboard, useESetuAdharVarification } from '../../Services/BBPS/Hoo
|
||||
import { useSelector } from 'react-redux';
|
||||
import ConfirmDialog from '../../Constant/Dialog/ConfirmDialog';
|
||||
import { generateTransactionId } from '../../Helper/uniqueId';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native';
|
||||
import NavigationString from '../../Constant/NavigationString';
|
||||
|
||||
const { width } = Dimensions.get('window');
|
||||
@@ -68,7 +68,9 @@ const Home = () => {
|
||||
const dashboard = data?.data || {};
|
||||
const [showDialog, setShowDialog] = useState<boolean>(false);
|
||||
const [isNavigating, setIsNavigating] = useState<boolean>(false);
|
||||
|
||||
useFocusEffect(()=>{
|
||||
setIsNavigating(false)
|
||||
})
|
||||
useEffect(() => {
|
||||
if (user?.esetuVerified === 'Not Verified') {
|
||||
setShowDialog(true);
|
||||
|
||||
@@ -52,7 +52,7 @@ import {
|
||||
X,
|
||||
Save,
|
||||
} from 'lucide-react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native';
|
||||
|
||||
import { useContractorProfile, useUpdateUserProfile, useESetuAdharVarification } from '../../Services/BBPS/Hooks';
|
||||
import colors from '../../Constant/Color';
|
||||
@@ -187,6 +187,10 @@ const ProfileTab: React.FC = () => {
|
||||
}
|
||||
};
|
||||
|
||||
useFocusEffect(()=>{
|
||||
setIsNavigating(false)
|
||||
})
|
||||
|
||||
const handleProceedVerification = async () => {
|
||||
try {
|
||||
setIsNavigating(true);
|
||||
@@ -379,13 +383,7 @@ const ProfileTab: React.FC = () => {
|
||||
loading={isPending || isNavigating}
|
||||
/>
|
||||
|
||||
{/* Navigation Overlay */}
|
||||
{isNavigating && (
|
||||
<View style={styles.navigationOverlay}>
|
||||
<ActivityIndicator size="large" color={colors.primary || '#2563EB'} />
|
||||
<Text style={styles.loadingText}>Loading verification...</Text>
|
||||
</View>
|
||||
)}
|
||||
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ const EnvelopeCExcelPreview = (tenderData: any) => {
|
||||
const [data, setData] = useState<any[]>([]);
|
||||
const [columns, setColumns] = useState<string[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
console.log("kllkl",tenderData)
|
||||
useEffect(() => {
|
||||
loadExcelFromApi();
|
||||
}, []);
|
||||
@@ -237,9 +237,9 @@ const EnvelopeCExcelPreview = (tenderData: any) => {
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
<TouchableOpacity style={styles.button} onPress={saveUpdatedExcel}>
|
||||
{tenderData?.buttonEnable && <TouchableOpacity style={styles.button} onPress={saveUpdatedExcel}>
|
||||
<Text style={styles.buttonText}>Save Updated Excel</Text>
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity>}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
import ReactNativeBlobUtil from 'react-native-blob-util';
|
||||
import { GET_DOCID } from '../../Services/BBPS/ApiUrls'
|
||||
import { useSelector } from 'react-redux'
|
||||
import EnvelopeCExcelPreview from './Component/EnvelopeCExcelPreview'
|
||||
|
||||
const ViewTenderDetail = () => {
|
||||
const route: any = useRoute()
|
||||
@@ -268,19 +269,23 @@ const ViewTenderDetail = () => {
|
||||
<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>
|
||||
{/* <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>
|
||||
|
||||
@@ -489,10 +489,12 @@ const TenderBidding = () => {
|
||||
title="Envelope C"
|
||||
envelopeType="C"
|
||||
onPress={() => {
|
||||
if (tenderData?.envelopeBSubmittStatus) {
|
||||
if(tenderData?.showEB){ if (tenderData?.envelopeBSubmittStatus ) {
|
||||
setActiveEnvelope('C')
|
||||
} else {
|
||||
Alert.alert('Info', 'Submit Envelop B First')
|
||||
}}else{
|
||||
setActiveEnvelope('C')
|
||||
}
|
||||
}}
|
||||
/>
|
||||
@@ -542,9 +544,9 @@ const TenderBidding = () => {
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<EnvelopeCExcelPreview tenderId={tenderData} />
|
||||
</>
|
||||
|
||||
<EnvelopeCExcelPreview tenderId={tenderData} buttonEnable={true}/>
|
||||
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
@@ -554,18 +556,23 @@ const TenderBidding = () => {
|
||||
<TouchableOpacity
|
||||
style={styles.primaryButton}
|
||||
onPress={() => {
|
||||
if (!check) {
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
}}
|
||||
// disabled={loading}
|
||||
|
||||
>
|
||||
<Text style={styles.primaryButtonText}>
|
||||
{loading ? <ActivityIndicator size={'small'} color={'#fff'} /> : `Submit Bid (${activeEnvelope})`}
|
||||
|
||||
Reference in New Issue
Block a user