From dd672f39f551695977c742c0d4459696cf348b9b Mon Sep 17 00:00:00 2001 From: Abin Toppo Date: Tue, 2 Jun 2026 16:09:12 +0530 Subject: [PATCH] chore: push current project state to new repository Co-Authored-By: Claude Opus 4.8 (1M context) --- App.tsx | 4 +- .../org.eclipse.buildship.core.prefs | 2 +- src/Axios/Axios.ts | 6 + src/Navigation/NavigationService.ts | 20 ++ src/Screens/Auction/Auction.tsx | 46 +--- src/Screens/Home/Home.tsx | 259 +++++++++++------- src/Screens/Home/KycWebViewScreen.tsx | 5 +- src/Screens/Login/Login.tsx | 240 ++++++++-------- src/Screens/Profile/ProfileTab.tsx | 31 +-- src/Screens/Splash/Splash.tsx | 9 +- src/Screens/Tender/ProceedToBidDetail.tsx | 2 +- src/Services/ApiCall/ApiUrls.tsx | 70 ++--- src/Services/ApiCall/apis.ts | 1 + 13 files changed, 369 insertions(+), 326 deletions(-) create mode 100644 src/Navigation/NavigationService.ts diff --git a/App.tsx b/App.tsx index 83f0382..736ac98 100644 --- a/App.tsx +++ b/App.tsx @@ -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 ( - + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs index 08fe375..8c1ab4a 100644 --- a/android/.settings/org.eclipse.buildship.core.prefs +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -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) diff --git a/src/Axios/Axios.ts b/src/Axios/Axios.ts index bc655c0..cd34618 100644 --- a/src/Axios/Axios.ts +++ b/src/Axios/Axios.ts @@ -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 ( method: 'get' | 'post' | 'patch' | 'delete' | 'put', @@ -97,6 +101,8 @@ export const apiCall = async ( } as R; } + + console.groupEnd(); // 🔚 MAIN GROUP return { success: false, diff --git a/src/Navigation/NavigationService.ts b/src/Navigation/NavigationService.ts new file mode 100644 index 0000000..fd7e967 --- /dev/null +++ b/src/Navigation/NavigationService.ts @@ -0,0 +1,20 @@ +import { createNavigationContainerRef, CommonActions } from '@react-navigation/native'; + +export const navigationRef = createNavigationContainerRef(); + +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 }], + }) + ); + } +} diff --git a/src/Screens/Auction/Auction.tsx b/src/Screens/Auction/Auction.tsx index a0497e4..41aaaa0 100644 --- a/src/Screens/Auction/Auction.tsx +++ b/src/Screens/Auction/Auction.tsx @@ -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 ( - - - - - {/* Icon ring */} - - - - - - - Access Restricted - - - - You're logged in as a{' '} - - Tender user - - {'. '}Auction features are not available for your account type. - - - - - Switch to an Auction account to access live & purchase auction features. - - - - Navigation.navigate(NavigationString.Login)} - > - - Switch to Auction Login - - - - - - ); - } return ( diff --git a/src/Screens/Home/Home.tsx b/src/Screens/Home/Home.tsx index d1dc58f..b568dd0 100644 --- a/src/Screens/Home/Home.tsx +++ b/src/Screens/Home/Home.tsx @@ -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({}); + const [auctionStats, setAuctionStats] = useState({}); + const [tenderStats, setTenderStats] = useState({}); const [isMenuVisible, setIsMenuVisible] = useState(false); const navigation = useNavigation(); 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) => ( {icon} - + {value || '0'} + + + {title} - {value || '0'} - {title} ); - const StatGrid = () => ( - - {userType === 'auction' ? ( - <> - {renderGlassCard('Live Auctions', stats?.liveAuctionCount, , 0)} - {renderGlassCard('My Purchased Auctions', stats?.myAuctionCount, , 1)} - {renderGlassCard('Cancelled Auctions', stats?.cancelledAuctionCount, , 2)} - {renderGlassCard('Participated Auctions', stats?.currentBiddingCount, , 3)} - - ) : ( - <> - {renderGlassCard('Total Purchased', stats[0]?.totalPurchased, , 0)} - {renderGlassCard('Participated', stats[0]?.totalParticipate, , 1)} - {renderGlassCard('Total Tenders', stats[0]?.totalTender, , 2)} - - )} - - ); - return ( - + - {/* Large Typography Header */} - - - Hello, {userData?.firstName || 'User'} - - Find Your{'\n'}Perfect {userType === 'auction' ? 'Deal' : 'Tender'} - + {/* Top Bar */} + + + + {userData?.firstName?.charAt(0) || 'U'} + + + Welcome, + {userData?.firstName || 'User'} + + + + setIsMenuVisible(true)}> + + - setIsMenuVisible(true)}> - - setIsMenuVisible(false)} /> - {/* Floating/Glass Stats */} - - Overview - {isLoadingDashboard || isLoadingTender ? ( - - ) : ( - - )} - + {isLoadingDashboard || isLoadingTender ? ( + + ) : ( + + + {/* Auction Section */} + + + Auctions + navigation.navigate(NavigationString.Auction)}> + Explore + + + - {/* Placeholder for Recent Activity list with same glass style */} + + {renderGlassCard('Live Auctions', auctionStats?.liveAuctionCount, , 0)} + {renderGlassCard('Purchased', auctionStats?.myAuctionCount, , 1)} + {renderGlassCard('Participated', auctionStats?.currentBiddingCount, , 2)} + {renderGlassCard('Cancelled', auctionStats?.cancelledAuctionCount, , 3)} + + + + {/* Tender Section */} + + + Tenders + navigation.navigate(NavigationString.Tender)}> + Explore + + + + + + {renderGlassCard('Total Tenders', tenderStats[0]?.totalTender, , 4)} + {renderGlassCard('Purchased', tenderStats[0]?.totalPurchased, , 5)} + {renderGlassCard('Participated', tenderStats[0]?.totalParticipate, , 6)} + + + + + )} + + {/* Recent Activity */} - Recent Activity - - No recent activity + Recent Activity + + + + + + No recent activity + Your latest bids will appear here + @@ -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, }, }); diff --git a/src/Screens/Home/KycWebViewScreen.tsx b/src/Screens/Home/KycWebViewScreen.tsx index 41b75c8..f88e846 100644 --- a/src/Screens/Home/KycWebViewScreen.tsx +++ b/src/Screens/Home/KycWebViewScreen.tsx @@ -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 ?? "

No content

", - 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); }} diff --git a/src/Screens/Login/Login.tsx b/src/Screens/Login/Login.tsx index 14b62ea..8f8678f 100644 --- a/src/Screens/Login/Login.tsx +++ b/src/Screens/Login/Login.tsx @@ -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(); 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(TENDER_LOGIN, { - onSuccess: (res) => handleSuccess(res, 'tender'), - onError: (err) => showErrorAlert(err.message || 'Login failed') - }); - - const auctionLoginMutation = useCreate(LOG_IN_URL, { - onSuccess: (res) => handleSuccess(res, 'auction'), + const loginMutation = useCreate(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 ( - + {icon} { }; + return ( { entering={FadeInDown.duration(1000).springify()} style={styles.mainContent} > - - - + + + {CAROUSEL_TEXTS[activeSlide].title} + {CAROUSEL_TEXTS[activeSlide].subtitle} + + + {CAROUSEL_TEXTS.map((_, i) => ( + + ))} + + { - {/* TOGGLE */} - - {['tender', 'auction'].map((type) => ( - setActiveType(type as 'tender' | 'auction')} - style={[ - styles.toggleButton, - activeType === type && [styles.toggleButtonActive] - ]} - > - {activeType === type && ( - - - - )} - - {type.toUpperCase()} - - - ))} + + Welcome Back + Sign in to your account - { secureTextEntry={!passwordVisible} rightIcon={passwordVisible ? : } onRightIconPress={() => setPasswordVisible(!passwordVisible)} - /> {touched.password && errors.password && {errors.password}} @@ -424,14 +413,19 @@ const Login = () => { handleSubmit()} - style={[styles.loginBtnContainer, { backgroundColor: colors.primary }]} + style={styles.loginBtnContainer} > - - - {isLoading ? 'Wait...' : 'SIGN IN'} - - {!isLoading && } - + + + {isLoading ? 'Wait...' : 'SIGN IN'} + + {!isLoading && } + )} @@ -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, }, }); diff --git a/src/Screens/Profile/ProfileTab.tsx b/src/Screens/Profile/ProfileTab.tsx index f9202f8..c95a67b 100644 --- a/src/Screens/Profile/ProfileTab.tsx +++ b/src/Screens/Profile/ProfileTab.tsx @@ -182,12 +182,7 @@ const ProfileTab: React.FC = () => { const [showDialog, setShowDialog] = useState(false); const [isNavigating, setIsNavigating] = useState(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 */} - + {/* Quick Stats */} @@ -274,18 +269,18 @@ const ProfileTab: React.FC = () => { title="Personal Information" IconComponent={UserCircle} delay={0} - showEdit={!isAuctionUser} + showEdit={true} onEdit={() => setEditModalVisible(true)} > @@ -363,15 +358,13 @@ const ProfileTab: React.FC = () => { - {/* Edit Modal - Only for tender users */} - {!isAuctionUser && ( - setEditModalVisible(false)} - data={data} - onSuccess={refetch} - /> - )} + {/* Edit Modal */} + setEditModalVisible(false)} + data={data} + onSuccess={refetch} + /> {/* Aadhaar Verification Dialog */} { 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'); diff --git a/src/Screens/Tender/ProceedToBidDetail.tsx b/src/Screens/Tender/ProceedToBidDetail.tsx index 35c60cc..2bf82bf 100644 --- a/src/Screens/Tender/ProceedToBidDetail.tsx +++ b/src/Screens/Tender/ProceedToBidDetail.tsx @@ -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); diff --git a/src/Services/ApiCall/ApiUrls.tsx b/src/Services/ApiCall/ApiUrls.tsx index 6c2956d..e518fa2 100644 --- a/src/Services/ApiCall/ApiUrls.tsx +++ b/src/Services/ApiCall/ApiUrls.tsx @@ -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 diff --git a/src/Services/ApiCall/apis.ts b/src/Services/ApiCall/apis.ts index 927c60e..466b2d6 100644 --- a/src/Services/ApiCall/apis.ts +++ b/src/Services/ApiCall/apis.ts @@ -261,6 +261,7 @@ export const fetchMasterData = async (): Promise => { 'get', `${GET_MASTER_DATA}` ); + console.log('data------------------', data) return data; }; export const getDesignation = async (): Promise => {