Commit 0cb5cf69 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

ini terbaru

parent 864a60ee
......@@ -5,7 +5,8 @@ import ActionType from '../redux/globalActionType';
class Item extends React.Component {
handleChangeQuantity = (item, quantity) => {
handleChangeQuantity = (item, qty) => {
this.props.onChange()
const order_item = {
id: item.id,
code: item.code,
......@@ -15,7 +16,7 @@ class Item extends React.Component {
image: item.image,
price: parseInt(item.price),
}
this.props.changeQuantity({ item: order_item, quantity: quantity })
this.props.changeQuantity({ item: order_item, quantity: qty })
}
render() {
......
......@@ -245,6 +245,11 @@ class MenuSelection extends React.Component {
}
}
onChange(params){
console.log(params);
}
handleMin(item, index) {
const list_order_item = this.props.order_item;
let is_xist = list_order_item.find(row => row.id == item.id)
......@@ -294,6 +299,7 @@ class MenuSelection extends React.Component {
item={item}
handleAdd={() => this.handleAdd(item, index)}
handleMin={() => this.handleMin(item, index)}
onChange={()=> this.onChange(item,index)}
/>
)}
keyExtractor={item => item.id}
......@@ -307,7 +313,10 @@ class MenuSelection extends React.Component {
<View style={{ flexDirection: 'row', }}>
<Text style={{ fontSize: 12, margin: 10 }}> Price Estimation / Item {this.props.order_quantity} </Text>
{this.props.type_pickup == true ? (null) : (
<Text style={{ fontSize: 12, margin: 10 }}> Ongkir {this.props.grabamount} </Text>
)}
<Text style={{ fontSize: 20, margin: 10, marginBottom: 10 }}> Rp. {this.props.order_total}</Text>
</View>
......@@ -348,6 +357,7 @@ const styles = StyleSheet.create({
const mapStateToProps = (state) => {
return {
type_pickup: state.type_pickup,
session_id: state.session_id,
grabamount: state.grabamount,
outlet_id: state.outlet_id,
......@@ -387,6 +397,7 @@ const mapDispatchToProps = (dispacth) => {
name_outlet: OutletChange.name_outlet,
}
}),
}
}
......
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