@@ -2,7 +2,7 @@ | |||||
export const theme_bg_dark = "#0c0a8d"; | export const theme_bg_dark = "#0c0a8d"; | ||||
export const theme_bg = "#0c0a8d"; | export const theme_bg = "#0c0a8d"; | ||||
export const theme_fg = "#0c0a8d"; | export const theme_fg = "#0c0a8d"; | ||||
export const theme_light = "#c9ddf5"; | |||||
export const theme_light = "#"; | |||||
export const theme_fg_two = "#202028"; | export const theme_fg_two = "#202028"; | ||||
export const theme_bg_three = "#FFFFFF"; | export const theme_bg_three = "#FFFFFF"; | ||||
export const theme_fg_three = "#FFFFFF"; | export const theme_fg_three = "#FFFFFF"; | ||||
@@ -61,16 +61,14 @@ class AddressEnter extends Component<Props> { | |||||
super(props); | super(props); | ||||
this.handleBackButtonClick = this.handleBackButtonClick.bind(this); | this.handleBackButtonClick = this.handleBackButtonClick.bind(this); | ||||
this.state = { | this.state = { | ||||
customer_name: "", | |||||
phone_number: "", | |||||
email: "", | |||||
password: "", | |||||
blood_group: "", | |||||
address: "", | |||||
validation: true, | validation: true, | ||||
blood_group_list: [], | blood_group_list: [], | ||||
fcm_token: global.fcm_token, | fcm_token: global.fcm_token, | ||||
country: "", | country: "", | ||||
region: "", | |||||
// region: "", | |||||
latitude: "", | latitude: "", | ||||
longitude: "", | longitude: "", | ||||
coords: "", | coords: "", | ||||
@@ -125,40 +123,41 @@ class AddressEnter extends Component<Props> { | |||||
handleUserNavigation = async () => { | handleUserNavigation = async () => { | ||||
Geolocation.getCurrentPosition((info) => { | |||||
this.setState({ | |||||
latitude: info.coords.latitude, | |||||
longitude: info.coords.longitude, | |||||
coords: info.coords, | |||||
}); | |||||
console.log(info); | |||||
try{ | |||||
await Geolocation.getCurrentPosition((info) => { | |||||
this.setState({ | |||||
latitude: info.coords.latitude, | |||||
longitude: info.coords.longitude, | |||||
coords: info.coords, | |||||
}); | }); | ||||
console.log(info); | |||||
})} | |||||
catch(error){alert(error)} | |||||
} | } | ||||
register = async () => { | register = async () => { | ||||
this.handleUserNavigation(); | this.handleUserNavigation(); | ||||
// Keyboard.dismiss(); | |||||
Keyboard.dismiss(); | |||||
// await this.checkValidate(); | // await this.checkValidate(); | ||||
// if (this.state.validation) | // if (this.state.validation) | ||||
// this.props.serviceActionPending(); | // this.props.serviceActionPending(); | ||||
let countries = Country.getAllCountries(); | |||||
console.log(countries[0].name); | |||||
// let countries = Country.getAllCountries(); | |||||
// console.log(countries[0].name); | |||||
await axios | await axios | ||||
.post( | .post( | ||||
`${api_url1}/clients/address/add`, | `${api_url1}/clients/address/add`, | ||||
{ | { | ||||
addressLine1: this.state.customer_name, | |||||
addressLine2: '', | |||||
addressLine1: this.state.address, | |||||
pincode: this.state.pincode, | pincode: this.state.pincode, | ||||
city: this.state.city, | city: this.state.city, | ||||
state: this.state.State, | state: this.state.State, | ||||
country: this.state.country, | country: this.state.country, | ||||
latitude: this.state.latitude, | |||||
latitude:this.state.latitude, | |||||
longitude: this.state.longitude, | longitude: this.state.longitude, | ||||
}, | }, | ||||
{ headers: { Authorization: `Bearer ${global.fcm_token}` } } | { headers: { Authorization: `Bearer ${global.fcm_token}` } } | ||||
@@ -214,21 +213,23 @@ class AddressEnter extends Component<Props> { | |||||
} | } | ||||
}; | }; | ||||
checkValidate() { | |||||
if ( | |||||
this.state.email == "" || | |||||
this.state.phone_number == "" || | |||||
this.state.password == "" || | |||||
// this.state.blood_group == "" || | |||||
this.state.customer_name == "" | |||||
checkValidate=()=> { | |||||
if( | |||||
this.state.address == "" || | |||||
this.state.pincode == "" || | |||||
this.state.city == "" || | |||||
this.state.country == "" || | |||||
this.state.State == "" || | |||||
this.state.latitude == "" || | |||||
this.state.longitude=="" | |||||
) { | ) { | ||||
this.state.validation = false; | |||||
this.showSnackbar("Please fill all the fields."); | |||||
return true; | |||||
// this.state.validation = false; | |||||
alert("Please fill all the fields."); | |||||
// return true; | |||||
} else { | } else { | ||||
this.state.validation = true; | |||||
return true; | |||||
} | |||||
// this.state.validation = true; | |||||
// return true; | |||||
this.register(); } | |||||
} | } | ||||
select_blood_group = (value) => { | select_blood_group = (value) => { | ||||
@@ -309,7 +310,7 @@ class AddressEnter extends Component<Props> { | |||||
<Image style={{ width: 22, height: 22 }} source={person} /> | <Image style={{ width: 22, height: 22 }} source={person} /> | ||||
} | } | ||||
onChangeText={(TextInputValue) => | onChangeText={(TextInputValue) => | ||||
this.setState({ customer_name: TextInputValue }) | |||||
this.setState({ address: TextInputValue }) | |||||
} | } | ||||
/> | /> | ||||
</View> | </View> | ||||
@@ -335,7 +336,7 @@ class AddressEnter extends Component<Props> { | |||||
// } | // } | ||||
keyboardType="phone-pad" | keyboardType="phone-pad" | ||||
onChangeText={(TextInputValue) => | onChangeText={(TextInputValue) => | ||||
this.setState({ phone_number: TextInputValue }) | |||||
this.setState({ pincode: TextInputValue }) | |||||
} | } | ||||
/> | /> | ||||
</View> | </View> | ||||
@@ -363,7 +364,7 @@ class AddressEnter extends Component<Props> { | |||||
// } | // } | ||||
keyboardType="email-address" | keyboardType="email-address" | ||||
onChangeText={(TextInputValue) => | onChangeText={(TextInputValue) => | ||||
this.setState({ email: TextInputValue }) | |||||
this.setState({ city: TextInputValue }) | |||||
} | } | ||||
/> | /> | ||||
</View> | </View> | ||||
@@ -392,7 +393,7 @@ class AddressEnter extends Component<Props> { | |||||
// } | // } | ||||
// secureTextEntry={true} | // secureTextEntry={true} | ||||
onChangeText={(TextInputValue) => | onChangeText={(TextInputValue) => | ||||
this.setState({ password: TextInputValue }) | |||||
this.setState({ State: TextInputValue }) | |||||
} | } | ||||
/> | /> | ||||
</View> | </View> | ||||
@@ -417,7 +418,9 @@ class AddressEnter extends Component<Props> { | |||||
} | } | ||||
/> | /> | ||||
</View> | </View> | ||||
<Text> | |||||
{/* {this.state.country} */} | |||||
</Text> | |||||
<Text | <Text | ||||
style={styles.reg_style13} | style={styles.reg_style13} | ||||
> | > | ||||
@@ -444,7 +447,7 @@ class AddressEnter extends Component<Props> { | |||||
</View> */} | </View> */} | ||||
<View style={styles.reg_style30} /> | <View style={styles.reg_style30} /> | ||||
<View style={styles.reg_style31}> | <View style={styles.reg_style31}> | ||||
<Button block style={styles.reg_style32} onPress={this.register}> | |||||
<Button block style={styles.reg_style32} onPress={this.checkValidate}> | |||||
<Text style={styles.reg_style33}>SUBMIT</Text> | <Text style={styles.reg_style33}>SUBMIT</Text> | ||||
</Button> | </Button> | ||||
</View> | </View> | ||||
@@ -2,6 +2,7 @@ import React, {Component} from 'react'; | |||||
import { StyleSheet, Text, Image, View, TouchableOpacity } from 'react-native'; | import { StyleSheet, Text, Image, View, TouchableOpacity } from 'react-native'; | ||||
import { Content, Container, Header, Body, Title, Left, Row, Icon, Right, Button as Btn, Card } from 'native-base'; | import { Content, Container, Header, Body, Title, Left, Row, Icon, Right, Button as Btn, Card } from 'native-base'; | ||||
import * as colors from '../assets/css/Colors'; | import * as colors from '../assets/css/Colors'; | ||||
import back from "../assets/icons/back1.png"; | |||||
import { logo_with_name, font_title, font_description } from '../config/Constants'; | import { logo_with_name, font_title, font_description } from '../config/Constants'; | ||||
import { StatusBar } from '../components/GeneralComponents'; | import { StatusBar } from '../components/GeneralComponents'; | ||||
import { Button, Divider } from 'react-native-elements'; | import { Button, Divider } from 'react-native-elements'; | ||||
@@ -28,7 +29,15 @@ class ContactUs extends Component<Props> { | |||||
<View> | <View> | ||||
<View style={styles.con_style1}> | <View style={styles.con_style1}> | ||||
<TouchableOpacity style={styles.con_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | <TouchableOpacity style={styles.con_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | ||||
<Icon onPress={this.handleBackButtonClick} style={styles.con_style3} name='arrow-back' /> | |||||
<Image | |||||
style={{ | |||||
width: 20, | |||||
height: 20, | |||||
backgroundColor: "white", | |||||
marginVertical: 12, | |||||
}} | |||||
source={back} | |||||
/> | |||||
</TouchableOpacity> | </TouchableOpacity> | ||||
<View style={styles.con_style4} /> | <View style={styles.con_style4} /> | ||||
<Text style={styles.con_style5}>Contact Us</Text> | <Text style={styles.con_style5}>Contact Us</Text> | ||||
@@ -1,5 +1,5 @@ | |||||
import React, {Component} from 'react'; | import React, {Component} from 'react'; | ||||
import { StyleSheet, TouchableOpacity, Text,FlatList } from 'react-native'; | |||||
import { StyleSheet, TouchableOpacity, Text,FlatList,Image } from 'react-native'; | |||||
import { Container, Header, Content, List, ListItem, Left, Body, Right, Title, Button, Icon, Row,Col,Card, CardItem, Footer, View } from 'native-base'; | import { Container, Header, Content, List, ListItem, Left, Body, Right, Title, Button, Icon, Row,Col,Card, CardItem, Footer, View } from 'native-base'; | ||||
import { api_url, faq, font_title, font_description } from '../config/Constants'; | import { api_url, faq, font_title, font_description } from '../config/Constants'; | ||||
import Accordian from '../config/Accordian'; | import Accordian from '../config/Accordian'; | ||||
@@ -8,6 +8,7 @@ import { Loader } from '../components/GeneralComponents'; | |||||
import axios from 'axios'; | import axios from 'axios'; | ||||
import { connect } from 'react-redux'; | import { connect } from 'react-redux'; | ||||
import { fb } from '../config/firebaseConfig'; | import { fb } from '../config/firebaseConfig'; | ||||
import back from "../assets/icons/back1.png"; | |||||
import { serviceActionPending, serviceActionError, serviceActionSuccess } from '../actions/FaqActions'; | import { serviceActionPending, serviceActionError, serviceActionSuccess } from '../actions/FaqActions'; | ||||
class Faq extends Component<Props> { | class Faq extends Component<Props> { | ||||
@@ -50,7 +51,15 @@ class Faq extends Component<Props> { | |||||
<View> | <View> | ||||
<View style={styles.faq_style1}> | <View style={styles.faq_style1}> | ||||
<TouchableOpacity style={styles.faq_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | <TouchableOpacity style={styles.faq_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | ||||
<Icon onPress={this.handleBackButtonClick} style={styles.faq_style3} name='arrow-back' /> | |||||
<Image | |||||
style={{ | |||||
width: 20, | |||||
height: 20, | |||||
backgroundColor: "white", | |||||
marginVertical: 12, | |||||
}} | |||||
source={back} | |||||
/> | |||||
</TouchableOpacity> | </TouchableOpacity> | ||||
<View style={styles.faq_style4} /> | <View style={styles.faq_style4} /> | ||||
<Text style={styles.faq_style5}>Faq</Text> | <Text style={styles.faq_style5}>Faq</Text> | ||||
@@ -9,8 +9,9 @@ import { | |||||
Image, | Image, | ||||
TextInput, | TextInput, | ||||
ImageBackground, | ImageBackground, | ||||
StatusBar | |||||
} from "react-native"; | } from "react-native"; | ||||
import { StatusBar, Loader } from "../components/GeneralComponents"; | |||||
import { Loader } from "../components/GeneralComponents"; | |||||
import { | import { | ||||
img_url, | img_url, | ||||
api_url, | api_url, | ||||
@@ -155,6 +156,10 @@ export default class Home extends Component<Props> { | |||||
render() { | render() { | ||||
return ( | return ( | ||||
<Container> | <Container> | ||||
<StatusBar | |||||
backgroundColor = "#a4a9b7" | |||||
barStyle = "dark-content" | |||||
/> | |||||
<Content padder> | <Content padder> | ||||
<View style={styles.home_style1}> | <View style={styles.home_style1}> | ||||
<ScrollView | <ScrollView | ||||
@@ -1,7 +1,8 @@ | |||||
import React, {Component} from 'react'; | import React, {Component} from 'react'; | ||||
import { StyleSheet, Text, View, TouchableOpacity } from 'react-native'; | |||||
import { StyleSheet, Text, View, TouchableOpacity,Image } from 'react-native'; | |||||
import { Container, Header, Content, Left, Body, Right, Title, Button, Icon, Row, Card } from 'native-base'; | import { Container, Header, Content, Left, Body, Right, Title, Button, Icon, Row, Card } from 'native-base'; | ||||
import * as colors from '../assets/css/Colors'; | import * as colors from '../assets/css/Colors'; | ||||
import back from "../assets/icons/back1.png"; | |||||
import { Loader } from '../components/GeneralComponents'; | import { Loader } from '../components/GeneralComponents'; | ||||
import { api_url, privacy,font_title,font_description } from '../config/Constants'; | import { api_url, privacy,font_title,font_description } from '../config/Constants'; | ||||
import axios from 'axios'; | import axios from 'axios'; | ||||
@@ -43,7 +44,15 @@ class PrivacyPolicy extends Component<Props> { | |||||
<View> | <View> | ||||
<View style={styles.pri_style1}> | <View style={styles.pri_style1}> | ||||
<TouchableOpacity style={styles.pri_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | <TouchableOpacity style={styles.pri_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | ||||
<Icon onPress={this.handleBackButtonClick} style={styles.pri_style3} name='arrow-back' /> | |||||
<Image | |||||
style={{ | |||||
width: 20, | |||||
height: 20, | |||||
backgroundColor: "white", | |||||
marginVertical: 12, | |||||
}} | |||||
source={back} | |||||
/> | |||||
</TouchableOpacity> | </TouchableOpacity> | ||||
<View style={styles.pri_style4} /> | <View style={styles.pri_style4} /> | ||||
<Text style={styles.pri_style5}>Privacy Policy</Text> | <Text style={styles.pri_style5}>Privacy Policy</Text> | ||||
@@ -1,7 +1,8 @@ | |||||
import React, {Component} from 'react'; | import React, {Component} from 'react'; | ||||
import { StyleSheet, Text, View, FlatList, TouchableOpacity } from 'react-native'; | |||||
import { StyleSheet, Text, View, FlatList, TouchableOpacity,Image } from 'react-native'; | |||||
import { Content, Container, Header, Body, Title, Left, Icon, Right, Button as Btn, Card, CardItem, List, ListItem, Thumbnail, Row} from 'native-base'; | import { Content, Container, Header, Body, Title, Left, Icon, Right, Button as Btn, Card, CardItem, List, ListItem, Thumbnail, Row} from 'native-base'; | ||||
import * as colors from '../assets/css/Colors'; | import * as colors from '../assets/css/Colors'; | ||||
import back from "../assets/icons/back1.png"; | |||||
import axios from 'axios'; | import axios from 'axios'; | ||||
import { Loader } from '../components/GeneralComponents'; | import { Loader } from '../components/GeneralComponents'; | ||||
import { wallet_icon, api_url, get_wallet, add_wallet ,font_description,font_title , no_wallet_lottie} from '../config/Constants'; | import { wallet_icon, api_url, get_wallet, add_wallet ,font_description,font_title , no_wallet_lottie} from '../config/Constants'; | ||||
@@ -107,7 +108,15 @@ class Wallet extends Component<Props> { | |||||
<View> | <View> | ||||
<View style={styles.wall_style1}> | <View style={styles.wall_style1}> | ||||
<TouchableOpacity style={styles.wall_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | <TouchableOpacity style={styles.wall_style2} onPress={this.handleBackButtonClick} activeOpacity={1} > | ||||
<Icon onPress={this.handleBackButtonClick} style={styles.wall_style3} name='arrow-back' /> | |||||
<Image | |||||
style={{ | |||||
width: 20, | |||||
height: 20, | |||||
backgroundColor: "white", | |||||
marginVertical: 12, | |||||
}} | |||||
source={back} | |||||
/> | |||||
</TouchableOpacity> | </TouchableOpacity> | ||||
<View style={styles.wall_style4} /> | <View style={styles.wall_style4} /> | ||||
<Text style={styles.wall_style5}>Wallet</Text> | <Text style={styles.wall_style5}>Wallet</Text> | ||||