Commit 972fa6ef authored by Trisno's avatar Trisno

benerin logic metode pembayaran use balance

parent f95ead32
......@@ -396,14 +396,14 @@ class Home extends React.Component {
// style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 15 }}>TOP UP BALANCE </Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>TOP UP BALANCE </Text>
</View>
</TouchableOpacity>
<TouchableOpacity
// style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={() => this._useBalance()}>
<View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 15 }}>USE BALANCE </Text>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>USE BALANCE </Text>
</View>
</TouchableOpacity>
</View>
......@@ -491,8 +491,7 @@ const styles = StyleSheet.create({
height: 40,
top: 20,
margin: 5,
padding: 10,
paddingBottom : 10,
paddingVertical : 12,
paddingHorizontal: 16,
borderRadius: 10,
backgroundColor: '#CFB368',
......
......@@ -61,10 +61,10 @@ class UseBalance extends React.Component {
// // Buat Debug
// this.setState({
// current_balance: '5,000',
// kaspro_point: '10,000',
// kasproBalance: '5,000'.replace(/,/g, ''),
// kasproPoint: '10,000'.replace(/,/g, '')
// current_balance: '500,000',
// kaspro_point: '0',
// kasproBalance: '500,000'.replace(/,/g, ''),
// kasproPoint: '0'.replace(/,/g, '')
// })
// console.log("INI SESSION " + this.props.session_id)
......@@ -428,7 +428,7 @@ class UseBalance extends React.Component {
</View>
<View style={{ alignItems: 'center' }}>
{
this.state.input_redeem == 0 || parseInt(this.state.input_redeem) > parseInt(this.state.kasproPoint) + parseInt(this.state.kasproBalance) ? (
this.state.input_redeem == 0 || this.state.kasproPoint == 0 || parseInt(this.state.input_redeem) > parseInt(this.state.kasproPoint) + parseInt(this.state.kasproBalance) ? (
<Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
<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