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