Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions HEX-DEV/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
5 changes: 4 additions & 1 deletion HEX-DEV/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const [fontsLoaded, fontError] = useFonts({
<View style={styles.container}>
<SignedIn>
<CheckNavigation/>
{/* <NavigationContainer>
<TabNavigation/>
</NavigationContainer> */}
</SignedIn>
<SignedOut>
<AppNavigation/>
Expand All @@ -72,7 +75,7 @@ const [fontsLoaded, fontError] = useFonts({
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
backgroundColor: '#FFFFFF',
paddingTop: 40,
},
});
191 changes: 191 additions & 0 deletions HEX-DEV/App/Screens/Admin/Verification.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
import { useNavigation, useRoute } from '@react-navigation/native';
import React, { useState } from 'react';
import { View, Text, Image, StyleSheet, ScrollView, TouchableOpacity, Modal } from 'react-native';

const Verification = () => {
const navigation=useNavigation()
const route=useRoute()
const item=route.params?.item
const [selectedImage, setSelectedImage] = useState(null);
const [modalVisible, setModalVisible] = useState(false);

const companyName = item?.name;
const ownerName = item?.owner;
const selected = item?.category[0]?.name;
const phoneNumber = item?.contact;
const aadharNumber = item?.aadharNumber;
const gstNumber = item?.panNumber;
const aadharImage =item?.aadharImageUrl;

const gstImage =item?.gstImageUrl;

const serviceLocation = item?.address;
const photoUri =item?.userPhotoUrl


const handleImageClick = (imageUri) => {
setSelectedImage(imageUri);
setModalVisible(true);
};

const handleModalClose = () => {
setSelectedImage(null);
setModalVisible(false);
};

const renderField = (label, value) => (
<>
<Text style={styles.label}>{label}:</Text>
<Text style={styles.value}>{value}</Text>
</>
);

const renderImage = (uri) => (
<TouchableOpacity onPress={() => handleImageClick(uri)}>
<Image source={{ uri }} style={styles.thumbnailImage} resizeMode="cover" />
</TouchableOpacity>
);

const handleAccept = () => {
// Implement your logic for accepting verification
console.log('Verification Accepted');
navigation.goBack()

};

const handleReject = () => {
// Implement your logic for rejecting verification
console.log('Verification Rejected');
navigation.goBack()
};

return (
<View style={styles.container}>
<ScrollView>
<View style={styles.card}>
<Text style={styles.title}>Verification Details</Text>

{renderField('Company Name', companyName)}
{renderField('Owner Name', ownerName)}
{renderField('Category', selected)}
{renderField('Phone Number', phoneNumber)}
{renderField('Owner Aadhar Number', aadharNumber)}
{renderField('GST Number', gstNumber)}
{renderField('Company Location', serviceLocation)}

<Text style={styles.label}>Aadhar Image:</Text>
{renderImage(aadharImage)}

<Text style={styles.label}>GST Image:</Text>
{renderImage(gstImage)}

<Text style={styles.label}>Profile Photo:</Text>
{renderImage(photoUri)}
</View>
</ScrollView>

{/* Modal for displaying enlarged image */}
<Modal visible={modalVisible} transparent={true} onRequestClose={handleModalClose}>
<View style={styles.modalContainer}>
<Image source={{ uri: selectedImage }} style={styles.enlargedImage} resizeMode="contain" />
<TouchableOpacity style={styles.closeButton} onPress={handleModalClose}>
<Text style={styles.closeButtonText}>Close</Text>
</TouchableOpacity>
</View>
</Modal>

{/* Accept and Reject Buttons */}
<View style={styles.buttonContainer}>
<TouchableOpacity style={styles.acceptButton} onPress={handleAccept}>
<Text style={styles.buttonText}>Accept</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.rejectButton} onPress={handleReject}>
<Text style={styles.buttonText}>Reject</Text>
</TouchableOpacity>
</View>
</View>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
padding: 16,
},
card: {
margin: 10,
},
title: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 20,
borderWidth:2,
padding:10,
borderRadius:10,
textAlign: 'center',
},
label: {
fontSize: 16,
marginTop: 10,
fontWeight: 'bold',
},
value: {
fontSize: 18,
marginBottom: 10,
},
thumbnailImage: {
width: '100%',
height: 150,
borderRadius: 8,
marginVertical: 10,
},
modalContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'rgba(0, 0, 0, 0.7)',
},
enlargedImage: {
width: '90%',
height: '70%',
borderRadius: 8,
},
closeButton: {
marginTop: 10,
padding: 10,
backgroundColor: 'blue',
borderRadius: 8,
},
closeButtonText: {
color: 'white',
fontWeight: 'bold',
},
buttonContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
margin: 20,
},
acceptButton: {
flex: 1,
backgroundColor: 'green',
padding: 15,
borderRadius: 8,
marginRight: 10,
alignItems: 'center',
},
rejectButton: {
flex: 1,
backgroundColor: 'red',
padding: 15,
borderRadius: 8,
marginLeft: 10,
alignItems: 'center',
},
buttonText: {
color: 'white',
fontWeight: 'bold',
},
});

