Commit 864a60ee authored by Trisno's avatar Trisno

bisa order via change quantity textinput di shopping cart

parent 4e499392
...@@ -6,12 +6,23 @@ import ActionType from '../redux/globalActionType'; ...@@ -6,12 +6,23 @@ import ActionType from '../redux/globalActionType';
class ItemShoping extends React.Component { class ItemShoping extends React.Component {
handleChangeQuantity = (item, quantity) => { handleChangeQuantity = (item, quantity) => {
console.log('CHange Quantity Shopping CHart : ' + JSON.stringify(item)) // console.log('CHange Quantity Shopping CHart : ' + JSON.stringify(item))
console.log('new quantity : ' + quantity) // console.log('new quantity : ' + quantity)
this.props.changeQuantity({item: item, quantity: quantity}) this.props.onChange()
const order_item = {
id: item.id,
code: item.code,
name: item.name,
description: item.description,
note: 'jangan garing',
image: item.image,
price: parseInt(item.price),
}
this.props.changeQuantity({item: order_item, quantity: quantity})
} }
render() { render() {
const { item } = this.props const { item } = this.props
// console.log(this.props)
return ( return (
<View style={{ flex: 1, margin: 10 }} key={item.id}> <View style={{ flex: 1, margin: 10 }} key={item.id}>
......
...@@ -332,7 +332,13 @@ class ShoppingCart extends React.Component { ...@@ -332,7 +332,13 @@ class ShoppingCart extends React.Component {
onChange(){ onChange(){
this.setState({
checkedBalance: false,
checkedPoint: false,
checkedBalancePoint: false,
pointsused: 0,
balanceused: 0
})
} }
checkOut() { checkOut() {
......
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