Commit 71101823 authored by Trisno's avatar Trisno

fixing margin status bar

parent 0229736a
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
"ios": { "ios": {
"supportsTablet": true, "supportsTablet": true,
"bundleIdentifier": "id.web.ravintola.excelsocrm", "bundleIdentifier": "id.web.ravintola.excelsocrm",
"buildNumber": "2006261645", "buildNumber": "2006261800",
"config": { "config": {
"googleMapsApiKey": "AIzaSyCvIFNvXKmBNetqPrV4VnjvF772avYbA3M" "googleMapsApiKey": "AIzaSyCvIFNvXKmBNetqPrV4VnjvF772avYbA3M"
} }
}, },
"android": { "android": {
"package": "id.web.ravintola.excelsocrm", "package": "id.web.ravintola.excelsocrm",
"versionCode": 2006261645, "versionCode": 2006261800,
"config": { "config": {
"googleMaps": { "googleMaps": {
"apiKey": "AIzaSyAcCfuNHVFstDUE-ZDafWsiUmA3ON79cqo" "apiKey": "AIzaSyAcCfuNHVFstDUE-ZDafWsiUmA3ON79cqo"
......
...@@ -251,7 +251,21 @@ class Auth extends React.Component { ...@@ -251,7 +251,21 @@ class Auth extends React.Component {
}, },
title: 'SETTING URL' title: 'SETTING URL'
}} /> }} />
<Stack.Screen name="Home" component={Home} /> {/* <Stack.Screen name="Home" component={Home} /> */}
<Stack.Screen name="Home" component={HomePage}
options={{
headerShown: false,
headerRight: props => <HandleInbox {...props} />,
title: 'TODAY PROMOTION',
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}
}} />
<Stack.Screen name="Profile" component={ProfilePage} options={{ <Stack.Screen name="Profile" component={ProfilePage} options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
......
...@@ -285,24 +285,24 @@ class Home extends React.Component { ...@@ -285,24 +285,24 @@ class Home extends React.Component {
Alert.alert(error, response.msg) Alert.alert(error, response.msg)
}) })
} }
onClickClaimCredit() { onClickClaimCredit() {
Alert.alert( Alert.alert(
"", "",
"Are you sure want to claim credit ?", "Are you sure want to claim credit ?",
[ [
{ {
text: 'No', text: 'No',
onPress: () => console.log('Cancel Claim Credit'), onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel', style: 'cancel',
}, },
{ {
text: 'Yes', onPress: () => this.handleClaimCredit() text: 'Yes', onPress: () => this.handleClaimCredit()
}, },
], ],
{ cancelable: false }, { cancelable: false },
) )
} }
render() { render() {
return ( return (
...@@ -311,7 +311,8 @@ class Home extends React.Component { ...@@ -311,7 +311,8 @@ class Home extends React.Component {
<ScrollView> <ScrollView>
<View style={{ flex: 6 }}> <View style={{ flex: 6 }}>
<View style={styles.header}> <View style={styles.header}>
<View style={{ flex: 1, alignItems: 'flex-end' }}> <View style={{ flex: 0.15, margin: 15 }} />
<View style={{ flex: 0.7, alignItems: 'center'}}>
<Text style={styles.titleText}>{i18n.t('promotion')}</Text> <Text style={styles.titleText}>{i18n.t('promotion')}</Text>
</View> </View>
<View style={{ margin: 15, flex: 0.15, alignItems: 'flex-end' }}> <View style={{ margin: 15, flex: 0.15, alignItems: 'flex-end' }}>
...@@ -513,20 +514,20 @@ class Home extends React.Component { ...@@ -513,20 +514,20 @@ class Home extends React.Component {
</View> </View>
</Card> </Card>
{this.state.old_balance_claimed == false ? ( {this.state.old_balance_claimed == false ? (
this.state.old_balance == 0 ? (null) : this.state.old_balance == 0 ? (null) :
(<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}> (<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<View style={{ flex: 1, height: 80, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}> <View style={{ flex: 1, height: 80, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}>
<NumberFormat decimalScale={0} value={this.state.old_balance} renderText={value => <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10, color: '#838383' }}>CREDIT : Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={this.state.old_balance} renderText={value => <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10, color: '#838383' }}>CREDIT : Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<View style={{ justifyContent: 'center' }}> <View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}> <TouchableOpacity onPress={() => this.onClickClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}> <View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>CLAIM CREDIT</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>CLAIM CREDIT</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View>
</View> </View>
</Card>) </View>
) : (null)} </Card>)
) : (null)}
</View> </View>
) : ) :
this.state.account_number == "" && this.state.is_expired == true ? ( this.state.account_number == "" && this.state.is_expired == true ? (
...@@ -637,28 +638,28 @@ class Home extends React.Component { ...@@ -637,28 +638,28 @@ class Home extends React.Component {
</Card> </Card>
</View> </View>
) )
} }
<View style={{ flexDirection: 'row', flex: 1, height: 40, marginTop: 40 }}> <View style={{ flexDirection: 'row', flex: 1, height: 40, marginTop: 40 }}>
<View style={{ justifyContent: 'center', flex: 1 }}> <View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('TopUpInfo')}> <TouchableOpacity onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}> <View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('topup')}</Text> <Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('topup')}</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.onClickClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('usebalance')}</Text>
</View>
</TouchableOpacity>
</View>
</View> </View>
<View style={{ height: 40 }}></View> </TouchableOpacity>
</View> </View>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.onClickClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('usebalance')}</Text>
</View>
</TouchableOpacity>
</View> </View>
</ScrollView> </View>
<View style={{ height: 40 }}></View>
</View> </View>
</View>
</ScrollView>
</View>
) )
} }
} }
......
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