Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Prasetya Saputra
new_excelso
Commits
0cb5cf69
Commit
0cb5cf69
authored
May 07, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ini terbaru
parent
864a60ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
Item.js
view/Item.js
+3
-2
MenuSelection.js
view/MenuSelection.js
+12
-1
No files found.
view/Item.js
View file @
0cb5cf69
...
@@ -5,7 +5,8 @@ import ActionType from '../redux/globalActionType';
...
@@ -5,7 +5,8 @@ import ActionType from '../redux/globalActionType';
class
Item
extends
React
.
Component
{
class
Item
extends
React
.
Component
{
handleChangeQuantity
=
(
item
,
quantity
)
=>
{
handleChangeQuantity
=
(
item
,
qty
)
=>
{
this
.
props
.
onChange
()
const
order_item
=
{
const
order_item
=
{
id
:
item
.
id
,
id
:
item
.
id
,
code
:
item
.
code
,
code
:
item
.
code
,
...
@@ -15,7 +16,7 @@ class Item extends React.Component {
...
@@ -15,7 +16,7 @@ class Item extends React.Component {
image
:
item
.
image
,
image
:
item
.
image
,
price
:
parseInt
(
item
.
price
),
price
:
parseInt
(
item
.
price
),
}
}
this
.
props
.
changeQuantity
({
item
:
order_item
,
quantity
:
q
uanti
ty
})
this
.
props
.
changeQuantity
({
item
:
order_item
,
quantity
:
qty
})
}
}
render
()
{
render
()
{
...
...
view/MenuSelection.js
View file @
0cb5cf69
...
@@ -245,6 +245,11 @@ class MenuSelection extends React.Component {
...
@@ -245,6 +245,11 @@ class MenuSelection extends React.Component {
}
}
}
}
onChange
(
params
){
console
.
log
(
params
);
}
handleMin
(
item
,
index
)
{
handleMin
(
item
,
index
)
{
const
list_order_item
=
this
.
props
.
order_item
;
const
list_order_item
=
this
.
props
.
order_item
;
let
is_xist
=
list_order_item
.
find
(
row
=>
row
.
id
==
item
.
id
)
let
is_xist
=
list_order_item
.
find
(
row
=>
row
.
id
==
item
.
id
)
...
@@ -294,6 +299,7 @@ class MenuSelection extends React.Component {
...
@@ -294,6 +299,7 @@ class MenuSelection extends React.Component {
item
=
{
item
}
item
=
{
item
}
handleAdd
=
{()
=>
this
.
handleAdd
(
item
,
index
)}
handleAdd
=
{()
=>
this
.
handleAdd
(
item
,
index
)}
handleMin
=
{()
=>
this
.
handleMin
(
item
,
index
)}
handleMin
=
{()
=>
this
.
handleMin
(
item
,
index
)}
onChange
=
{()
=>
this
.
onChange
(
item
,
index
)}
/
>
/
>
)}
)}
keyExtractor
=
{
item
=>
item
.
id
}
keyExtractor
=
{
item
=>
item
.
id
}
...
@@ -307,7 +313,10 @@ class MenuSelection extends React.Component {
...
@@ -307,7 +313,10 @@ class MenuSelection extends React.Component {
<
View
style
=
{{
flexDirection
:
'row'
,
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
margin
:
10
}}
>
Price
Estimation
/
Item
{
this
.
props
.
order_quantity
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
margin
:
10
}}
>
Price
Estimation
/
Item
{
this
.
props
.
order_quantity
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
margin
:
10
}}
>
Ongkir
{
this
.
props
.
grabamount
}
<
/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
>
<
Text
style
=
{{
fontSize
:
20
,
margin
:
10
,
marginBottom
:
10
}}
>
Rp
.
{
this
.
props
.
order_total
}
<
/Text
>
<
/View
>
<
/View
>
...
@@ -348,6 +357,7 @@ const styles = StyleSheet.create({
...
@@ -348,6 +357,7 @@ const styles = StyleSheet.create({
const
mapStateToProps
=
(
state
)
=>
{
const
mapStateToProps
=
(
state
)
=>
{
return
{
return
{
type_pickup
:
state
.
type_pickup
,
session_id
:
state
.
session_id
,
session_id
:
state
.
session_id
,
grabamount
:
state
.
grabamount
,
grabamount
:
state
.
grabamount
,
outlet_id
:
state
.
outlet_id
,
outlet_id
:
state
.
outlet_id
,
...
@@ -387,6 +397,7 @@ const mapDispatchToProps = (dispacth) => {
...
@@ -387,6 +397,7 @@ const mapDispatchToProps = (dispacth) => {
name_outlet
:
OutletChange
.
name_outlet
,
name_outlet
:
OutletChange
.
name_outlet
,
}
}
}),
}),
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment