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 { ...@@ -375,12 +375,9 @@ class Account extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text> <Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View> </View>
<View style={{ flex: 0.5 }}> <View style={{ flex: 0.5 }}>
{this.state.is_expired ? ( <Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: this.state.is_expired ? "#d34343" : "" }}>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light', color: '#d34343' }}>Expired {this.state.expire_date}</Text> {i18n.t('expired')} {this.state.expire_date}
) : ( </Text>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>{i18n.t('expired')} {this.state.expire_date}</Text>
)
}
</View> </View>
</View> </View>
<View style={{ paddingHorizontal: 10 }}> <View style={{ paddingHorizontal: 10 }}>
......
...@@ -532,7 +532,8 @@ class Home extends React.Component { ...@@ -532,7 +532,8 @@ class Home extends React.Component {
</Card> </Card>
</View> </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 ? ( this.state.account_number !== "" && this.state.is_expired == false ? (
<View style={styles.card}> <View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}> <Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
...@@ -541,7 +542,9 @@ class Home extends React.Component { ...@@ -541,7 +542,9 @@ class Home extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text> <Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View> </View>
<View style={{ flex: 0.5 }}> <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> </View>
<View style={{ paddingHorizontal: 10 }}> <View style={{ paddingHorizontal: 10 }}>
...@@ -587,6 +590,8 @@ class Home extends React.Component { ...@@ -587,6 +590,8 @@ class Home extends React.Component {
) : (null)} ) : (null)}
</View> </View>
) : ) :
/** If gak punya kaspro, dan sudah expired */
this.state.account_number == "" && this.state.is_expired == true ? ( this.state.account_number == "" && this.state.is_expired == true ? (
<View style={styles.card}> <View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}> <Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
...@@ -595,7 +600,9 @@ class Home extends React.Component { ...@@ -595,7 +600,9 @@ class Home extends React.Component {
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text> <Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View> </View>
<View style={{ flex: 0.5 }}> <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> </View>
<View style={{ paddingHorizontal: 10 }}> <View style={{ paddingHorizontal: 10 }}>
...@@ -648,15 +655,20 @@ class Home extends React.Component { ...@@ -648,15 +655,20 @@ class Home extends React.Component {
</Card>) </Card>)
) : (null)} ) : (null)}
</View> </View>
) : ( ) :
/** punya kaspro ( expired atau tidak ) */
(
<View style={styles.card}> <View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}> <Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
<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' }}>{i18n.t('cardnumber')}</Text> <Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View> </View>
<View style={{ flex: 0.5 }}> <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> </View>
<View style={{ paddingHorizontal: 10 }}> <View style={{ paddingHorizontal: 10 }}>
...@@ -696,6 +708,8 @@ class Home extends React.Component { ...@@ -696,6 +708,8 @@ 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')}>
......
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