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