chore: push current project state to new repository
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
32049d90bd
commit
dd672f39f5
@@ -14,12 +14,14 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import AppStatusBar from './src/components/AppStatusBar';
|
||||
LogBox.ignoreAllLogs(true);
|
||||
|
||||
import { navigationRef } from './src/Navigation/NavigationService';
|
||||
|
||||
const App = () => {
|
||||
const queryClient = new QueryClient();
|
||||
const insets = useSafeAreaInsets()
|
||||
global.TextEncoder = TextEncoder;
|
||||
return (
|
||||
<NavigationContainer >
|
||||
<NavigationContainer ref={navigationRef}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<AlertNotificationRoot>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
arguments=--init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\init\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\protobuf\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\kotlin\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\groovy\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\scala\\init.gradle
|
||||
arguments=--init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\init\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\protobuf\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\kotlin\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\groovy\\init.gradle --init-script C\:\\Users\\Lincpay\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.54.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\scala\\init.gradle
|
||||
auto.sync=false
|
||||
build.scans.enabled=false
|
||||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import axios from 'axios';
|
||||
import { setToken } from '../Redux/Slices/Token';
|
||||
import { store } from '../Redux/Store';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { resetAndNavigate } from '../Navigation/NavigationService';
|
||||
import NavigationString from '../Constant/NavigationString';
|
||||
|
||||
|
||||
export const apiCall = async <R, D = {}>(
|
||||
method: 'get' | 'post' | 'patch' | 'delete' | 'put',
|
||||
@@ -97,6 +101,8 @@ export const apiCall = async <R, D = {}>(
|
||||
} as R;
|
||||
}
|
||||
|
||||
|
||||
|
||||
console.groupEnd(); // 🔚 MAIN GROUP
|
||||
return {
|
||||
success: false,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { createNavigationContainerRef, CommonActions } from '@react-navigation/native';
|
||||
|
||||
export const navigationRef = createNavigationContainerRef<any>();
|
||||
|
||||
export function navigate(name: string, params?: any) {
|
||||
if (navigationRef.isReady()) {
|
||||
navigationRef.navigate(name, params);
|
||||
}
|
||||
}
|
||||
|
||||
export function resetAndNavigate(name: string) {
|
||||
if (navigationRef.isReady()) {
|
||||
navigationRef.dispatch(
|
||||
CommonActions.reset({
|
||||
index: 0,
|
||||
routes: [{ name }],
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -55,56 +55,12 @@ const Auction = () => {
|
||||
}).start();
|
||||
};
|
||||
|
||||
const isTenderUser = reduxToken?.userType?.toLowerCase() === 'tender';
|
||||
|
||||
const cartCount = SelectedPurchaseList.length;
|
||||
|
||||
const styles = makeStyles(colors, spacing, shadows, TAB_WIDTH, TAB_HEIGHT);
|
||||
|
||||
if (isTenderUser) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<InsideHeader title="Auction" showArrow />
|
||||
<View style={styles.restrictedContainer}>
|
||||
<View style={styles.restrictedCard}>
|
||||
{/* Icon ring */}
|
||||
<View style={styles.lockRing}>
|
||||
<View style={styles.lockInner}>
|
||||
<Lock size={40} color={colors.primary} strokeWidth={1.8} />
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<AppText variant="h2" centered color={colors.text} style={styles.restrictedTitle as any}>
|
||||
Access Restricted
|
||||
</AppText>
|
||||
|
||||
<AppText variant="body" centered color={colors.textSecondary} style={styles.restrictedMessage as any}>
|
||||
You're logged in as a{' '}
|
||||
<AppText variant="body" color={colors.primary} style={{ fontWeight: '700' } as any}>
|
||||
Tender user
|
||||
</AppText>
|
||||
{'. '}Auction features are not available for your account type.
|
||||
</AppText>
|
||||
|
||||
<View style={styles.hintBox}>
|
||||
<AppText variant="bodySmall" centered color={colors.textSecondary}>
|
||||
Switch to an Auction account to access live & purchase auction features.
|
||||
</AppText>
|
||||
</View>
|
||||
|
||||
<TouchableOpacity
|
||||
style={styles.loginButton}
|
||||
activeOpacity={0.85}
|
||||
onPress={() => Navigation.navigate(NavigationString.Login)}
|
||||
>
|
||||
<AppText variant="button" color={colors.buttonText} style={styles.loginBtnText as any}>
|
||||
Switch to Auction Login
|
||||
</AppText>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
|
||||
+160
-99
@@ -1,130 +1,151 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { View, StyleSheet, Dimensions, FlatList, ActivityIndicator, Alert, ScrollView, ImageBackground, TouchableOpacity, Platform } from 'react-native';
|
||||
import { View, StyleSheet, Dimensions, ActivityIndicator, ScrollView, TouchableOpacity } from 'react-native';
|
||||
import Animated, { FadeInDown, FadeInUp } from 'react-native-reanimated';
|
||||
import { Layers, Clock, ShoppingCart, X, FileText, ArrowUpRight, Menu, Radio } from 'lucide-react-native';
|
||||
import { Layers, ShoppingCart, X, FileText, Menu, Radio, Clock, ChevronRight } from 'lucide-react-native';
|
||||
import { useTheme } from '../../Hooks/useTheme';
|
||||
import { useDashboard, useESetuAdharVarification, useTenderDashboard } from '../../Services/ApiCall/Hooks';
|
||||
import { useDashboard, useTenderDashboard } from '../../Services/ApiCall/Hooks';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { getToken } from '../../Redux/Slices/Token';
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native';
|
||||
import NavigationString from '../../Constant/NavigationString';
|
||||
import ImagePath from '../../Constant/ImagePath';
|
||||
import AppText from '../../components/AppText';
|
||||
import SidebarModal from '../../components/SidebarModal';
|
||||
|
||||
// Header is now integrated or minimal
|
||||
// import { Header } from '../../Component/Index';
|
||||
import NavigationString from '../../Constant/NavigationString';
|
||||
|
||||
const { width } = Dimensions.get('window');
|
||||
|
||||
|
||||
|
||||
const Home = () => {
|
||||
const { colors, spacing, typography, shadows } = useTheme();
|
||||
const { colors } = useTheme();
|
||||
|
||||
const [stats, setStats] = useState<any>({});
|
||||
const [auctionStats, setAuctionStats] = useState<any>({});
|
||||
const [tenderStats, setTenderStats] = useState<any>({});
|
||||
const [isMenuVisible, setIsMenuVisible] = useState(false);
|
||||
|
||||
const navigation = useNavigation<any>();
|
||||
const userData = useSelector(getToken);
|
||||
const userType = userData?.userType; // 'tender' | 'auction'
|
||||
|
||||
// Hooks for data
|
||||
const { data: dashboardData, refetch: refetchDashboard, isPending: isLoadingDashboard } = useDashboard();
|
||||
const { data: tenderData, refetch: refetchTender, isPending: isLoadingTender } = useTenderDashboard();
|
||||
const { mutate: verifyAadhaar } = useESetuAdharVarification();
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
if (userType === 'auction') refetchDashboard();
|
||||
else refetchTender();
|
||||
}, [userType])
|
||||
refetchDashboard();
|
||||
refetchTender();
|
||||
}, [])
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (userType === 'auction' && dashboardData) {
|
||||
console.log(dashboardData.data, "lkkllklklklklklklklklk")
|
||||
setStats(dashboardData.data || {});
|
||||
} else if (userType === 'tender' && tenderData) {
|
||||
console.log(tenderData.data, "bonds")
|
||||
setStats(tenderData.data || {});
|
||||
if (dashboardData) {
|
||||
setAuctionStats(dashboardData.data || {});
|
||||
}
|
||||
}, [dashboardData, tenderData, userType]);
|
||||
|
||||
if (tenderData) {
|
||||
setTenderStats(tenderData.data || {});
|
||||
}
|
||||
}, [dashboardData, tenderData]);
|
||||
|
||||
const renderGlassCard = (title: string, value: string | number, icon: React.ReactNode, index: number) => (
|
||||
<Animated.View
|
||||
entering={FadeInUp.duration(600).delay(index * 100)}
|
||||
style={[styles.glassCard, {
|
||||
backgroundColor: colors.glass,
|
||||
borderColor: colors.overlay,
|
||||
}]}
|
||||
entering={FadeInUp.duration(600).delay(index * 50)}
|
||||
style={[
|
||||
styles.glassCard,
|
||||
styles.halfWidthCard,
|
||||
{
|
||||
backgroundColor: colors.glass,
|
||||
borderColor: colors.overlay,
|
||||
}
|
||||
]}
|
||||
>
|
||||
<View style={styles.cardHeader}>
|
||||
<View style={[styles.iconContainer, { backgroundColor: colors.overlay }]}>
|
||||
{icon}
|
||||
</View>
|
||||
<ArrowUpRight size={20} color={colors.textSecondary} />
|
||||
<AppText variant="h3" color={colors.primary}>{value || '0'}</AppText>
|
||||
</View>
|
||||
<View style={styles.cardContent}>
|
||||
<AppText variant="caption" color={colors.textSecondary} numberOfLines={1}>{title}</AppText>
|
||||
</View>
|
||||
<AppText variant="h2" color={colors.primary}>{value || '0'}</AppText>
|
||||
<AppText variant="caption" color={colors.textSecondary}>{title}</AppText>
|
||||
</Animated.View>
|
||||
);
|
||||
|
||||
const StatGrid = () => (
|
||||
<View style={styles.gridContainer}>
|
||||
{userType === 'auction' ? (
|
||||
<>
|
||||
{renderGlassCard('Live Auctions', stats?.liveAuctionCount, <Radio size={24} color={colors.primary} />, 0)}
|
||||
{renderGlassCard('My Purchased Auctions', stats?.myAuctionCount, <ShoppingCart size={24} color={colors.primary} />, 1)}
|
||||
{renderGlassCard('Cancelled Auctions', stats?.cancelledAuctionCount, <X size={24} color={colors.primary} />, 2)}
|
||||
{renderGlassCard('Participated Auctions', stats?.currentBiddingCount, <FileText size={24} color={colors.primary} />, 3)}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{renderGlassCard('Total Purchased', stats[0]?.totalPurchased, <ShoppingCart size={24} color={colors.primary} />, 0)}
|
||||
{renderGlassCard('Participated', stats[0]?.totalParticipate, <FileText size={24} color={colors.primary} />, 1)}
|
||||
{renderGlassCard('Total Tenders', stats[0]?.totalTender, <Layers size={24} color={colors.primary} />, 2)}
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={[styles.container, { backgroundColor: colors.background }]}>
|
||||
|
||||
|
||||
<ScrollView contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false}>
|
||||
|
||||
{/* Large Typography Header */}
|
||||
<Animated.View entering={FadeInDown.duration(800)} style={styles.headerContainer}>
|
||||
<View>
|
||||
<AppText variant="bodySmall" color={colors.textSecondary}>Hello, {userData?.firstName || 'User'}</AppText>
|
||||
<AppText variant="h1" color={colors.primary} style={{ marginTop: 4 }}>
|
||||
Find Your{'\n'}Perfect {userType === 'auction' ? 'Deal' : 'Tender'}
|
||||
</AppText>
|
||||
{/* Top Bar */}
|
||||
<Animated.View entering={FadeInDown.duration(600)} style={styles.headerTop}>
|
||||
<View style={styles.userInfo}>
|
||||
<View style={[styles.avatarContainer, { backgroundColor: colors.primary }]}>
|
||||
<AppText variant="h3" color="#FFF">{userData?.firstName?.charAt(0) || 'U'}</AppText>
|
||||
</View>
|
||||
<View>
|
||||
<AppText variant="caption" color={colors.textSecondary}>Welcome,</AppText>
|
||||
<AppText variant="body" color={colors.text} style={{ fontWeight: '600' }}>{userData?.firstName || 'User'}</AppText>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.headerActions}>
|
||||
<TouchableOpacity onPress={() => setIsMenuVisible(true)}>
|
||||
<Menu size={24} color={colors.text} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<TouchableOpacity onPress={() => setIsMenuVisible(true)}>
|
||||
<Menu size={28} color={colors.text} />
|
||||
</TouchableOpacity>
|
||||
</Animated.View>
|
||||
|
||||
<SidebarModal isVisible={isMenuVisible} onClose={() => setIsMenuVisible(false)} />
|
||||
|
||||
{/* Floating/Glass Stats */}
|
||||
<View style={styles.sectionContainer}>
|
||||
<AppText variant="button" color={colors.text} style={{ marginBottom: 16 }}>Overview</AppText>
|
||||
{isLoadingDashboard || isLoadingTender ? (
|
||||
<ActivityIndicator size="large" color={colors.primary} style={{ marginTop: 20 }} />
|
||||
) : (
|
||||
<StatGrid />
|
||||
)}
|
||||
</View>
|
||||
{isLoadingDashboard || isLoadingTender ? (
|
||||
<ActivityIndicator size="large" color={colors.primary} style={{ marginTop: 40 }} />
|
||||
) : (
|
||||
<View style={styles.sectionsWrapper}>
|
||||
|
||||
{/* Auction Section */}
|
||||
<View style={styles.sectionContainer}>
|
||||
<View style={styles.sectionHeader}>
|
||||
<AppText variant="body" color={colors.text} style={{ fontWeight: 'bold' }}>Auctions</AppText>
|
||||
<TouchableOpacity style={styles.viewAllBtn} onPress={() => navigation.navigate(NavigationString.Auction)}>
|
||||
<AppText variant="caption" color={colors.primary}>Explore</AppText>
|
||||
<ChevronRight size={14} color={colors.primary} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
{/* Placeholder for Recent Activity list with same glass style */}
|
||||
<View style={styles.gridContainer}>
|
||||
{renderGlassCard('Live Auctions', auctionStats?.liveAuctionCount, <Radio size={18} color={colors.primary} />, 0)}
|
||||
{renderGlassCard('Purchased', auctionStats?.myAuctionCount, <ShoppingCart size={18} color={colors.primary} />, 1)}
|
||||
{renderGlassCard('Participated', auctionStats?.currentBiddingCount, <FileText size={18} color={colors.primary} />, 2)}
|
||||
{renderGlassCard('Cancelled', auctionStats?.cancelledAuctionCount, <X size={18} color={colors.primary} />, 3)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* Tender Section */}
|
||||
<View style={styles.sectionContainer}>
|
||||
<View style={styles.sectionHeader}>
|
||||
<AppText variant="body" color={colors.text} style={{ fontWeight: 'bold' }}>Tenders</AppText>
|
||||
<TouchableOpacity style={styles.viewAllBtn} onPress={() => navigation.navigate(NavigationString.Tender)}>
|
||||
<AppText variant="caption" color={colors.primary}>Explore</AppText>
|
||||
<ChevronRight size={14} color={colors.primary} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
<View style={styles.gridContainer}>
|
||||
{renderGlassCard('Total Tenders', tenderStats[0]?.totalTender, <Layers size={18} color={colors.primary} />, 4)}
|
||||
{renderGlassCard('Purchased', tenderStats[0]?.totalPurchased, <ShoppingCart size={18} color={colors.primary} />, 5)}
|
||||
{renderGlassCard('Participated', tenderStats[0]?.totalParticipate, <FileText size={18} color={colors.primary} />, 6)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
)}
|
||||
|
||||
{/* Recent Activity */}
|
||||
<View style={styles.sectionContainer}>
|
||||
<AppText variant="button" color={colors.text} style={{ marginBottom: 16 }}>Recent Activity</AppText>
|
||||
<View style={[styles.glassCard, { width: '100%', height: 100, backgroundColor: colors.glass, alignItems: 'center', justifyContent: 'center' }]}>
|
||||
<AppText variant="body" color={colors.textSecondary}>No recent activity</AppText>
|
||||
<AppText variant="body" color={colors.text} style={{ fontWeight: 'bold', marginBottom: 10 }}>Recent Activity</AppText>
|
||||
<View style={[styles.activityCard, { backgroundColor: colors.glass, borderColor: colors.overlay }]}>
|
||||
<View style={[styles.activityIcon, { backgroundColor: colors.overlay }]}>
|
||||
<Clock size={20} color={colors.primary} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<AppText variant="bodySmall" color={colors.text}>No recent activity</AppText>
|
||||
<AppText variant="caption" color={colors.textSecondary}>Your latest bids will appear here</AppText>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -140,18 +161,47 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
scrollContent: {
|
||||
paddingTop: 60,
|
||||
paddingHorizontal: 20,
|
||||
paddingBottom: 100, // Space for floating tab bar
|
||||
paddingTop: 40,
|
||||
paddingHorizontal: 16,
|
||||
paddingBottom: 90,
|
||||
},
|
||||
headerContainer: {
|
||||
marginBottom: 40,
|
||||
headerTop: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'flex-start'
|
||||
alignItems: 'center',
|
||||
marginBottom: 20,
|
||||
},
|
||||
userInfo: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
avatarContainer: {
|
||||
width: 36,
|
||||
height: 36,
|
||||
borderRadius: 18,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginRight: 10,
|
||||
},
|
||||
headerActions: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
sectionsWrapper: {
|
||||
marginTop: 0,
|
||||
},
|
||||
sectionContainer: {
|
||||
marginBottom: 32,
|
||||
marginBottom: 20,
|
||||
},
|
||||
sectionHeader: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
marginBottom: 10,
|
||||
},
|
||||
viewAllBtn: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
gridContainer: {
|
||||
flexDirection: 'row',
|
||||
@@ -159,33 +209,44 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
glassCard: {
|
||||
width: (width - 48) / 2, // 2 column grid
|
||||
padding: 16,
|
||||
borderRadius: 24,
|
||||
padding: 12,
|
||||
borderRadius: 16,
|
||||
borderWidth: 1,
|
||||
marginBottom: 16,
|
||||
// Glassmorphism creates a subtle depth without heavy shadows
|
||||
marginBottom: 12,
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
halfWidthCard: {
|
||||
width: (width - 42) / 2,
|
||||
},
|
||||
cardHeader: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'flex-start',
|
||||
marginBottom: 12,
|
||||
alignItems: 'center',
|
||||
},
|
||||
iconContainer: {
|
||||
width: 32,
|
||||
height: 32,
|
||||
borderRadius: 8,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
cardContent: {
|
||||
marginTop: 8,
|
||||
},
|
||||
activityCard: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
padding: 12,
|
||||
borderRadius: 16,
|
||||
borderWidth: 1,
|
||||
},
|
||||
activityIcon: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
borderRadius: 12,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
cardValue: {
|
||||
fontSize: 28,
|
||||
fontWeight: '600',
|
||||
marginBottom: 4,
|
||||
},
|
||||
cardLabel: {
|
||||
fontSize: 14,
|
||||
fontWeight: '500',
|
||||
marginRight: 12,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { WebView } from "react-native-webview";
|
||||
import { CommonActions } from "@react-navigation/native";
|
||||
import colors from "../../Constant/Color";
|
||||
import { BASE_URL } from "../../Services/ApiCall/ApiUrls";
|
||||
|
||||
const SUCCESS_DELAY_MS = 5000; // 5 seconds
|
||||
|
||||
@@ -122,7 +123,7 @@ export const KycWebViewScreen = ({ route, navigation }: any) => {
|
||||
ref={webRef}
|
||||
source={{
|
||||
html: html ?? "<h3>No content</h3>",
|
||||
baseUrl: "https://11.godemo.in/ESetuKYC/initiate/",
|
||||
// baseUrl: `${BASE_URL}ESetuKYC/initiate/`,
|
||||
}}
|
||||
javaScriptEnabled
|
||||
domStorageEnabled
|
||||
@@ -132,7 +133,7 @@ export const KycWebViewScreen = ({ route, navigation }: any) => {
|
||||
onError={handleError}
|
||||
|
||||
onNavigationStateChange={(navState) => {
|
||||
console.log("Current URL:", navState.url);
|
||||
console.log("Current -- URL:", navState.url);
|
||||
handleNavigationStateChange(navState);
|
||||
}}
|
||||
|
||||
|
||||
+120
-120
@@ -5,7 +5,7 @@ import * as Yup from 'yup';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { useNavigation, CommonActions } from '@react-navigation/native';
|
||||
import { Mail, Lock, Eye, EyeOff, ArrowRight } from 'lucide-react-native';
|
||||
import Animated, { FadeInDown, FadeInUp, useSharedValue, useAnimatedStyle, withRepeat, withTiming, Easing, interpolate, interpolateColor } from 'react-native-reanimated';
|
||||
import Animated, { FadeInDown, FadeInUp, FadeInRight, FadeOutLeft, useSharedValue, useAnimatedStyle, withRepeat, withTiming, Easing, interpolate, interpolateColor } from 'react-native-reanimated';
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import { BlurView } from '@react-native-community/blur';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useCreate } from '../../Hooks/useCreate';
|
||||
import { setToken } from '../../Redux/Slices/Token';
|
||||
import NavigationString from '../../Constant/NavigationString';
|
||||
import ImagePath from '../../Constant/ImagePath';
|
||||
import { TENDER_LOGIN, LOG_IN_URL } from '../../Services/ApiCall/ApiUrls';
|
||||
import { TENDER_LOGIN } from '../../Services/ApiCall/ApiUrls';
|
||||
import { showErrorAlert, showToast } from '../../Constant/ShowDailog';
|
||||
import AppBackground from '../../components/AppBackground';
|
||||
import FontsFamily from '../../Constant/FontsFamily';
|
||||
@@ -29,16 +29,30 @@ const LoginSchema = Yup.object().shape({
|
||||
password: Yup.string().min(6, 'Minimum 6 characters').required('Password is required'),
|
||||
});
|
||||
|
||||
const CAROUSEL_TEXTS = [
|
||||
{ title: "Smart Procurement", subtitle: "Streamline your bidding and tenders." },
|
||||
{ title: "Real-Time Updates", subtitle: "Stay informed with instant notifications." },
|
||||
{ title: "Secure & Reliable", subtitle: "Your data is protected with enterprise-grade security." },
|
||||
];
|
||||
|
||||
const Login = () => {
|
||||
const { colors, spacing, shadows, isDarkMode } = useTheme();
|
||||
const navigation = useNavigation<any>();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const [passwordVisible, setPasswordVisible] = useState(false);
|
||||
const [activeType, setActiveType] = useState<'tender' | 'auction'>('tender');
|
||||
const [showForm, setShowForm] = useState(false);
|
||||
const [activeSlide, setActiveSlide] = useState(0);
|
||||
const { mutateAsync: registrationStateMutate } = useRagistrationState();
|
||||
|
||||
useEffect(() => {
|
||||
if (showForm) return;
|
||||
const interval = setInterval(() => {
|
||||
setActiveSlide((prev) => (prev + 1) % CAROUSEL_TEXTS.length);
|
||||
}, 4000);
|
||||
return () => clearInterval(interval);
|
||||
}, [showForm]);
|
||||
|
||||
// Animation Shared Values for Reveal
|
||||
const formOpacity = useSharedValue(0);
|
||||
const headerTranslateY = useSharedValue(0);
|
||||
@@ -115,13 +129,8 @@ const Login = () => {
|
||||
const ACCENT_2 = '#f59e0b'; // Amber-500
|
||||
|
||||
// Mutations
|
||||
const tenderLoginMutation = useCreate<any, any>(TENDER_LOGIN, {
|
||||
onSuccess: (res) => handleSuccess(res, 'tender'),
|
||||
onError: (err) => showErrorAlert(err.message || 'Login failed')
|
||||
});
|
||||
|
||||
const auctionLoginMutation = useCreate<any, any>(LOG_IN_URL, {
|
||||
onSuccess: (res) => handleSuccess(res, 'auction'),
|
||||
const loginMutation = useCreate<any, any>(TENDER_LOGIN, {
|
||||
onSuccess: (res) => handleSuccess(res),
|
||||
onError: (err) => showErrorAlert(err.message || 'Login failed')
|
||||
});
|
||||
const routeByOrgType = useCallback((params: { otherId: any; orgType: any }) => {
|
||||
@@ -199,20 +208,11 @@ const Login = () => {
|
||||
}
|
||||
}
|
||||
}, [navigation, registrationStateMutate, routeByOrgType]);
|
||||
const handleSuccess = (res: any, type: string) => {
|
||||
dispatch(setToken({ ...res.data, token: res.token, userType: type }));
|
||||
const handleSuccess = (res: any) => {
|
||||
dispatch(setToken({ ...res.data, token: res.token, userType: 'tender' }));
|
||||
console.log('handleSuccess', res)
|
||||
if (res.statusCode === 200) {
|
||||
if (type === 'tender') {
|
||||
handleGetData()
|
||||
} else {
|
||||
console.log("Response login : ", res, type)
|
||||
navigation.dispatch(
|
||||
CommonActions.reset({
|
||||
index: 0,
|
||||
routes: [{ name: NavigationString.Home }],
|
||||
}),
|
||||
);
|
||||
}
|
||||
handleGetData()
|
||||
} else {
|
||||
showErrorAlert(res.message);
|
||||
}
|
||||
@@ -220,28 +220,31 @@ const Login = () => {
|
||||
|
||||
const handleLogin = (values: any) => {
|
||||
const payload = { emailAdd: values.email, password: values.password, device: "mobileApp" };
|
||||
if (activeType === 'tender') tenderLoginMutation.mutate(payload);
|
||||
else auctionLoginMutation.mutate(payload);
|
||||
console.log('payload------------', payload)
|
||||
loginMutation.mutate(payload);
|
||||
};
|
||||
|
||||
const isLoading = activeType === 'tender' ? tenderLoginMutation.isPending : auctionLoginMutation.isPending;
|
||||
const isLoading = loginMutation.isPending;
|
||||
|
||||
// Minimal Input Component (No Card Borders)
|
||||
// Minimal Input Component (Enhanced for better aesthetics)
|
||||
const MinimalInput = ({ placeholder, value, onChangeText, onBlur, icon, secureTextEntry, rightIcon, onRightIconPress }: any) => {
|
||||
const focus = useSharedValue(0);
|
||||
const { colors: themeColors } = useTheme();
|
||||
const { colors: themeColors, isDarkMode } = useTheme();
|
||||
|
||||
const animatedStyle = useAnimatedStyle(() => {
|
||||
const borderBottomColor = interpolateColor(focus.value, [0, 1], ['rgba(0,0,0,0.1)', themeColors.primary]);
|
||||
const borderBottomWidth = interpolate(focus.value, [0, 1], [1, 2]);
|
||||
const borderColor = interpolateColor(focus.value, [0, 1], [isDarkMode ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.05)', themeColors.primary]);
|
||||
const borderWidth = interpolate(focus.value, [0, 1], [1, 1.5]);
|
||||
const backgroundColor = interpolateColor(focus.value, [0, 1], [isDarkMode ? 'rgba(30, 41, 59, 0.4)' : 'rgba(255, 255, 255, 0.6)', isDarkMode ? 'rgba(30, 41, 59, 0.8)' : 'rgba(255, 255, 255, 0.95)']);
|
||||
|
||||
return {
|
||||
borderBottomColor,
|
||||
borderBottomWidth,
|
||||
borderColor,
|
||||
borderWidth,
|
||||
backgroundColor,
|
||||
};
|
||||
});
|
||||
|
||||
return (
|
||||
<Animated.View style={[styles.inputWrapper, animatedStyle]}>
|
||||
<Animated.View style={[styles.modernInputWrapper, animatedStyle]}>
|
||||
<View style={styles.inputIcon}>{icon}</View>
|
||||
<TextInput
|
||||
style={[styles.textInput, { color: themeColors.text }]}
|
||||
@@ -269,6 +272,7 @@ const Login = () => {
|
||||
};
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<AppBackground
|
||||
secondarySource={isDarkMode ? ImagePath.DarkBg2 : ImagePath.LightBg2}
|
||||
@@ -300,9 +304,17 @@ const Login = () => {
|
||||
entering={FadeInDown.duration(1000).springify()}
|
||||
style={styles.mainContent}
|
||||
>
|
||||
|
||||
|
||||
|
||||
<View style={styles.welcomeContainer}>
|
||||
<Animated.View key={activeSlide} entering={FadeInRight.duration(500)} exiting={FadeOutLeft.duration(500)}>
|
||||
<Text style={[styles.welcomeTitle, { color: colors.primary }]}>{CAROUSEL_TEXTS[activeSlide].title}</Text>
|
||||
<Text style={styles.welcomeSubtitle}>{CAROUSEL_TEXTS[activeSlide].subtitle}</Text>
|
||||
</Animated.View>
|
||||
<View style={styles.paginationContainer}>
|
||||
{CAROUSEL_TEXTS.map((_, i) => (
|
||||
<View key={i} style={[styles.dot, activeSlide === i && styles.activeDot, { backgroundColor: activeSlide === i ? colors.primary : colors.text + '40' }]} />
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
<Animated.View
|
||||
entering={FadeInUp.duration(1000).delay(400).springify()}
|
||||
style={styles.revealButtonContainer}
|
||||
@@ -362,32 +374,10 @@ const Login = () => {
|
||||
|
||||
|
||||
<View style={styles.cardInnerContent}>
|
||||
{/* TOGGLE */}
|
||||
<View style={styles.toggleContainer}>
|
||||
{['tender', 'auction'].map((type) => (
|
||||
<TouchableOpacity
|
||||
key={type}
|
||||
onPress={() => setActiveType(type as 'tender' | 'auction')}
|
||||
style={[
|
||||
styles.toggleButton,
|
||||
activeType === type && [styles.toggleButtonActive]
|
||||
]}
|
||||
>
|
||||
{activeType === type && (
|
||||
<Animated.View entering={FadeInDown.duration(300)} style={StyleSheet.absoluteFill}>
|
||||
<View style={[StyleSheet.absoluteFill, { backgroundColor: colors.primary, borderRadius: 20 }]} />
|
||||
</Animated.View>
|
||||
)}
|
||||
<Text style={[
|
||||
[styles.toggleText, { color: colors.textSecondary }],
|
||||
activeType === type && [styles.toggleTextActive, { color: colors.beige }]
|
||||
]}>
|
||||
{type.toUpperCase()}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
))}
|
||||
<View style={styles.formHeader}>
|
||||
<Text style={[styles.formTitle, { color: colors.text }]}>Welcome Back</Text>
|
||||
<Text style={styles.formSubtitle}>Sign in to your account</Text>
|
||||
</View>
|
||||
|
||||
<Formik
|
||||
initialValues={{ email: '', password: '' }}
|
||||
validationSchema={LoginSchema}
|
||||
@@ -413,7 +403,6 @@ const Login = () => {
|
||||
secureTextEntry={!passwordVisible}
|
||||
rightIcon={passwordVisible ? <EyeOff size={22} color={colors.textSecondary} /> : <Eye size={22} color={colors.textSecondary} />}
|
||||
onRightIconPress={() => setPasswordVisible(!passwordVisible)}
|
||||
|
||||
/>
|
||||
{touched.password && errors.password && <Text style={styles.errorText}>{errors.password}</Text>}
|
||||
|
||||
@@ -424,14 +413,19 @@ const Login = () => {
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.8}
|
||||
onPress={() => handleSubmit()}
|
||||
style={[styles.loginBtnContainer, { backgroundColor: colors.primary }]}
|
||||
style={styles.loginBtnContainer}
|
||||
>
|
||||
|
||||
<Text style={styles.loginBtnText}>
|
||||
{isLoading ? 'Wait...' : 'SIGN IN'}
|
||||
</Text>
|
||||
{!isLoading && <ArrowRight size={22} color={'#FFF'} style={styles.arrowIcon} />}
|
||||
|
||||
<LinearGradient
|
||||
colors={[colors.primary, '#f59953']}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 0 }}
|
||||
style={styles.loginBtn}
|
||||
>
|
||||
<Text style={styles.loginBtnText}>
|
||||
{isLoading ? 'Wait...' : 'SIGN IN'}
|
||||
</Text>
|
||||
{!isLoading && <ArrowRight size={22} color={'#FFF'} style={styles.arrowIcon} />}
|
||||
</LinearGradient>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)}
|
||||
@@ -608,51 +602,43 @@ const styles = StyleSheet.create({
|
||||
paddingTop: 30,
|
||||
},
|
||||
|
||||
// TOGGLE
|
||||
toggleContainer: {
|
||||
flexDirection: 'row',
|
||||
// FORM HEADERS
|
||||
formHeader: {
|
||||
marginBottom: 24,
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: 'rgba(226, 232, 240, 0.6)',
|
||||
paddingBottom: 8,
|
||||
alignItems: 'flex-start',
|
||||
},
|
||||
toggleButton: {
|
||||
marginRight: 24,
|
||||
paddingVertical: 8,
|
||||
paddingHorizontal: 16,
|
||||
borderRadius: 20,
|
||||
},
|
||||
toggleButtonActive: {},
|
||||
toggleText: {
|
||||
fontSize: 14,
|
||||
fontWeight: '600',
|
||||
letterSpacing: 0.5,
|
||||
},
|
||||
toggleTextActive: {
|
||||
color: '#0f172a',
|
||||
formTitle: {
|
||||
fontSize: 26,
|
||||
fontWeight: '800',
|
||||
fontFamily: FontsFamily.poppinsBold,
|
||||
marginBottom: 4,
|
||||
},
|
||||
formSubtitle: {
|
||||
fontSize: 14,
|
||||
color: '#64748b',
|
||||
fontFamily: FontsFamily.poppinsMedium,
|
||||
},
|
||||
|
||||
// FORM INPUTS
|
||||
formContainer: {
|
||||
width: '100%',
|
||||
},
|
||||
inputWrapper: {
|
||||
modernInputWrapper: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
height: 56,
|
||||
marginBottom: 4,
|
||||
marginBottom: 16,
|
||||
borderRadius: 16,
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
inputIcon: {
|
||||
marginRight: 16,
|
||||
width: 24,
|
||||
marginRight: 12,
|
||||
alignItems: 'center',
|
||||
},
|
||||
textInput: {
|
||||
flex: 1,
|
||||
fontSize: 16,
|
||||
color: '#0f172a', // This might need theme injection in the component
|
||||
fontWeight: '500',
|
||||
fontSize: 15,
|
||||
fontFamily: FontsFamily.poppinsMedium,
|
||||
height: '100%',
|
||||
},
|
||||
inputRightIcon: {
|
||||
@@ -661,14 +647,14 @@ const styles = StyleSheet.create({
|
||||
errorText: {
|
||||
fontSize: 12,
|
||||
color: '#ef4444',
|
||||
marginLeft: 40,
|
||||
marginBottom: 8,
|
||||
marginLeft: 8,
|
||||
marginTop: -10,
|
||||
marginBottom: 10,
|
||||
},
|
||||
forgotPass: {
|
||||
alignSelf: 'flex-start',
|
||||
marginTop: 8,
|
||||
marginBottom: 32,
|
||||
marginLeft: 40,
|
||||
alignSelf: 'flex-end',
|
||||
marginTop: 4,
|
||||
marginBottom: 24,
|
||||
},
|
||||
forgotText: {
|
||||
fontSize: 14,
|
||||
@@ -683,11 +669,9 @@ const styles = StyleSheet.create({
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 16,
|
||||
elevation: 8,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingVertical: 15,
|
||||
borderRadius: 28,
|
||||
overflow: 'hidden',
|
||||
width: '100%',
|
||||
},
|
||||
loginBtn: {
|
||||
height: 56,
|
||||
@@ -695,6 +679,7 @@ const styles = StyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '100%',
|
||||
},
|
||||
loginBtnText: {
|
||||
fontSize: 16,
|
||||
@@ -725,7 +710,6 @@ const styles = StyleSheet.create({
|
||||
|
||||
// REVEAL BUTTON
|
||||
revealButtonContainer: {
|
||||
marginTop: 'auto', // Push to bottom
|
||||
marginBottom: 30,
|
||||
width: '100%',
|
||||
paddingHorizontal: 10,
|
||||
@@ -767,25 +751,41 @@ const styles = StyleSheet.create({
|
||||
width: 100,
|
||||
height: 70,
|
||||
},
|
||||
introTextContainer: {
|
||||
marginBottom: 20,
|
||||
paddingHorizontal: 10,
|
||||
welcomeContainer: {
|
||||
paddingHorizontal: 20,
|
||||
marginBottom: 30,
|
||||
},
|
||||
introMainText: {
|
||||
fontSize: 24,
|
||||
color: '#FFFFFF',
|
||||
fontWeight: '800',
|
||||
fontFamily: FontsFamily.poppinsBold,
|
||||
textShadowColor: 'rgba(0, 0, 0, 0.3)',
|
||||
welcomeTitle: {
|
||||
fontSize: 32,
|
||||
fontWeight: '900',
|
||||
letterSpacing: -1,
|
||||
marginBottom: 8,
|
||||
textShadowColor: 'rgba(0, 0, 0, 0.15)',
|
||||
textShadowOffset: { width: 0, height: 2 },
|
||||
textShadowRadius: 6,
|
||||
fontFamily: FontsFamily.poppinsBold,
|
||||
},
|
||||
introSubText: {
|
||||
fontSize: 14,
|
||||
color: 'rgba(255, 255, 255, 0.8)',
|
||||
welcomeSubtitle: {
|
||||
fontSize: 16,
|
||||
color: '#64748b',
|
||||
fontWeight: '500',
|
||||
marginTop: 4,
|
||||
lineHeight: 24,
|
||||
fontFamily: FontsFamily.poppinsMedium,
|
||||
maxWidth: '80%',
|
||||
},
|
||||
paginationContainer: {
|
||||
flexDirection: 'row',
|
||||
marginTop: 20,
|
||||
alignItems: 'center',
|
||||
},
|
||||
dot: {
|
||||
width: 8,
|
||||
height: 8,
|
||||
borderRadius: 4,
|
||||
marginRight: 8,
|
||||
},
|
||||
activeDot: {
|
||||
width: 24,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -182,12 +182,7 @@ const ProfileTab: React.FC = () => {
|
||||
const [showDialog, setShowDialog] = useState<boolean>(false);
|
||||
const [isNavigating, setIsNavigating] = useState<boolean>(false);
|
||||
|
||||
// Check if user is auction type
|
||||
const isAuctionUser = user?.userType?.toLowerCase() === 'auction';
|
||||
|
||||
// Get display data based on user type
|
||||
const displayName = isAuctionUser ? user?.fullName : data?.fullName;
|
||||
const displayMobile = isAuctionUser ? user?.mobileNo : data?.mobileNo;
|
||||
|
||||
const handleAadhaarPress = () => {
|
||||
if (user?.esetuVerified === 'Not Verified' || user?.esetuVerified === null) {
|
||||
@@ -210,7 +205,7 @@ const ProfileTab: React.FC = () => {
|
||||
udf2: "77.34",
|
||||
udf3: "string",
|
||||
udf4: "string",
|
||||
responseUrl: "http://dev.192.168.6.194:8090/"
|
||||
// responseUrl: "http://dev.192.168.6.194:8090/"
|
||||
};
|
||||
|
||||
const res = await eSetuAdharVarification(payload);
|
||||
@@ -264,7 +259,7 @@ const ProfileTab: React.FC = () => {
|
||||
showsVerticalScrollIndicator={false}
|
||||
>
|
||||
{/* Header with Gradient */}
|
||||
<ProfileHeader data={data} displayName={displayName || data.fullName} />
|
||||
<ProfileHeader data={data} displayName={data?.fullName} />
|
||||
|
||||
{/* Quick Stats */}
|
||||
<QuickStats data={data} onAadhaarPress={handleAadhaarPress} />
|
||||
@@ -274,18 +269,18 @@ const ProfileTab: React.FC = () => {
|
||||
title="Personal Information"
|
||||
IconComponent={UserCircle}
|
||||
delay={0}
|
||||
showEdit={!isAuctionUser}
|
||||
showEdit={true}
|
||||
onEdit={() => setEditModalVisible(true)}
|
||||
>
|
||||
<InfoRow
|
||||
label="Full Name"
|
||||
value={isAuctionUser ? displayName : `${data.firstName} ${data.middleName} ${data.lastName}`.trim()}
|
||||
value={`${data.firstName} ${data.middleName} ${data.lastName}`.trim()}
|
||||
IconComponent={User}
|
||||
/>
|
||||
<InfoRow label="Email" value={data.emailId} IconComponent={Mail} />
|
||||
<InfoRow
|
||||
label="Mobile"
|
||||
value={isAuctionUser ? displayMobile : `${data.dialCode} ${data.mobileNo}`}
|
||||
value={`${data.dialCode} ${data.mobileNo}`}
|
||||
IconComponent={Phone}
|
||||
/>
|
||||
<InfoRow label="Designation" value={data.designation} IconComponent={Briefcase} />
|
||||
@@ -363,15 +358,13 @@ const ProfileTab: React.FC = () => {
|
||||
<View style={{ height: 40 }} />
|
||||
</ScrollView>
|
||||
|
||||
{/* Edit Modal - Only for tender users */}
|
||||
{!isAuctionUser && (
|
||||
<EditProfileModal
|
||||
visible={editModalVisible}
|
||||
onClose={() => setEditModalVisible(false)}
|
||||
data={data}
|
||||
onSuccess={refetch}
|
||||
/>
|
||||
)}
|
||||
{/* Edit Modal */}
|
||||
<EditProfileModal
|
||||
visible={editModalVisible}
|
||||
onClose={() => setEditModalVisible(false)}
|
||||
data={data}
|
||||
onSuccess={refetch}
|
||||
/>
|
||||
|
||||
{/* Aadhaar Verification Dialog */}
|
||||
<ConfirmDialog
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useNavigation, useIsFocused } from '@react-navigation/native';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import { showToast } from '../../Constant/ShowDailog';
|
||||
import { showErrorAlert, showToast } from '../../Constant/ShowDailog';
|
||||
import { useRagistrationState } from '../../Services/ApiCall/Hooks';
|
||||
import NavigationString from '../../Constant/NavigationString';
|
||||
|
||||
@@ -88,8 +88,11 @@ const Splash: React.FC = () => {
|
||||
return;
|
||||
}
|
||||
console.error('API error:', res);
|
||||
showToast(res?.message || 'Something went wrong');
|
||||
navigation.replace('Registration');
|
||||
showErrorAlert(res?.error || 'Something went wrong. Please try re-logging in.');
|
||||
navigation.reset({
|
||||
index: 0,
|
||||
routes: [{ name: NavigationString.Login }],
|
||||
});
|
||||
} catch (error: any) {
|
||||
console.error('Registration status error:', error);
|
||||
showToast(error?.message || 'Something went wrong');
|
||||
|
||||
@@ -90,7 +90,7 @@ const ProceedToBidDetail = () => {
|
||||
udf2: "77.34",
|
||||
udf3: "string",
|
||||
udf4: "string",
|
||||
responseUrl: "http://dev.192.168.6.194:8090/"
|
||||
// responseUrl: "http://dev.192.168.6.194:8090/"
|
||||
};
|
||||
|
||||
const res = await eSetuAdharVarification(payload);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// const BASE_URL = `http://192.168.6.194:8090/`
|
||||
const BASE_URL = `https://dev.procurelinc.in/api/EProcurementSB/`
|
||||
// const BASE_URL_Auction = `http://192.168.6.194/AuctionPostgre/api/auction/`
|
||||
export const BASE_URL_Auction = `https://procurelinc.in/Auction/`
|
||||
const BASE_URL = `http://java-backend-main.lincpay/`
|
||||
// const BASE_URL = `http://192.168.6.194/AuctionPostgre/api/auction/`
|
||||
// export const BASE_URL = `https://procurelinc.in/Auction/`
|
||||
// const BASE_URL = `http://192.168.29.226:8090/`
|
||||
const GET_DESIGNATION = `${BASE_URL}contractor/getAllDesignationContractor`
|
||||
const SAVE_CONTRACTOR_STAGE1 = `${BASE_URL}contractor/registerContractorStage1`
|
||||
@@ -26,52 +26,52 @@ const CONTRACTOR_PROFILE_UPDATE = `${BASE_URL}contractor/updateContBasicDetails?
|
||||
const GET_REGISTRATION_STATE = `${BASE_URL}contractor/getContractorOrgTypeandStatus`
|
||||
const GET_MASTER_DATA = `${BASE_URL}contractor/masterdata/all`
|
||||
const GET_TENDER_BY_ID = `http://192.168.6.194:8090/eTendering/getTenderById?tenderId=`
|
||||
const LOG_IN_URL = `${BASE_URL_Auction}auction/loginWithoutDecryption`
|
||||
const LOG_IN_URL = `${BASE_URL}auction/loginWithoutDecryption`
|
||||
const LIVE_TENDER = `${BASE_URL}liveTender/getAllLiveTenders`
|
||||
const LIVE_AUCTION = `${BASE_URL_Auction}api/auction/getLiveAuctionForMobile`
|
||||
const PURCHASE_AUCTION_PAGE = `${BASE_URL_Auction}api/auction/getMyAuctionForMobile`
|
||||
const PROCEED_PURCHASE_AUCTION = `${BASE_URL_Auction}api/auction/proceedToPurchase`
|
||||
const PURCHASE_AUCTION = `${BASE_URL_Auction}api/auction/purchaseAuction`
|
||||
const PURCHASE_OFFLINE_AUCTION = `${BASE_URL_Auction}api/auction/purchaseAuctionOffline`
|
||||
const LIVE_AUCTION = `${BASE_URL}api/auction/getLiveAuctionForMobile`
|
||||
const PURCHASE_AUCTION_PAGE = `${BASE_URL}api/auction/getMyAuctionForMobile`
|
||||
const PROCEED_PURCHASE_AUCTION = `${BASE_URL}api/auction/proceedToPurchase`
|
||||
const PURCHASE_AUCTION = `${BASE_URL}api/auction/purchaseAuction`
|
||||
const PURCHASE_OFFLINE_AUCTION = `${BASE_URL}api/auction/purchaseAuctionOffline`
|
||||
const PURCHASE_TENDER = `${BASE_URL}tenderPayment/purchaseTender`
|
||||
const PURCHASE_TENDER_OFFLINE = `${BASE_URL}tenderPayment/purchaseTenderOffline`
|
||||
const AUCTION_PURCHASE_STATUS = `${BASE_URL_Auction}api/auction/transactionStatus?orderNo=`
|
||||
const AUCTION_PURCHASE_STATUS = `${BASE_URL}api/auction/transactionStatus?orderNo=`
|
||||
const GET_TENDER_DETAILS = `${BASE_URL}tenderBidding/getTenderDetail?tenderId=`
|
||||
const GET_DOCID = `${BASE_URL}eTendering/download/docId?docId=`
|
||||
// http://192.168.6.194:8090/eTendering/download/docId?docId=158
|
||||
// const DOWNLOAD_DOC = `${BASE_URL}eTende ring/download/docId?docId=`
|
||||
const DOWNLOAD_DOC = `${BASE_URL}eTendering/download/docId?docId=`
|
||||
const TWO_FACTOR_AUTH = `${BASE_URL}contractor/two-factor-auth?status=`
|
||||
const AUCTION_LOGIN = `${BASE_URL_Auction}auction/loginWithoutDecryption`
|
||||
const GET_AUCTION_DETAILS = `${BASE_URL_Auction}api/auction/getAuction/id`
|
||||
const AUCTION_LOGIN = `${BASE_URL}auction/loginWithoutDecryption`
|
||||
const GET_AUCTION_DETAILS = `${BASE_URL}api/auction/getAuction/id`
|
||||
const TANDER_PURCHASE_STATUS = `${BASE_URL}tenderPayment/transactionStatus?orderNo=`
|
||||
const GET_MY_AUCTION = `${BASE_URL_Auction}api/auction/getMyAuction`
|
||||
const GET_MY_AUCTION = `${BASE_URL}api/auction/getMyAuction`
|
||||
const GET_MY_TENDER = `${BASE_URL}tenderBidding/getAllPurchasedTendersByConId`
|
||||
const GET_DOCID_AUCTION = `${BASE_URL_Auction}api/auction/viewDocumentsForAuction?auctionId=`
|
||||
const DOWNLOAD_DOC_AUCTION = `${BASE_URL_Auction}api/auction/downloadDocumentForAuction?documentId`
|
||||
const FORARD_AUCTION_ITEM = `${BASE_URL_Auction}api/auction/getForwardAuctionItems/auctionNumber`
|
||||
const AUCTION_ITEM_SUBMIT = `${BASE_URL_Auction}api/auction/addEMDDocumentsItemWise`
|
||||
const EMD_CHECK = `${BASE_URL_Auction}api/auction/getEMDDocumentsForAuction`
|
||||
const REVERSE_AUCTION_ITEM = `${BASE_URL_Auction}api/auction/getReverseAuctionItems/auctionNumber`
|
||||
const FORWARD_AUCTION_ITEM = `${BASE_URL_Auction}api/auction/getForwardAuctionItems/auctionNumber`
|
||||
const SELECTED_AUCTION_ITEM = `${BASE_URL_Auction}api/auction/getEMDDocumentsForAuction`
|
||||
const GET_TECHNICAL_DOCUMENTAION = `${BASE_URL_Auction}api/auction/getAllTechnicalDocumentTemplates`
|
||||
const CHECK_TECHNICAL_DOCUMENTAION = `${BASE_URL_Auction}api/auction/checkContractorAuctionMatch`
|
||||
const TECHNICAL_VALUE_SUBMIT = `${BASE_URL_Auction}api/auction/saveTechnicalDocumentTemplateValue`
|
||||
const TECHNICAL_DOCUMENT_SUBMIT = `${BASE_URL_Auction}api/auction/TechnicalDocumentUpload`
|
||||
const ITEM_DETAIL = `${BASE_URL_Auction}api/auction/home/viewDocuments/inventoryId`
|
||||
const ITEM_DOCUMENT_DOWNLOAD = `${BASE_URL_Auction}api/auction/home/downloadDocument/documentId`
|
||||
const GET_DOCID_AUCTION = `${BASE_URL}api/auction/viewDocumentsForAuction?auctionId=`
|
||||
const DOWNLOAD_DOC_AUCTION = `${BASE_URL}api/auction/downloadDocumentForAuction?documentId`
|
||||
const FORARD_AUCTION_ITEM = `${BASE_URL}api/auction/getForwardAuctionItems/auctionNumber`
|
||||
const AUCTION_ITEM_SUBMIT = `${BASE_URL}api/auction/addEMDDocumentsItemWise`
|
||||
const EMD_CHECK = `${BASE_URL}api/auction/getEMDDocumentsForAuction`
|
||||
const REVERSE_AUCTION_ITEM = `${BASE_URL}api/auction/getReverseAuctionItems/auctionNumber`
|
||||
const FORWARD_AUCTION_ITEM = `${BASE_URL}api/auction/getForwardAuctionItems/auctionNumber`
|
||||
const SELECTED_AUCTION_ITEM = `${BASE_URL}api/auction/getEMDDocumentsForAuction`
|
||||
const GET_TECHNICAL_DOCUMENTAION = `${BASE_URL}api/auction/getAllTechnicalDocumentTemplates`
|
||||
const CHECK_TECHNICAL_DOCUMENTAION = `${BASE_URL}api/auction/checkContractorAuctionMatch`
|
||||
const TECHNICAL_VALUE_SUBMIT = `${BASE_URL}api/auction/saveTechnicalDocumentTemplateValue`
|
||||
const TECHNICAL_DOCUMENT_SUBMIT = `${BASE_URL}api/auction/TechnicalDocumentUpload`
|
||||
const ITEM_DETAIL = `${BASE_URL}api/auction/home/viewDocuments/inventoryId`
|
||||
const ITEM_DOCUMENT_DOWNLOAD = `${BASE_URL}api/auction/home/downloadDocument/documentId`
|
||||
|
||||
// Rohit
|
||||
const DASHBOARD_COUNT = `${BASE_URL_Auction}api/auction/home/dashboard/counts`
|
||||
const DASHBOARD_COUNT = `${BASE_URL}api/auction/home/dashboard/counts`
|
||||
const TENDER_DASHBOARD = `${BASE_URL}contractor/getAllContractorDashboradDetails`
|
||||
const AUCTION_ONE_TIME_BID = `${BASE_URL_Auction}api/bidding/getBidForAuction`
|
||||
const AUCITON_SINGLE_EMD = `${BASE_URL_Auction}api/auction/addEMDDocumentsAuctionWise`
|
||||
const PURCHASE_AUCTION_LIST = `${BASE_URL_Auction}api/auction/proceedToPurchase`
|
||||
const VIEW_AUCTION_ITEM_DETAIL = `${BASE_URL_Auction}api/auction/viewDocumentsForAuctionItemDetails`
|
||||
const VIEW_AUCTION_DOCUMENTS = `${BASE_URL_Auction}api/auction/viewDocumentsForAuction`
|
||||
const AUCTION_DOCUMENT_DOWNLOAD = `${BASE_URL_Auction}api/auction/home/downloadDocumentForAuction`
|
||||
const AUCTION_ITEM_DOCUMENT_DOWNLOAD = `${BASE_URL_Auction}api/auction/home/downloadDocument/auctionItemId`
|
||||
const AUCTION_ONE_TIME_BID = `${BASE_URL}api/bidding/getBidForAuction`
|
||||
const AUCITON_SINGLE_EMD = `${BASE_URL}api/auction/addEMDDocumentsAuctionWise`
|
||||
const PURCHASE_AUCTION_LIST = `${BASE_URL}api/auction/proceedToPurchase`
|
||||
const VIEW_AUCTION_ITEM_DETAIL = `${BASE_URL}api/auction/viewDocumentsForAuctionItemDetails`
|
||||
const VIEW_AUCTION_DOCUMENTS = `${BASE_URL}api/auction/viewDocumentsForAuction`
|
||||
const AUCTION_DOCUMENT_DOWNLOAD = `${BASE_URL}api/auction/home/downloadDocumentForAuction`
|
||||
const AUCTION_ITEM_DOCUMENT_DOWNLOAD = `${BASE_URL}api/auction/home/downloadDocument/auctionItemId`
|
||||
|
||||
|
||||
//tender
|
||||
|
||||
@@ -261,6 +261,7 @@ export const fetchMasterData = async (): Promise<any> => {
|
||||
'get',
|
||||
`${GET_MASTER_DATA}`
|
||||
);
|
||||
console.log('data------------------', data)
|
||||
return data;
|
||||
};
|
||||
export const getDesignation = async (): Promise<any> => {
|
||||
|
||||
Reference in New Issue
Block a user