Commit ad483a18 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Conflicts:
#	view/Auth.js
parents ed6ffdf3 699c0721
{
"expo": {
"name": "Excelso_update 11.30 / 18.05.2020",
"name": "Excelso_update 13.00 / 18.05.2020",
"slug": "excelso-pro",
"privacy": "public",
"sdkVersion": "36.0.0",
......
This diff is collapsed.
......@@ -232,20 +232,22 @@ class Auth extends React.Component {
textAlign: 'center'
}, title: 'PROFIL'
}} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
{/* <Stack.Screen name="Change Profil" component={ChangeProfile} /> */}
<Stack.Screen name="Change language" component={ChangeLanguage} />
<Stack.Screen name="Change password" component={ChangePassword} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'CHANGE PROFIL'
}} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
<Stack.Screen name="Change password" component={ChangePassword} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'CHANGE PASSWORD'
}}/>
<Stack.Screen name="Card Activation" component={CardActivation} />
<Stack.Screen name="Renewal" component={Renewal} />
<Stack.Screen name="Account" component={Account} />
......@@ -267,7 +269,18 @@ class Auth extends React.Component {
},
title: 'Delivery Address'
}} />
<Stack.Screen name="Address Detail" component={AddressDetail} />
<Stack.Screen name="Address Detail" component={AddressDetail} options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTintColor: '#fff',
headerTitleAlign: 'center',
headerTitleStyle: {
fontFamily: 'Gotham-Black',
color: 'white',
fontSize: 20,
},
title: ' Tambah Alamat'
}} />
<Stack.Screen name="Menu Detail" component={MenuDetail} options={({ route }) => ({
title: route.params.nameMenu,
headerStyle: { backgroundColor: '#CFB368' },
......@@ -382,19 +395,20 @@ class Auth extends React.Component {
title: 'REGISTER'
}} />
<Stack.Screen name="TopUpInfo" component={TopUpInfo} />
<Stack.Screen name="Reward Detail" component={RewardDetail} options={{
headerStyle: { backgroundColor: "#ccb46c" },
<Stack.Screen name="Reward Detail" component={RewardDetail} />
<Stack.Screen name="Reward Select" component={RewardSelect}
options={{
headerStyle: { backgroundColor: "#CFB368" },
headerBackTitleStyle: { color: 'white' },
headerTintColor: '#fff',
headerTitleAlign: 'center',
headerTitleStyle: {
fontFamily: 'Gotham-Black',
color: 'white',
fontSize: 20,
fontSize: 18,
},
title: 'REWARD DETAIL'
title: 'REWARD SELECT'
}} />
<Stack.Screen name="Reward Select" component={RewardSelect} />
</Stack.Navigator>
)
}
......
import React, { Component, PureComponent } from 'react';
import { StyleSheet, Text, TextInput, View, Button,Alert } from 'react-native';
import { StyleSheet, Text, TextInput, View, Button, Alert, TouchableOpacity } from 'react-native';
import Axios from 'axios';
import {BASE_URL_CHANGE_PASSWORD} from '../model/Base_Model';
import { BASE_URL_CHANGE_PASSWORD } from '../model/Base_Model';
import { connect } from 'react-redux';
class ChangePassword extends React.Component {
......@@ -15,7 +15,7 @@ class ChangePassword extends React.Component {
}
}
componentDidMount(){
componentDidMount() {
}
......@@ -29,54 +29,71 @@ class ChangePassword extends React.Component {
Axios.post(BASE_URL_CHANGE_PASSWORD, params).then(res => {
this.props.navigation.navigate('Profile');
}).catch(error => {
let response = error.response.data;
Alert.alert(response.msg);
console.log(error)
let response = error.response;
Alert.alert('', response.msg);
})
}
render() {
return (
<View style={styles.container}>
<View style={styles.header}>
{/* <View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>Change Password</Text>
</View>
</View> */}
<View style={styles.form}>
<View style={styles.field_token}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Current Password</Text>
<View style={{ marginBottom: 25 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', color: '#CFB368', textAlign: 'center' }}>Current Password</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 50, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(old_password) => this.setState({ old_password })}
value={this.state.old_password }
secureTextEntry={true}/>
<View style={styles.items2}>
<TextInput style={styles.textInput}
onChangeText={(old_password) => this.setState({ old_password })}
value={this.state.old_password}
secureTextEntry={true}
placeholder='******'
placeholderTextColor='gray'
textAlign='center' />
</View>
</View>
<View style={styles.field_new_password}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>New Password</Text>
<View style={styles.field_token}>
<View style={{ marginBottom: 25 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', color: '#CFB368', textAlign: 'center' }}>New Password</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 50, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(Password) => this.setState({ Password })}
value={this.state.Password}
secureTextEntry={true}/>
<View style={styles.items2}>
<TextInput style={styles.textInput}
onChangeText={(Password) => this.setState({ Password })}
value={this.state.Password}
secureTextEntry={true}
placeholder='******'
placeholderTextColor='gray'
textAlign='center' />
</View>
</View>
<View style={styles.field_repeat_password}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Repeat Password</Text>
<View style={styles.field_token}>
<View style={{ marginBottom: 25 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', color: '#CFB368', textAlign: 'center' }}>Repeat Password</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 50, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(Password_confirmation) => this.setState({ Password_confirmation })}
value={this.state.Password_confirmation}
secureTextEntry={true}/>
<View style={styles.items2}>
<TextInput style={styles.textInput}
onChangeText={(Password_confirmation) => this.setState({ Password_confirmation })}
value={this.state.Password_confirmation}
secureTextEntry={true}
placeholder='******'
placeholderTextColor='gray'
textAlign='center' />
</View>
</View>
<View style={styles.button}>
<Button title="Change Password" onPress={()=>this.changePassword()}></Button>
</View>
{/* <View style={styles.button}>
<Button title="Change Password" onPress={() => this.changePassword()}></Button>
</View> */}
<TouchableOpacity onPress={() => this.changePassword()}>
<View style={styles.button}>
<Text style={{ color: 'white', fontSize: 12, fontFamily: 'Gotham-Black' }}>Change Password</Text>
</View>
</TouchableOpacity>
</View>
</View>
)
......@@ -96,13 +113,12 @@ const styles = StyleSheet.create({
},
form: {
flex: 3,
margin: 10,
marginTop: 0,
flex: 0.8,
flexDirection: 'column',
},
field_token: {
flexDirection: 'row'
marginTop: 25
},
field_new_password: {
......@@ -113,11 +129,32 @@ const styles = StyleSheet.create({
flexDirection: 'row'
},
button: {
height: 50,
margin: 10,
items2: {
flex: 1,
height: 35,
marginHorizontal: 15,
justifyContent: 'center',
alignItems: 'stretch',
},
}
textInput: {
height: 40,
borderColor: 'gray',
borderWidth: 1,
padding: 10,
margin: 30,
borderRadius: 10
},
button: {
backgroundColor: '#CFB368',
marginTop: 50,
marginHorizontal: 100,
borderRadius: 15,
padding:10,
alignItems: 'center',
justifyContent: 'center'
},
});
......
......@@ -209,31 +209,27 @@ class DeliveryAddrees extends React.Component {
return (
<View style={styles.list_addrees}>
<TouchableOpacity onPress={() => this.onSave(item.address, item.id)}>
<View style={{ flex: 1, flexDirection: 'row', margin: 20, }}>
<View style={{ flex: 1, flexDirection: 'row', margin: 5, }}>
<View style={{ flex: 1, marginBottom: 10, justifyContent: 'center' }}>
<CheckBox
center
checkedIcon='dot-circle-o'
uncheckedIcon='circle-o'
checked={this.state.checked}
checkedColor="#ccb46c"
uncheckedColor="#ccb46c"
/>
<Text style={{ textAlign: 'center', color: '#ccb46c', fontFamily: 'Gotham-Light' }}>PILIH</Text>
</View>
<View style={{ flex: 3, justifyContent: 'center' }}>
<View style={{ margin: 5, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 19, marginBottom: 5 }}>{item.name}</Text>
<View>
<CheckBox
checkedIcon='dot-circle-o'
uncheckedIcon='circle-o'
checked={this.state.checked}
checkedColor="#ccb46c"
uncheckedColor="#ccb46c"
/>
</View>
<View>
<Text style={{textAlign:'center', color: '#ccb46c', fontFamily: 'Gotham-Light' ,marginRight:20}}>PILIH</Text>
</View>
<Text style={{ fontFamily: 'Gotham-Light', color: 'grey', fontSize: 15, marginBottom: 5 }}>{item.address}</Text>
</View>
<View style={{ flex: 1,justifyContent:'center' }}>
<View style={{ margin: 5, }}>
<Image
style={{height:20,width:20,tintColor:'#ccb46c'}}
source={require('../assets/ellipsis-v.png')}
/>
<View style={{ flex: 3, justifyContent: 'center' }}>
<View>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 15 }}>{item.name}</Text>
</View>
<Text style={{ fontFamily: 'Gotham-Light', color: 'grey', fontSize: 15 }}>{item.address}</Text>
</View>
</View>
</TouchableOpacity>
......
......@@ -208,11 +208,11 @@ class PickupName extends React.Component {
<View style={{ margin: 5 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text>
<View style={{flexDirection:'row'}}>
{item.can_accept_order == true ? (<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c",top:5}}>OPEN : </Text>)
:(<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c"}}>CLOSED : </Text>) }
{item.can_accept_order == true ? (<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c",top:5}}>OPEN </Text>)
:(<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c"}}>CLOSED </Text>) }
</View>
</View>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 15}}> Opening Hours : {item.open_time} - {item.close_time}</Text>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368'}}> Opening Hours : {item.open_time} - {item.close_time}</Text>
<Text style={{ margin: 5, color: '#b1b1b2',fontFamily: 'Gotham-Light' }}>
{item.full_address}
</Text>
......@@ -257,7 +257,6 @@ class PickupName extends React.Component {
<Ionicons name="ios-search" size={32} color="#ccb46c" />
</View>
</View>
</View>
<View style={styles.body}>
<FlatList
......
......@@ -84,9 +84,9 @@ class RewardSelect extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={styles.header}>
{/* <View style={styles.header}>
<Text style={{ color: 'white', textAlign: 'center', fontSize: 18, fontFamily: 'Gotham-Black' }}>REWARDS E-VOUCHER</Text>
</View>
</View> */}
<ScrollView style={styles.body}>
{
this.state.rewardsList.map((item, key) => (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment