Commit 987b2cca authored by Trisno's avatar Trisno

update

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