export default Verification;
71 changes: 71 additions & 0 deletions HEX-DEV/App/Screens/Admin/admin.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { FlatList, Image, SafeAreaView, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
import React, { useEffect, useState } from 'react'
import GlobalApi from '../../Utils/GlobalApi';
import color from '../../Utils/color';
import { Ionicons } from '@expo/vector-icons';
import { useNavigation } from '@react-navigation/native';


export default function admin() {
const navigation=useNavigation()
const [sellerList,setSellerList]=useState([]);

useEffect(()=>{
getSellerList();
},[]);

const getSellerList=()=>{
GlobalApi.SellerVerification().then(resp=>{
setSellerList(resp.businessLists);
})
}
console.log(sellerList)
return (
<SafeAreaView>
<FlatList
data={sellerList}
keyExtractor={(item, index) => index.toString()}
renderItem={({ item }) => (
<View style={styles.itemContainer}>
<TouchableOpacity style={styles.bookingItem} onPress={()=>navigation.navigate("next_screen",{item})} >
<Image source={{ uri: item.userPhotoUrl }} style={styles.userImage} />
<Text numberOfLines={1} ellipsizeMode='tail' style={styles.userName}>{item.name}</Text>

<Ionicons name="chevron-forward" size={24} color={color.PRIMARY_LIGHT} />
</TouchableOpacity>
</View>
)}
/>
</SafeAreaView>
)
}

const styles = StyleSheet.create({
itemContainer: {
marginTop: 10,
display: 'flex',
gap: 10
},
bookingItem: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
borderWidth: 2,
padding: 6,
borderColor: color.LIGHT_GRAY,
borderRadius: 15
},
userImage: {
height: 40,
width: 40,
borderRadius: 100
},
userName: {
width: 120,
fontFamily: 'outfit'
},
date: {
fontFamily: 'outfit-bold',
color: color.PRIMARY
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect } from 'react';
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert, Button } from 'react-native';
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert, Button,ActivityIndicator } from 'react-native';
import { FirebaseRecaptchaVerifierModal } from 'expo-firebase-recaptcha'
import { useRoute } from "@react-navigation/native"
import { firebaseConfig } from '../../../../firebaseConfig'
Expand Down Expand Up @@ -126,6 +126,7 @@ const VerificationCodePage = ({ navigation }) => {
);
firebase.auth().signInWithCredential(credential)
.then(() => {
setLoading(false);
Alert.alert('OTP verification is Sucesssful.');
navigation.replace('PenddingScreen', { photoUri: photoUri,
companyName: companyName,
Expand All @@ -141,6 +142,7 @@ const VerificationCodePage = ({ navigation }) => {
catId:catId });
})
.catch((error) => {
setLoading(false);
//show an alert in case of error
alert(error);
})
Expand All @@ -159,6 +161,7 @@ const VerificationCodePage = ({ navigation }) => {
/>
<Text style={styles.title}>Verification Code Sent To {phoneNumber}</Text>
<View style={styles.container}>
{loading && <ActivityIndicator size={45} color="#3CB371" style={styles.load} />}
<View style={styles.inputContainer}>
{renderInput(0)}
{renderInput(1)}
Expand Down
49 changes: 45 additions & 4 deletions HEX-DEV/App/Screens/ProfileScreen/component/TermsAndConditions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { View, Text, Button } from 'react-native';
import { View, Text, Button,ScrollView } from 'react-native';
import CheckBox from 'expo-checkbox';
import color from '../../../Utils/color';

Expand All @@ -20,18 +20,57 @@ const TermsAndConditionsPage = ({ navigation }) => {

return (
<View style={{ flex: 1, justifyContent: 'space-between', padding: 20 }}>
<ScrollView>

<View>
<Text style={{ fontSize: 24, marginBottom: 20,fontFamily:'outfit-medium' }}>
Terms & Conditions
</Text>
<Text style={{ fontFamily: 'outfit' }}>
By using this platform as a seller, you agree to abide by our terms and conditions. Please review the terms and conditions carefully before proceeding.
<Text style={{ fontFamily: 'outfit',fontSize:15,margin:3,fontWeight:'bold' }}>
Terms and Conditions for Evehunt
</Text>
<Text style={{ fontFamily: 'outfit',margin:3,fontsize:15 }}>
Welcome to Evehunt! These Terms and Conditions outline the rules and regulations for the use of our application.
By accessing this application, we assume you accept these Terms and Conditions. Do not continue to use Evehunt if you do not agree to take all of the Terms and Conditions stated on this page.
</Text>
<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- Evehunt collects information provided by sellers during registration to facilitate transactions between users and sellers. We ensure the security and confidentiality of all entered information in accordance with our Privacy Policy.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- Images uploaded by sellers are utilized solely for the purpose of creating their profiles on Evehunt. We do not distribute, sell, or use these images for any other purpose without explicit consent from the seller.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- Sellers are responsible for the accuracy and legality of the information they provide on Evehunt. Any misleading or fraudulent information may result in the termination of their account.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- Evehunt serves as a platform for communication and transactions between users and sellers. We do not endorse, guarantee, or take responsibility for the quality, legality, or safety of the products or services offered by sellers.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- All content, including but not limited to text, graphics, logos, images, and software, used on Evehunt is the intellectual property of Evehunt and is protected by copyright laws. Unauthorized use, reproduction, or distribution of any content is strictly prohibited.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- Evehunt, its affiliates, directors, officers, employees, and agents shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or in connection with the use or inability to use Evehunt.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
- Evehunt reserves the right to modify or replace these Terms and Conditions at any time. Continued use of Evehunt after any such changes shall constitute your consent to such changes.
</Text>

<Text style={{ fontFamily: 'outfit',margin:3,fontSize:13 }}>
By using Evehunt, you agree to abide by these Terms and Conditions. If you have any questions or concerns regarding these terms, please contact us at [Your Contact Information].
These Terms and Conditions have been generated with the help of Terms and Conditions Template and should be used as a guideline only.
Evehunt
</Text>

</View>

<View>
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20 }}>
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20 ,marginTop:15}}>
<CheckBox value={isChecked} onValueChange={handleCheckboxChange} />
<Text style={{ marginLeft: 10 ,fontFamily:'outfit'}}>
I accept the T&C
Expand All @@ -41,6 +80,8 @@ const TermsAndConditionsPage = ({ navigation }) => {
<Button title="Next" onPress={handleNextButtonClick} disabled={!isChecked} />
</View>
</View>
</ScrollView>

</View>
);
};
Expand Down
Loading