Commit 71101823 authored by Trisno's avatar Trisno

fixing margin status bar

parent 0229736a
......@@ -29,14 +29,14 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "id.web.ravintola.excelsocrm",
"buildNumber": "2006261645",
"buildNumber": "2006261800",
"config": {
"googleMapsApiKey": "AIzaSyCvIFNvXKmBNetqPrV4VnjvF772avYbA3M"
}
},
"android": {
"package": "id.web.ravintola.excelsocrm",
"versionCode": 2006261645,
"versionCode": 2006261800,
"config": {
"googleMaps": {
"apiKey": "AIzaSyAcCfuNHVFstDUE-ZDafWsiUmA3ON79cqo"
......
......@@ -251,7 +251,21 @@ class Auth extends React.Component {
},
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={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
......
......@@ -285,24 +285,24 @@ class Home extends React.Component {
Alert.alert(error, response.msg)
})
}
onClickClaimCredit() {
Alert.alert(
"",
"Are you sure want to claim credit ?",
[
{
text: 'No',
onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleClaimCredit()
},
],
{ cancelable: false },
"",
"Are you sure want to claim credit ?",
[
{
text: 'No',
onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleClaimCredit()
},
],
{ cancelable: false },
)
}
}
render() {
return (
......@@ -311,7 +311,8 @@ class Home extends React.Component {
<ScrollView>
<View style={{ flex: 6 }}>
<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>
</View>
<View style={{ margin: 15, flex: 0.15, alignItems: 'flex-end' }}>
......@@ -513,20 +514,20 @@ class Home extends React.Component {
</View>
</Card>
{this.state.old_balance_claimed == false ? (
this.state.old_balance == 0 ? (null) :
(<Card style={{ padding: 10, margin: 10, alignContent: '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={''} />
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}>
<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>
</View>
</TouchableOpacity>
</View>
this.state.old_balance == 0 ? (null) :
(<Card style={{ padding: 10, margin: 10, alignContent: '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={''} />
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.onClickClaimCredit()}>
<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>
</View>
</TouchableOpacity>
</View>
</Card>)
) : (null)}
</View>
</Card>)
) : (null)}
</View>
) :
this.state.account_number == "" && this.state.is_expired == true ? (
......@@ -637,28 +638,28 @@ class Home extends React.Component {
</Card>
</View>
)
}
<View style={{ flexDirection: 'row', flex: 1, height: 40, marginTop: 40 }}>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<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>
</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 style={{ flexDirection: 'row', flex: 1, height: 40, marginTop: 40 }}>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<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>
</View>
<View style={{ height: 40 }}></View>
</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>
</ScrollView>
</View>
<View style={{ height: 40 }}></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