Commit 21d69af5 authored by William Goszal's avatar William Goszal 🚴

fix tulisan expired in gak merah apabila kartu expired

parent d12dd814
......@@ -375,12 +375,9 @@ class Account extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View>
<View style={{ flex: 0.5 }}>
{this.state.is_expired ? (
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: '#d34343' }}>Expired {this.state.expire_date}</Text>
) : (
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>{i18n.t('expired')} {this.state.expire_date}</Text>
)
}
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: this.state.is_expired ? "#d34343" : "" }}>
{i18n.t('expired')} {this.state.expire_date}
</Text>
</View>
</View>
<View style={{ paddingHorizontal: 10 }}>
......
......@@ -532,7 +532,8 @@ class Home extends React.Component {
</Card>
</View>
) :
//jika memeber udah punya account kaspro tapi tidak expired
//jika member udah punya account kaspro tapi tidak expired
this.state.account_number !== "" && this.state.is_expired == false ? (
<View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
......@@ -541,7 +542,9 @@ class Home extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}> {i18n.t('expired')} {this.state.expired}</Text>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>
{i18n.t('expired')} {this.state.expired}
</Text>
</View>
</View>
<View style={{ paddingHorizontal: 10 }}>
......@@ -587,6 +590,8 @@ class Home extends React.Component {
) : (null)}
</View>
) :
/** If gak punya kaspro, dan sudah expired */
this.state.account_number == "" && this.state.is_expired == true ? (
<View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
......@@ -595,7 +600,9 @@ class Home extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: 'red' }}>{i18n.t('expired')} {this.state.expired}</Text>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: 'red' }}>
{i18n.t('expired')} {this.state.expired}
</Text>
</View>
</View>
<View style={{ paddingHorizontal: 10 }}>
......@@ -648,7 +655,10 @@ class Home extends React.Component {
</Card>)
) : (null)}
</View>
) : (
) :
/** punya kaspro ( expired atau tidak ) */
(
<View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
<View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}>
......@@ -656,7 +666,9 @@ class Home extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>{i18n.t('expired')} {this.state.expired}</Text>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: this.state.expired ? "red" : "" }}>
{i18n.t('expired')} {this.state.expired}
</Text>
</View>
</View>
<View style={{ paddingHorizontal: 10 }}>
......@@ -696,6 +708,8 @@ class Home extends React.Component {
</View>
)
}
<View style={{ flexDirection: 'row', flex: 1, height: 40, marginTop: 40 }}>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('TopUpInfo')}>
......
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