Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_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
clone_excelso
Commits
398b4176
Commit
398b4176
authored
May 19, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tambah gambar di menu confirmation
parent
4f26555d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
MenuConfirmation.js
view/MenuConfirmation.js
+21
-18
No files found.
view/MenuConfirmation.js
View file @
398b4176
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
Alert
,
TouchableOpacity
,
StyleSheet
,
Button
,
ScrollView
}
from
'react-native'
;
import
{
View
,
Text
,
Alert
,
TouchableOpacity
,
StyleSheet
,
Button
,
ScrollView
,
Image
}
from
'react-native'
;
import
Axios
from
'axios'
import
Axios
from
'axios'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
...
@@ -245,25 +245,28 @@ class MenuConfirmation extends React.Component {
...
@@ -245,25 +245,28 @@ class MenuConfirmation extends React.Component {
)
)
}
}
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
10
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
margin
Horizontal
:
10
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Pesanan
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Pesanan
<
/Text
>
<
/View
>
<
/View
>
{
{
this
.
props
.
order_item
.
map
((
item
,
index
)
=>
{
this
.
props
.
order_item
.
map
((
item
,
index
)
=>
{
total
=
total
+
item
.
quantity
*
item
.
price
total
=
total
+
item
.
quantity
*
item
.
price
return
(
return
(
<
View
style
=
{{
margin
:
1
0
}}
key
=
{
index
}
>
<
View
style
=
{{
margin
:
0
}}
key
=
{
index
}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-around'
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-around'
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'center'
}}
>
<
Image
source
=
{{
uri
:
item
.
image
}}
style
=
{{
height
:
50
,
width
:
50
,
borderRadius
:
5
}}
><
/Image
>
<
/View
>
<
View
style
=
{{
flex
:
0.1
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
quantity
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
quantity
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.1
,
alignItems
:
'flex-start'
}}
>
<
View
style
=
{{
flex
:
0.1
,
alignItems
:
'flex-start'
,
justifyContent
:
'center'
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
x
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
x
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'baseline'
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
name
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
quantity
*
item
.
price
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
quantity
*
item
.
price
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -293,26 +296,26 @@ class MenuConfirmation extends React.Component {
...
@@ -293,26 +296,26 @@ class MenuConfirmation extends React.Component {
<
/
>
<
/
>
)
)
}
}
<
View
style
=
{{
borderTopWidth
:
1
,
margin
:
10
,
paddingLeft
:
10
,
padding
:
20
,
paddingBottom
:
-
10
}}
>
<
View
style
=
{{
borderTopWidth
:
1
,
margin
Horizontal
:
10
,
paddingLeft
:
10
,
padding
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Payment
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Payment
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
Direction
:
'row'
,
justifyContent
:
'space-between'
,
margin
:
10
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
margin
:
10
,
paddingLeft
:
1
0
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
paddingLeft
:
2
0
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Balance
Used
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Balance
Used
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
10
,
paddingRight
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
alignItems
:
'flex-end'
,
paddingRight
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
route
.
params
.
balanceUsed
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
route
.
params
.
balanceUsed
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
Direction
:
'row'
,
justifyContent
:
'space-between'
,
margin
:
10
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
margin
:
10
,
paddingLeft
:
1
0
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
paddingLeft
:
2
0
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Point
Used
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Point
Used
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
10
,
paddingRight
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
alignItems
:
'flex-end'
,
paddingRight
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
route
.
params
.
pointused
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
route
.
params
.
pointused
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
borderTopWidth
:
1
,
margin
:
10
,
paddingLeft
:
10
,
padding
:
20
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
borderTopWidth
:
1
,
margin
:
10
,
paddingLeft
:
10
,
padding
:
10
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Harga
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Harga
<
/Text
>
<
/View
>
<
/View
>
...
@@ -348,17 +351,17 @@ class MenuConfirmation extends React.Component {
...
@@ -348,17 +351,17 @@ class MenuConfirmation extends React.Component {
<
/View
>
<
/View
>
)
)
}
}
<
View
style
=
{{
margin
:
10
,
marginTop
:
-
10
,
paddingLeft
:
10
,
padding
:
20
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
margin
Horizontal
:
7
,
paddingHorizontal
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
Total
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
Total
<
/Text
>
<
/View
>
<
/View
>
{
{
this
.
props
.
value_voucher
==
''
?
(
this
.
props
.
value_voucher
==
''
?
(
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
,
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
{
this
.
props
.
order_total
+
this
.
props
.
grabamount
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
{
this
.
props
.
order_total
+
this
.
props
.
grabamount
}
<
/Text
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
,
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
)}
<
/Text
>
<
/View
>
<
/View
>
)
)
...
...
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