Commit 31d8beef authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

placeholder

parent 9749b55e
...@@ -194,8 +194,19 @@ class Auth extends React.Component { ...@@ -194,8 +194,19 @@ class Auth extends React.Component {
</> </>
) : this.props.pageEmailConfirmation === true ? ( ) : this.props.pageEmailConfirmation === true ? (
<> <>
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> <Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
<Stack.Screen name="Login" component={Login} /> headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'EMAIL CONFIRMATION'
}} />
<Stack.Screen name="Login" component={Login} options={{headerShown:false}} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{ <Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false, headerShown: false,
}} /> }} />
...@@ -301,7 +312,19 @@ class Auth extends React.Component { ...@@ -301,7 +312,19 @@ class Auth extends React.Component {
title: 'TRANSFER BALANCE' title: 'TRANSFER BALANCE'
}} /> }} />
<Stack.Screen name="Register" component={Register} /> <Stack.Screen name="Register" component={Register} />
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> <Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
fontSize: 20,
color: 'white',
textAlign: 'center'
}, title: 'EMAIL CONFIRMATION'
}} />
<Stack.Screen name="Upgrade Premium" component={UpgradePremium} <Stack.Screen name="Upgrade Premium" component={UpgradePremium}
options={{ options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
......
...@@ -154,9 +154,11 @@ class CardActivation extends React.Component { ...@@ -154,9 +154,11 @@ class CardActivation extends React.Component {
} }
{ {
this.state.timer === 0 ? ( this.state.timer === 0 ? (
<View style={{ width: 90, height: 40, alignSelf: 'center', margin: 20, top: 0 }}> <TouchableOpacity onPress={() => this.ResendToken()}>
<Button title="Resend Token" onPress={() => this.ResendToken()}></Button> <View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', margin: 20, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>Resend Token</Text>
</View> </View>
</TouchableOpacity>
) : (null)} ) : (null)}
<View style={styles.field_email}> <View style={styles.field_email}>
......
...@@ -31,7 +31,8 @@ class Home extends React.Component { ...@@ -31,7 +31,8 @@ class Home extends React.Component {
my_long: 0, my_long: 0,
indicator: true, indicator: true,
slider_height: 350, slider_height: 350,
slugs: [] slugs: [],
placeholder: true
} }
} }
...@@ -81,8 +82,6 @@ class Home extends React.Component { ...@@ -81,8 +82,6 @@ class Home extends React.Component {
let latitude = location.coords.latitude; let latitude = location.coords.latitude;
let longitude = location.coords.longitude; let longitude = location.coords.longitude;
this.setState({ this.setState({
my_lat: latitude, my_lat: latitude,
my_long: longitude my_long: longitude
...@@ -111,10 +110,11 @@ class Home extends React.Component { ...@@ -111,10 +110,11 @@ class Home extends React.Component {
} }
this.setState({ this.setState({
images: imageLink, images: imageLink,
slugs: slugs slugs: slugs,
placeholder: false
}) })
}).catch(error =>{ }).catch(error => {
const { navigation } = this.props const { navigation } = this.props
let response = error.response.data let response = error.response.data
session(response, navigation) session(response, navigation)
...@@ -142,11 +142,9 @@ class Home extends React.Component { ...@@ -142,11 +142,9 @@ class Home extends React.Component {
indicator: false indicator: false
}) })
}).catch(error => { }).catch(error => {
// console.log("INI ERROR " + error); let response = error.response.data
// const { navigation } = this.props session(response, navigation)
// let response = error.response.data Alert.alert(response.msg);
// session(response, navigation)
// Alert.alert(response.msg);
}) })
} }
...@@ -174,17 +172,17 @@ class Home extends React.Component { ...@@ -174,17 +172,17 @@ class Home extends React.Component {
indicator: false indicator: false
}) })
}).catch(error => { }).catch(error => {
const { navigation } = this.props const { navigation } = this.props
let response_data = error.response.data let response_data = error.response.data
let error_status = error.response.status let error_status = error.response.status
session(response_data,error_status,navigation) session(response_data, error_status, navigation)
}) })
} }
_useBalance(){ _useBalance() {
if(this.props.in_payment){ if (this.props.in_payment) {
this.props.navigation.navigate('Redeem Code') this.props.navigation.navigate('Redeem Code')
} else { } else {
this.props.navigation.navigate('UseBalance') this.props.navigation.navigate('UseBalance')
...@@ -211,7 +209,6 @@ class Home extends React.Component { ...@@ -211,7 +209,6 @@ class Home extends React.Component {
} else { } else {
Alert.alert('Belum dapat outlet terdekat') Alert.alert('Belum dapat outlet terdekat')
} }
} }
render() { render() {
...@@ -232,40 +229,50 @@ class Home extends React.Component { ...@@ -232,40 +229,50 @@ class Home extends React.Component {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
<SliderBox <View style={{flex:2}}>
images={this.state.images} {
onCurrentImagePressed={index => console.log(`image ${index} pressed`)} this.state.images.length ? (
autoplay <SliderBox
circleLoop images={this.state.images}
dotColor='black' onCurrentImagePressed={index => console.log(`image ${index} pressed`)}
inactiveDotColor='white' autoplay
sliderBoxHeight={this.state.slider_height} circleLoop
paginationBoxVerticalPadding={20} dotColor='black'
resizeMethod={'resize'} inactiveDotColor='white'
resizeMode={'stretch'} sliderBoxHeight={this.state.slider_height}
paginationBoxStyle={{ paginationBoxVerticalPadding={20}
position: "absolute", resizeMethod={'resize'}
bottom: 0, resizeMode={'stretch'}
padding: 0, paginationBoxStyle={{
alignItems: 'center', position: "absolute",
alignSelf: 'center', bottom: 0,
justifyContent: 'center', padding: 0,
paddingVertical: 10, alignItems: 'center',
}} alignSelf: 'center',
dotStyle={{ justifyContent: 'center',
width: 10, paddingVertical: 10,
height: 10, }}
borderRadius: 5, dotStyle={{
marginHorizontal: 0, width: 10,
padding: 0, height: 10,
margin: 0, borderRadius: 5,
}} marginHorizontal: 0,
ImageComponentStyle={{ padding: 0,
width: '100%', margin: 0,
}} }}
imageLoadingColor='#c7c7c7' ImageComponentStyle={{
onCurrentImagePressed={(index) => this.props.navigation.navigate('News Detail', {slug: this.state.slugs[index]})} width: '100%',
/> }}
imageLoadingColor='#c7c7c7'
onCurrentImagePressed={(index) => this.props.navigation.navigate('News Detail', { slug: this.state.slugs[index] })}
/>
) : (
<View style={{height : this.state.slider_height, backgroundColor: '#838383',justifyContent:'center'}}>
<ActivityIndicator size="large" color="#c9af6d" />
</View>
)
}
</View>
</View> </View>
<View style={styles.content}> <View style={styles.content}>
<View style={styles.card}> <View style={styles.card}>
...@@ -287,13 +294,13 @@ class Home extends React.Component { ...@@ -287,13 +294,13 @@ class Home extends React.Component {
{/* <Text style={{ textAlign: 'center', fontSize: 12, }}> {/* <Text style={{ textAlign: 'center', fontSize: 12, }}>
{i18n.t('orderInfo')} {i18n.t('orderInfo')}
</Text> */} </Text> */}
<Text style={{ textAlign: 'center', fontSize: 12, fontFamily: 'Gotham-Black', color:'#838383' }}> <Text style={{ textAlign: 'center', fontSize: 12, fontFamily: 'Gotham-Black', color: '#838383' }}>
YOU WILL PICKUP YOUR ORDER AT YOU WILL PICKUP YOUR ORDER AT
</Text> </Text>
{this.state.indicator == true ? ( {this.state.indicator == true ? (
<ActivityIndicator size="small" color="#c9af6d" /> <ActivityIndicator size="small" color="#c9af6d" />
) : ( ) : (
<Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color:'#838383' }}> <Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: '#838383' }}>
Excelso {this.props.name_outlet} Excelso {this.props.name_outlet}
</Text> </Text>
)} )}
...@@ -335,7 +342,7 @@ class Home extends React.Component { ...@@ -335,7 +342,7 @@ class Home extends React.Component {
{/* <Text> {/* <Text>
YOUR CARD NUMBER | {this.state.expire_date} YOUR CARD NUMBER | {this.state.expire_date}
</Text> */} </Text> */}
<View style={{ flexDirection: 'row', flex: 1, paddingBottom:5 }}> <View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}>
<View style={{ flex: 0.5 }}> <View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>YOUR CARD NUMBER</Text> <Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>YOUR CARD NUMBER</Text>
</View> </View>
...@@ -360,8 +367,8 @@ class Home extends React.Component { ...@@ -360,8 +367,8 @@ class Home extends React.Component {
{/* <Text>{i18n.t('balance')}</Text> */} {/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>BALANCE</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>BALANCE</Text>
</View> </View>
<View style={{ flex: 0.7, alignItems:'center'}}> <View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color:'gray' }}>IDR {this.state.balance}</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.balance}</Text>
</View> </View>
</View> </View>
...@@ -375,13 +382,13 @@ class Home extends React.Component { ...@@ -375,13 +382,13 @@ class Home extends React.Component {
{/* <Text>{i18n.t('balance')}</Text> */} {/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>POINTS</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>POINTS</Text>
</View> </View>
<View style={{ flex: 0.7,alignItems:'center' }}> <View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color:'gray' }}>IDR {this.state.point}</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.point}</Text>
</View> </View>
</View> </View>
</Card> </Card>
</View> </View>
) )
} }
<View style={{ flexDirection: 'row', flex: 1 }}> <View style={{ flexDirection: 'row', flex: 1 }}>
...@@ -389,14 +396,14 @@ class Home extends React.Component { ...@@ -389,14 +396,14 @@ class Home extends React.Component {
// style={styles.submitUpgradePemium} // style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}> activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<View style={styles.topUseBalance}> <View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 16 }}>TOP BALANCE </Text> <Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 15 }}>TOP BALANCE </Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
// style={styles.submitUpgradePemium} // style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={() => this._useBalance()}> activeOpacity={.5} onPress={() => this._useBalance()}>
<View style={styles.topUseBalance}> <View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 16 }}>USE BALANCE </Text> <Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 15 }}>USE BALANCE </Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -439,8 +446,8 @@ const styles = StyleSheet.create({ ...@@ -439,8 +446,8 @@ const styles = StyleSheet.create({
alignItems: 'center' alignItems: 'center'
}, },
buttonDelivery: { buttonDelivery: {
justifyContent:'center', justifyContent: 'center',
height:40, height: 40,
marginTop: 10, marginTop: 10,
paddingTop: 15, paddingTop: 15,
paddingBottom: 15, paddingBottom: 15,
...@@ -454,7 +461,7 @@ const styles = StyleSheet.create({ ...@@ -454,7 +461,7 @@ const styles = StyleSheet.create({
top: -20, top: -20,
}, },
buttonPickup: { buttonPickup: {
justifyContent:'center', justifyContent: 'center',
height: 40, height: 40,
marginTop: 10, marginTop: 10,
paddingTop: 15, paddingTop: 15,
...@@ -470,9 +477,9 @@ const styles = StyleSheet.create({ ...@@ -470,9 +477,9 @@ const styles = StyleSheet.create({
}, },
submitOrder: { submitOrder: {
height:40, height: 40,
margin: 10, margin: 10,
paddingTop:10, paddingTop: 10,
backgroundColor: '#CFB368', backgroundColor: '#CFB368',
borderRadius: 10, borderRadius: 10,
borderWidth: 0, borderWidth: 0,
...@@ -481,10 +488,10 @@ const styles = StyleSheet.create({ ...@@ -481,10 +488,10 @@ const styles = StyleSheet.create({
topUseBalance: { topUseBalance: {
flex: 0.5, flex: 0.5,
height:40, height: 40,
backgroundColor: 'green', backgroundColor: 'green',
top: 20, top: 20,
margin:5, margin: 5,
padding: 10, padding: 10,
paddingHorizontal: 15, paddingHorizontal: 15,
borderRadius: 10, borderRadius: 10,
......
...@@ -117,7 +117,8 @@ class MenuConfirmation extends React.Component { ...@@ -117,7 +117,8 @@ class MenuConfirmation extends React.Component {
}).catch(error => { }).catch(error => {
console.log(error.response) console.log(error.response)
if (error.response.status <= 500) { if (error.response.status <= 500) {
Alert.alert(String(error.response.status), 'Internal Server Error') let response = error.response.data;
Alert.alert('',response.msg);
} else { } else {
let response = error.response.data; let response = error.response.data;
Alert.alert('', response.msg); Alert.alert('', response.msg);
......
...@@ -353,6 +353,7 @@ const styles = StyleSheet.create({ ...@@ -353,6 +353,7 @@ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
backgroundColor: 'white', backgroundColor: 'white',
}, },
// shadow: { // shadow: {
......
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