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

revisi home

parent 30e84a00
...@@ -39,7 +39,8 @@ class Home extends React.Component { ...@@ -39,7 +39,8 @@ class Home extends React.Component {
inbox: "0", inbox: "0",
is_expired_date: true, is_expired_date: true,
old_balance_claimed: true, old_balance_claimed: true,
member_since: "" member_since: "",
old_balance: 0
} }
} }
...@@ -179,6 +180,7 @@ class Home extends React.Component { ...@@ -179,6 +180,7 @@ class Home extends React.Component {
let is_expired = dataCard.is_expired let is_expired = dataCard.is_expired
let old_balance_claimed = dataCard.old_balance_claimed let old_balance_claimed = dataCard.old_balance_claimed
let member_since = dataCard.member_since let member_since = dataCard.member_since
let old_balance = dataCard.old_balance
this.setState({ this.setState({
point: point, point: point,
...@@ -188,7 +190,9 @@ class Home extends React.Component { ...@@ -188,7 +190,9 @@ class Home extends React.Component {
indicatorProfileCard: false, indicatorProfileCard: false,
is_expired: is_expired, is_expired: is_expired,
old_balance_claimed: old_balance_claimed, old_balance_claimed: old_balance_claimed,
member_since: member_since member_since: member_since,
old_balance: old_balance,
card_number: card_number
}) })
}).catch(error => { }).catch(error => {
let response = error.response.data let response = error.response.data
...@@ -446,7 +450,6 @@ class Home extends React.Component { ...@@ -446,7 +450,6 @@ class Home extends React.Component {
</View> </View>
</Card> </Card>
</View> </View>
) : ) :
this.state.account_number !== "" && this.state.is_expired == false ? ( this.state.account_number !== "" && this.state.is_expired == false ? (
<View style={styles.card}> <View style={styles.card}>
...@@ -488,7 +491,7 @@ class Home extends React.Component { ...@@ -488,7 +491,7 @@ class Home extends React.Component {
{this.state.old_balance_claimed == false ? ( {this.state.old_balance_claimed == false ? (
<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' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : 200.000 </Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text>
<View style={{ justifyContent: 'center' }}> <View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}> <TouchableOpacity onPress={() => this.handleClaimCredit()}>
<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' }}>
...@@ -548,7 +551,7 @@ class Home extends React.Component { ...@@ -548,7 +551,7 @@ class Home extends React.Component {
{this.state.old_balance_claimed == false ? ( {this.state.old_balance_claimed == false ? (
<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' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : 200.000 </Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text>
<View style={{ justifyContent: 'center' }}> <View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}> <TouchableOpacity onPress={() => this.handleClaimCredit()}>
<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' }}>
...@@ -605,15 +608,15 @@ class Home extends React.Component { ...@@ -605,15 +608,15 @@ class Home extends React.Component {
</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> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={{justifyContent:'center',flex:1}}> <View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.handleuseBalance()}> <TouchableOpacity onPress={() => this.handleuseBalance()}>
<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('usebalance')}</Text> <Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('usebalance')}</Text>
......
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