Commit 987b2cca authored by Trisno's avatar Trisno

update

parent 3d11b3d8
......@@ -20,6 +20,8 @@ class ShoppingCart extends React.Component {
checkedBalancePoint: false,
balanceused: 0,
pointsused: 0,
// dummyBalance : 155000,
// dummyPoint : 20000
}
}
......@@ -75,10 +77,20 @@ class ShoppingCart extends React.Component {
checkedBalance: false,
checkedPoint: false,
checkedBalancePoint: true,
pointsused : this.state.kasproPoint,
balanceused : this.props.order_total - this.state.kasproPoint
// balanceused : this.props.order_total - this.state.dummyPoint,
// pointsused : this.props.order_total,
})
if (this.state.kasproPoint - this.props.order_total >= -1 ) {
this.setState({
pointsused: this.props.order_total
})
} else {
this.setState({
balanceused : this.props.order_total - this.state.kasproPoint,
pointsused : this.state.kasproPoint
})
}
......@@ -168,6 +180,11 @@ class ShoppingCart extends React.Component {
})}
</View>
<View style={styles.voucher}>
<TouchableOpacity>
<Text style={{ color: '#ccb46c' }}>+ ADD VOUCHER</Text>
</TouchableOpacity>
</View>
<View style={styles.payment}>
<Text>PAYMENT METHODS</Text>
......@@ -251,7 +268,7 @@ class ShoppingCart extends React.Component {
</View>
<View style={{ alignItems: 'center' }}>
{
this.state.kasproPoint + this.state.kasproBalance >= this.props.order_total && this.state.kasproBalance != 0 ? (
this.state.kasproPoint + this.state.kasproBalance >= this.props.order_total && this.state.kasproBalance != 0 && this.state.kasproPoint != 0 ? (
<TouchableOpacity onPress={() => {
this.checkedSelection('balancepoint')
}}>
......@@ -313,17 +330,11 @@ class ShoppingCart extends React.Component {
</Card>
</View>
<View style={styles.voucher}>
<TouchableOpacity>
<Text style={{ color: '#ccb46c' }}>+ ADD VOUCHER</Text>
</TouchableOpacity>
</View>
<View style={styles.paymentDetails}>
<Text>PAYMENT DETAILS</Text>
</View>
<View style={{ margin: 10 }}>
<Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Detail Pembayaran</Text>
{/* <Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Detail Pembayaran</Text> */}
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View>
<Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Harga</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