Commit 53a2ec51 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

item

parent 0594aa98
{
"expo": {
"name": "Excelso_update v1.06062020",
"name": "Excelso_update v1.08.05.2020",
"slug": "excelso-pro",
"privacy": "public",
"sdkVersion": "36.0.0",
......
......@@ -4065,9 +4065,9 @@
"integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg=="
},
"html-entities": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8="
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz",
"integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA=="
},
"htmlparser2": {
"version": "4.1.0",
......
......@@ -604,9 +604,9 @@ const rootReducer = (state = globalState, action) => {
let list_menu = []
let list_item = []
// ini kalau sudah ada diupdate
if (!isNaN(parseInt(new_quantity))) {
if (!isNaN(parseInt(new_quantity))) {
console.log('Number : ' + parseInt(new_quantity))
exist = false
for (let i = 0; i < state.order_item.length; i++) {
const row = state.order_item[i];
......
......@@ -284,7 +284,7 @@ class Home extends React.Component {
<TouchableOpacity style={styles.submitUpgradePemium} activeOpacity={.5} onPress={this.onPress}>
<Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>TOP BALANCE </Text>
</TouchableOpacity>
<Text>UPDATE SORE </Text>
<Text>8 May 2019 </Text>
<View style={{ height: 60 }}></View>
</View>
</View>
......
......@@ -5,18 +5,32 @@ import ActionType from '../redux/globalActionType';
class Item extends React.Component {
constructor(props) {
super(props)
this.state = {
value: 0
}
}
handleChangeQuantity = (item, qty) => {
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: qty })
if (qty == '') {
qty=0
} else {
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: qty })
console.log("ini udah masuk sini");
}
}
render() {
......
......@@ -6,8 +6,12 @@ import ActionType from '../redux/globalActionType';
class ItemShoping extends React.Component {
handleChangeQuantity = (item, quantity) => {
// console.log('CHange Quantity Shopping CHart : ' + JSON.stringify(item))
// console.log('new quantity : ' + quantity)
console.log('CHange Quantity Shopping CHart : ' + JSON.stringify(item))
console.log('new quantity : ' + quantity)
if (quantity == '') {
item.quantity = 1
}
this.props.onChange()
const order_item = {
id: item.id,
......
......@@ -299,7 +299,6 @@ 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}
......
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