diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 0ef6108..925d6e8 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -13,6 +13,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme" + android:networkSecurityConfig="@xml/network_security_config" android:supportsRtl="true"> + + + + + + + + \ No newline at end of file diff --git a/app/modules/Auth/components/DocumentUploadScreen.tsx b/app/modules/Auth/components/DocumentUploadScreen.tsx index 502be43..04c18ba 100644 --- a/app/modules/Auth/components/DocumentUploadScreen.tsx +++ b/app/modules/Auth/components/DocumentUploadScreen.tsx @@ -33,7 +33,18 @@ import { Colors, Spacing, Typography } from "../../../../shared/src/theme" import { showError, showSuccess } from "../../../../shared/src/utils/helpers/Toast" import Icon from "react-native-vector-icons/Feather" import OnboardingContainer from "./OnboardingContainer" +import IconContainer from "./IconContainer" +import { HospitalUploadSVG } from "../../../../shared/src/components/Icons/SvgIcons" +interface SignUpData { + email: string + password: string + first_name: string + last_name: string + username:string + id_photo_url: {} + hospital_id: string +} interface DocumentUploadScreenProps { onContinue: (imageData: { uri: string @@ -42,6 +53,7 @@ interface DocumentUploadScreenProps { size?: number }) => void onBack: () => void + Data:SignUpData } interface ImageData { @@ -51,8 +63,8 @@ interface ImageData { size?: number } -const DocumentUploadScreen: React.FC = ({ onContinue, onBack }) => { - const [selectedImage, setSelectedImage] = useState(null) +const DocumentUploadScreen: React.FC = ({ onContinue, onBack ,Data }) => { + const [selectedImage, setSelectedImage] = useState(Data.id_photo_url) const [loading, setLoading] = useState(false) // Request camera permission for Android @@ -206,11 +218,7 @@ const DocumentUploadScreen: React.FC = ({ onContinue, - - - - - + } /> Upload Image Please upload your profile picture or identification image. diff --git a/app/modules/Auth/components/EmailAlreadyRegisteredModal.tsx b/app/modules/Auth/components/EmailAlreadyRegisteredModal.tsx new file mode 100644 index 0000000..bea25b3 --- /dev/null +++ b/app/modules/Auth/components/EmailAlreadyRegisteredModal.tsx @@ -0,0 +1,148 @@ +/* + * File: EmailAlreadyRegisteredModal.tsx + * Description: Modal popup for when email is already registered + * Design & Developed by Tech4Biz Solutions + * Copyright (c) Spurrin Innovations. All rights reserved. + */ + +import React from 'react' +import { + Modal, + View, + Text, + TouchableOpacity, + StyleSheet, + Dimensions, +} from 'react-native' +import { Colors } from '../../../../shared/src/theme' + +interface EmailAlreadyRegisteredModalProps { + visible: boolean + onClose: () => void + onGoToLogin: () => void +} + +const { width } = Dimensions.get('window') + +const EmailAlreadyRegisteredModal: React.FC = ({ + visible, + onClose, + onGoToLogin, +}) => { + return ( + + + + + Email Already Registered + + Your email is already registered. The login credentials have been sent to your email—please check your inbox to proceed. + + + + + Cancel + + + + Go to Login + + + + + + + ) +} + +const styles = StyleSheet.create({ + overlay: { + flex: 1, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + justifyContent: 'center', + alignItems: 'center', + }, + modalContainer: { + width: width * 0.85, + backgroundColor: Colors.background || '#FFFFFF', + borderRadius: 12, + elevation: 5, + shadowColor: '#000', + shadowOffset: { + width: 0, + height: 2, + }, + shadowOpacity: 0.25, + shadowRadius: 3.84, + }, + content: { + padding: 24, + }, + title: { + fontSize: 20, + fontWeight: 'bold', + color: '#333333', + textAlign: 'center', + marginBottom: 16, + }, + message: { + fontSize: 16, + color: Colors.textSecondary || '#666666', + textAlign: 'center', + lineHeight: 24, + marginBottom: 24, + }, + buttonContainer: { + flexDirection: 'row', + justifyContent: 'space-between', + gap: 12, + }, + button: { + flex: 1, + paddingVertical: 12, + paddingHorizontal: 16, + borderRadius: 8, + alignItems: 'center', + justifyContent: 'center', + minHeight: 48, + }, + primaryButton: { + backgroundColor: Colors.primary || '#007AFF', + }, + secondaryButton: { + backgroundColor: 'transparent', + borderWidth: 1, + borderColor: Colors.border || '#E0E0E0', + }, + primaryButtonText: { + color: '#FFFFFF', + fontSize: 16, + fontWeight: '600', + }, + secondaryButtonText: { + color: '#333333', + fontSize: 16, + fontWeight: '600', + }, +}) + +export default EmailAlreadyRegisteredModal + +/* + * End of File: EmailAlreadyRegisteredModal.tsx + * Design & Developed by Tech4Biz Solutions + * Copyright (c) Spurrin Innovations. All rights reserved. + */ \ No newline at end of file diff --git a/app/modules/Auth/components/EmailScreen.tsx b/app/modules/Auth/components/EmailScreen.tsx index 0ce5b28..f69d6c2 100644 --- a/app/modules/Auth/components/EmailScreen.tsx +++ b/app/modules/Auth/components/EmailScreen.tsx @@ -17,14 +17,27 @@ import { Colors, Spacing, Typography } from "../../../../shared/src/theme" import { showError } from "../../../../shared/src/utils/helpers/Toast" import { validateEmail } from "../../../../shared/src/utils/validation/validators" import Icon from "react-native-vector-icons/Feather" +import { EmailIconSVG } from "../../../../shared/src/components/Icons/SvgIcons" +interface SignUpDataInterface { + email: string + password: string + first_name: string + last_name: string + username:string + id_photo_url: {} + hospital_id: string +} interface EmailScreenProps { onContinue: (email: string) => void onBack: () => void + Data:SignUpDataInterface } -const EmailScreen: React.FC = ({ onContinue, onBack }) => { - const [email, setEmail] = useState("") + +const EmailScreen: React.FC = ({ onContinue, onBack, Data }) => { + console.log('signupData',Data) + const [email, setEmail] = useState(Data.email) const [loading, setLoading] = useState(false) const handleContinue = () => { @@ -40,13 +53,14 @@ const EmailScreen: React.FC = ({ onContinue, onBack }) => { setLoading(true) setTimeout(() => { setLoading(false) - onContinue(email) - }, 1000) + + }, 2000) + onContinue(email) } return ( - + } /> What's your email? Please enter your email address. @@ -88,20 +102,20 @@ const styles = StyleSheet.create({ flexDirection: "row", alignItems: "center", backgroundColor: Colors.inputBackground, - borderWidth: 1, borderColor: Colors.border, + borderWidth:1, borderRadius: 12, marginBottom: Spacing.xl, paddingHorizontal: Spacing.md, paddingVertical: 2, shadowColor: Colors.backButtonShadow, - shadowOffset: { - width: 0, - height: 1, - }, - shadowOpacity: 0.05, - shadowRadius: 2, - elevation: 1, + // shadowOffset: { + // width: 0, + // height: 1, + // }, + // shadowOpacity: 0.05, + // shadowRadius: 2, + // elevation: 1, }, inputIcon: { marginRight: Spacing.sm, diff --git a/app/modules/Auth/components/HospitalSelectionScreen.tsx b/app/modules/Auth/components/HospitalSelectionScreen.tsx index b5fa7c6..d7c56f6 100644 --- a/app/modules/Auth/components/HospitalSelectionScreen.tsx +++ b/app/modules/Auth/components/HospitalSelectionScreen.tsx @@ -18,10 +18,21 @@ import Icon from "react-native-vector-icons/Feather" import OnboardingContainer from "./OnboardingContainer" import { selectHospitals } from "../redux" import { useSelector } from "react-redux" - +import IconContainer from "./IconContainer" +import { HospitalSVG } from "../../../../shared/src/components/Icons/SvgIcons" +interface SignUpData { + email: string + password: string + first_name: string + last_name: string + username:string + id_photo_url: {}|null + hospital_id: string +} interface HospitalSelectionScreenProps { onContinue: (hospitalId: string) => void onBack: () => void + Data: SignUpData } const hospitalData = [ @@ -35,8 +46,8 @@ const hospitalData = [ { label: "Veterans Medical Center", value: "veterans" }, ] -const HospitalSelectionScreen: React.FC = ({ onContinue, onBack }) => { - const [selectedHospital, setSelectedHospital] = useState(null) +const HospitalSelectionScreen: React.FC = ({ onContinue, onBack ,Data}) => { + const [selectedHospital, setSelectedHospital] = useState(Data.hospital_id) const [loading, setLoading] = useState(false) const [isFocus, setIsFocus] = useState(false) const hospitals :any=useSelector(selectHospitals) @@ -51,7 +62,7 @@ const HospitalSelectionScreen: React.FC = ({ onCon setTimeout(() => { setLoading(false) onContinue(selectedHospital) - }, 1000) + }, 6000) } const renderLabel = () => { @@ -70,11 +81,7 @@ const HospitalSelectionScreen: React.FC = ({ onCon */} - - - - - + } /> Select Hospital Choose the hospital you're affiliated with. diff --git a/app/modules/Auth/components/IconContainer.tsx b/app/modules/Auth/components/IconContainer.tsx index 02f886b..fb09b4b 100644 --- a/app/modules/Auth/components/IconContainer.tsx +++ b/app/modules/Auth/components/IconContainer.tsx @@ -13,7 +13,7 @@ import Icon from "react-native-vector-icons/Feather" import { Colors, Spacing } from "../../../../shared/src/theme" interface IconContainerProps { - iconName: string + Icon: any; iconSize?: number containerSize?: number backgroundColor?: string @@ -21,7 +21,7 @@ interface IconContainerProps { } const IconContainer: React.FC = ({ - iconName, + Icon, iconSize = 32, containerSize = 80, backgroundColor = Colors.inputBackground, @@ -29,7 +29,7 @@ const IconContainer: React.FC = ({ }) => { return ( - = ({ backgroundColor, }, ]} - > - - + > */} + {} + {/* */} ) } diff --git a/app/modules/Auth/components/NameScreen.tsx b/app/modules/Auth/components/NameScreen.tsx index 2856a00..d98ac85 100644 --- a/app/modules/Auth/components/NameScreen.tsx +++ b/app/modules/Auth/components/NameScreen.tsx @@ -16,16 +16,27 @@ import IconContainer from "./IconContainer" import { Colors, Spacing, Typography } from "../../../../shared/src/theme" import { showError } from "../../../../shared/src/utils/helpers/Toast" import Icon from "react-native-vector-icons/Feather" +import { UsernameIconSVG } from "../../../../shared/src/components/Icons/SvgIcons" +interface SignUpData { + email: string + password: string + first_name: string + last_name: string + username:string + id_photo_url: {} + hospital_id: string +} interface NameScreenProps { onContinue: (firstName: string, lastName: string, username: string) => void onBack: () => void + Data:SignUpData } -const NameScreen: React.FC = ({ onContinue, onBack }) => { - const [firstName, setFirstName] = useState("") - const [lastName, setLastName] = useState("") - const [username, setUsername] = useState("") +const NameScreen: React.FC = ({ onContinue, onBack,Data }) => { + const [firstName, setFirstName] = useState(Data.first_name) + const [lastName, setLastName] = useState(Data.last_name) + const [username, setUsername] = useState(Data.username) const [loading, setLoading] = useState(false) const handleContinue = () => { @@ -60,7 +71,7 @@ const NameScreen: React.FC = ({ onContinue, onBack }) => { return ( - + } /> What's your name? Please enter your details to get started. @@ -132,14 +143,14 @@ const styles = StyleSheet.create({ marginBottom: Spacing.md, paddingHorizontal: Spacing.md, paddingVertical: 2, - shadowColor: Colors.backButtonShadow, - shadowOffset: { - width: 0, - height: 1, - }, - shadowOpacity: 0.05, - shadowRadius: 2, - elevation: 1, + // shadowColor: Colors.backButtonShadow, + // shadowOffset: { + // width: 0, + // height: 1, + // }, + // shadowOpacity: 0.05, + // shadowRadius: 2, + // elevation: 1, }, inputIcon: { marginRight: Spacing.sm, diff --git a/app/modules/Auth/components/OnboardingContainer.tsx b/app/modules/Auth/components/OnboardingContainer.tsx index 2e15b91..21c012b 100644 --- a/app/modules/Auth/components/OnboardingContainer.tsx +++ b/app/modules/Auth/components/OnboardingContainer.tsx @@ -8,10 +8,11 @@ */ import type React from "react" -import { View, StyleSheet, TouchableWithoutFeedback, Keyboard } from "react-native" +import { View, StyleSheet, TouchableWithoutFeedback, Keyboard, ScrollView } from "react-native" import LinearGradient from "react-native-linear-gradient" import { Colors, Spacing } from "../../../../shared/src/theme" import BackButton from "./BackButton" +import AngledGradient from "../../../../shared/src/components/Gradient/AngledGradient" interface OnboardingContainerProps { children: React.ReactNode @@ -21,20 +22,17 @@ interface OnboardingContainerProps { const OnboardingContainer: React.FC = ({ children, onBack, showBackButton = true }) => { return ( - - + + {showBackButton && ( )} + {children} - + + ) } @@ -51,7 +49,7 @@ const styles = StyleSheet.create({ content: { flex: 1, paddingHorizontal: Spacing.lg, - justifyContent: "center", + justifyContent: 'center', }, }) diff --git a/app/modules/Auth/components/PasswordScreen.tsx b/app/modules/Auth/components/PasswordScreen.tsx index f74af0e..e5ea341 100644 --- a/app/modules/Auth/components/PasswordScreen.tsx +++ b/app/modules/Auth/components/PasswordScreen.tsx @@ -16,14 +16,25 @@ import IconContainer from "./IconContainer" import { Colors, Spacing, Typography } from "../../../../shared/src/theme" import { showError } from "../../../../shared/src/utils/helpers/Toast" import Icon from "react-native-vector-icons/Feather" +import { PasswordIconSVG } from "../../../../shared/src/components/Icons/SvgIcons" +interface SignUpData { + email: string + password: string + first_name: string + last_name: string + username:string + id_photo_url: {} + hospital_id: string +} interface PasswordScreenProps { onContinue: (password: string) => void onBack: () => void + Data:SignUpData } -const PasswordScreen: React.FC = ({ onContinue, onBack }) => { - const [password, setPassword] = useState("") +const PasswordScreen: React.FC = ({ onContinue, onBack ,Data}) => { + const [password, setPassword] = useState(Data.password) const [confirmPassword, setConfirmPassword] = useState("") const [isPasswordVisible, setPasswordVisible] = useState(false) const [isConfirmPasswordVisible, setConfirmPasswordVisible] = useState(false) @@ -58,7 +69,7 @@ const PasswordScreen: React.FC = ({ onContinue, onBack }) = return ( - + } /> Create a password Password must be at least 8 characters @@ -123,14 +134,14 @@ const styles = StyleSheet.create({ marginBottom: Spacing.md, paddingHorizontal: Spacing.md, paddingVertical: 2, - shadowColor: Colors.backButtonShadow, - shadowOffset: { - width: 0, - height: 1, - }, - shadowOpacity: 0.05, - shadowRadius: 2, - elevation: 1, + // shadowColor: Colors.backButtonShadow, + // shadowOffset: { + // width: 0, + // height: 1, + // }, + // shadowOpacity: 0.05, + // shadowRadius: 2, + // elevation: 1, }, inputIcon: { marginRight: Spacing.sm, @@ -142,7 +153,7 @@ const styles = StyleSheet.create({ color: Colors.textPrimary, }, eyeIcon: { - paddingLeft: Spacing.sm, + padding: Spacing.sm, }, button: { marginTop: Spacing.xl, diff --git a/app/modules/Auth/navigation/AuthNavigator.tsx b/app/modules/Auth/navigation/AuthNavigator.tsx index 0758958..992bb13 100644 --- a/app/modules/Auth/navigation/AuthNavigator.tsx +++ b/app/modules/Auth/navigation/AuthNavigator.tsx @@ -10,11 +10,13 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { LoginScreen, SetupBiometricScreen } from '../screens'; import { Colors } from '../../../../shared/src/theme'; import SignUpScreen from '../screens/SignUpScreen'; +import ResetPasswordScreen from '../screens/ResetPasswordScreen'; export type AuthStackParamList = { Login: undefined; SetupBiometric: undefined; SignUpScreen:undefined; + ResetPassword:undefined; }; const Stack = createNativeStackNavigator(); @@ -45,6 +47,11 @@ const AuthNavigator: React.FC = () => ( name="SignUpScreen" component={SignUpScreen} options={{ title: 'Setup Biometric' ,headerShown:false}} + /> + ); diff --git a/app/modules/Auth/redux/authSlice.ts b/app/modules/Auth/redux/authSlice.ts index 4a3f0d7..da11564 100644 --- a/app/modules/Auth/redux/authSlice.ts +++ b/app/modules/Auth/redux/authSlice.ts @@ -89,6 +89,9 @@ const authSlice = createSlice({ state.user = null; state.isAuthenticated = false; }, + updateOnboarded(state,action) { + state.user.onboarded = action.payload; + } }, }); @@ -97,6 +100,7 @@ export const { loginSuccess, loginFailure, logout, + updateOnboarded } = authSlice.actions; export default authSlice.reducer; diff --git a/app/modules/Auth/redux/hospitalSlice.ts b/app/modules/Auth/redux/hospitalSlice.ts index 832295e..1918e90 100644 --- a/app/modules/Auth/redux/hospitalSlice.ts +++ b/app/modules/Auth/redux/hospitalSlice.ts @@ -22,7 +22,7 @@ interface HospitalState { } const initialState: HospitalState = { - hospitals: null, + hospitals: [], loading: false, error: null, }; diff --git a/app/modules/Auth/screens/LoginScreen.tsx b/app/modules/Auth/screens/LoginScreen.tsx index e5f8abb..239f063 100644 --- a/app/modules/Auth/screens/LoginScreen.tsx +++ b/app/modules/Auth/screens/LoginScreen.tsx @@ -13,7 +13,8 @@ import { TouchableWithoutFeedback, Keyboard, TouchableOpacity, - TextInput, // Using default TextInput for container styling + TextInput, + ScrollView, // Using default TextInput for container styling } from 'react-native'; import { Button } from '../../../../shared/src/components/Button'; import { Colors, Spacing, Typography } from '../../../../shared/src/theme'; @@ -23,6 +24,8 @@ import { showError } from '../../../../shared/src/utils/helpers/Toast'; import { validateEmail } from '../../../../shared/src/utils/validation/validators'; import Icon from 'react-native-vector-icons/Feather'; import { useNavigation } from '@react-navigation/native'; +import AngledGradient from '../../../../shared/src/components/Gradient/AngledGradient'; +import { LoginSVG, SecureLoginSVG } from '../../../../shared/src/components/Icons/SvgIcons'; const LoginScreen: React.FC = () => { const [email, setEmail] = useState(''); @@ -48,12 +51,17 @@ const LoginScreen: React.FC = () => { // Simulate a network request for 4 seconds setTimeout(() => { setLoading(false); // Stop loading after 4 seconds - }, 4000); + }, 6000); }; return ( + + + + + Radiologist {/* Email Input */} @@ -103,14 +111,16 @@ const LoginScreen: React.FC = () => { /> + + ); }; const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: Colors.background, + // backgroundColor: Colors.background, justifyContent: 'center', padding: Spacing.lg, }, diff --git a/app/modules/Auth/screens/ResetPasswordScreen.tsx b/app/modules/Auth/screens/ResetPasswordScreen.tsx new file mode 100644 index 0000000..f4b329c --- /dev/null +++ b/app/modules/Auth/screens/ResetPasswordScreen.tsx @@ -0,0 +1,336 @@ +"use client" + +/* + * File: ResetPasswordScreen.tsx + * Description: Password reset screen with gradient background and shared components. + * Design & Developed by Tech4Biz Solutions + * Copyright (c) Spurrin Innovations. All rights reserved. + */ + +import type React from "react" +import { useState, useEffect } from "react" +import { View, Text, StyleSheet, TextInput, TouchableOpacity } from "react-native" +import { Button } from "../../../../shared/src/components/Button" +import OnboardingContainer from "../components/OnboardingContainer" +import IconContainer from "../components/IconContainer" +import { Colors, Spacing, Typography } from "../../../../shared/src/theme" +import { showError, showSuccess } from "../../../../shared/src/utils/helpers/Toast" +import Icon from "react-native-vector-icons/Feather" +import { PasswordIconSVG } from "../../../../shared/src/components/Icons/SvgIcons" +import { authAPI } from "../services/authAPI" +import { useDispatch, useSelector } from "react-redux" +import { selectUser } from "../redux" +import { updateOnboarded } from "../redux/authSlice" + +interface PasswordScreenProps { + onContinue: (password: string) => void + onBack: () => void +} + +interface PasswordRule { + id: string + label: string + validator: (password: string) => boolean + isValid: boolean +} + +const ResetPasswordScreen: React.FC = () => { + const [password, setPassword] = useState("") + const [confirmPassword, setConfirmPassword] = useState("") + const [isPasswordVisible, setPasswordVisible] = useState(false) + const [isConfirmPasswordVisible, setConfirmPasswordVisible] = useState(false) + const [loading, setLoading] = useState(false); + const user=useSelector(selectUser); + const dispatch=useDispatch() + + const [passwordRules, setPasswordRules] = useState([ + { + id: 'length', + label: 'At least 8 characters', + validator: (pwd: string) => pwd.length >= 8, + isValid: false + }, + { + id: 'uppercase', + label: 'One uppercase letter', + validator: (pwd: string) => /[A-Z]/.test(pwd), + isValid: false + }, + { + id: 'lowercase', + label: 'One lowercase letter', + validator: (pwd: string) => /[a-z]/.test(pwd), + isValid: false + }, + { + id: 'number', + label: 'One number', + validator: (pwd: string) => /\d/.test(pwd), + isValid: false + }, + { + id: 'special', + label: 'One special character', + validator: (pwd: string) => /[!@#$%^&*(),.?":{}|<>]/.test(pwd), + isValid: false + }, + { + id: 'match', + label: 'Passwords match', + validator: (pwd:string) => {if(pwd.length > 0 && confirmPassword.length > 0 && pwd === confirmPassword){ + return true + }else{ + return false + } + }, // This will be handled separately + isValid: false + } + ]) +console.log('password rules',passwordRules) + const validatePassword = (pwd: string): boolean => { + return passwordRules.every(rule => rule.isValid) + } + + const updatePasswordRules = (pwd: string) => { + setPasswordRules(prevRules => + prevRules.map(rule => { + if (rule.id === 'match') { + return { + ...rule, + isValid: pwd.length > 0 && confirmPassword.length > 0 && pwd === confirmPassword + } + } + return { + ...rule, + isValid: rule.validator(pwd) + } + }) + ) + } + + const updatePasswordMatchRule = () => { + setPasswordRules(prevRules => + prevRules.map(rule => { + // if (rule.id === 'match') { + // return { + // ...rule, + // isValid: password.length > 0 && confirmPassword.length > 0 && password === confirmPassword + // } + // } + return rule + }) + ) + } + + useEffect(() => { + updatePasswordRules(password) + }, [password,confirmPassword]) + + // useEffect(() => { + // updatePasswordMatchRule() + // }, [password, confirmPassword]) + + const handlePasswordChange = (pwd: string) => { + setPassword(pwd) + } + + const handleConfirmPasswordChange = (pwd: string) => { + setConfirmPassword(pwd) + } + + const handleContinue = () => { + if (!password.trim() || !confirmPassword.trim()) { + showError("Validation Error", "Both password fields are required.") + return + } +console.log('Validation',validatePassword(password)) + if (!validatePassword(password)) { + showError("Validation Error", "Please meet all password requirements.") + return + } + + if (password !== confirmPassword) { + showError("Validation Error", "Passwords do not match.") + return + } + + setLoading(true) + setTimeout(() => { + setLoading(false) + onReset(password) + }, 1000) + } + + const onBack=()=>{} + const onReset=async (password:string)=>{ + const response :any=await authAPI.changepassword({password,token:user?.access_token}); + console.log('reset response',response); + if(response.data&&response.data.message){ + if(response.data.success){ + showSuccess(response.data.message); + dispatch(updateOnboarded(true)) + }else{ + showError(response.data.message) + } + + }else{ + showError('eeror while changing password') + } + } + + const renderPasswordRule = (rule: PasswordRule) => ( + + + {rule.isValid && ( + + )} + + + {rule.label} + + + ) + + return ( + + } /> + + Reset your password + Create a strong password with the following requirements + + + + + setPasswordVisible(!isPasswordVisible)} style={styles.eyeIcon}> + + + + + + + + setConfirmPasswordVisible(!isConfirmPasswordVisible)} style={styles.eyeIcon}> + + + + + {/* Password Rules Section */} + + Password Requirements: + + {passwordRules.map(renderPasswordRule)} + + + +