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
fe11b661
Commit
fe11b661
authored
Jun 06, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apabila keterangan kosong tidak di tampilkan
parent
7f8bd94c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
31 deletions
+46
-31
MenuConfirmation.js
view/MenuConfirmation.js
+9
-3
OrderDetail.js
view/OrderDetail.js
+37
-28
No files found.
view/MenuConfirmation.js
View file @
fe11b661
...
@@ -118,7 +118,7 @@ class MenuConfirmation extends React.Component {
...
@@ -118,7 +118,7 @@ class MenuConfirmation extends React.Component {
console
.
log
(
error
.
response
)
console
.
log
(
error
.
response
)
if
(
error
.
response
.
status
<=
500
)
{
if
(
error
.
response
.
status
<=
500
)
{
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
''
,
response
.
msg
);
Alert
.
alert
(
''
,
response
.
msg
);
}
else
{
}
else
{
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
''
,
response
.
msg
);
Alert
.
alert
(
''
,
response
.
msg
);
...
@@ -213,7 +213,7 @@ class MenuConfirmation extends React.Component {
...
@@ -213,7 +213,7 @@ class MenuConfirmation extends React.Component {
render
()
{
render
()
{
// console.log(this.props.
session_id
)
// console.log(this.props.
order_item
)
let
total
=
0
let
total
=
0
return
(
return
(
<
ScrollView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
container
}
>
...
@@ -276,7 +276,13 @@ class MenuConfirmation extends React.Component {
...
@@ -276,7 +276,13 @@ class MenuConfirmation extends React.Component {
</View> */
}
</View> */
}
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
alignItems
:
'flex-start'
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
alignItems
:
'flex-start'
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
note
}
<
/Text
>
{
item
.
note
==
undefined
?
(
null
)
:
(
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Keterangan
:
{
item
.
note
}
<
/Text
>
)
}
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
paddingRight
:
5
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
paddingRight
:
5
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color:'#838383' }}>{item.quantity * item.price} </Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color:'#838383' }}>{item.quantity * item.price} </Text> */
}
...
...
view/OrderDetail.js
View file @
fe11b661
...
@@ -56,7 +56,7 @@ class OrderDetail extends React.Component {
...
@@ -56,7 +56,7 @@ class OrderDetail extends React.Component {
})
})
}
}
handleBack
(){
handleBack
()
{
this
.
setState
({
this
.
setState
({
modalVisible
:
false
modalVisible
:
false
})
})
...
@@ -64,8 +64,8 @@ class OrderDetail extends React.Component {
...
@@ -64,8 +64,8 @@ class OrderDetail extends React.Component {
handleOrderCancel
()
{
handleOrderCancel
()
{
if
(
this
.
state
.
reason
==
''
)
{
if
(
this
.
state
.
reason
==
''
)
{
Alert
.
alert
(
''
,
'Reason must be filled !'
)
Alert
.
alert
(
''
,
'Reason must be filled !'
)
}
else
{
}
else
{
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
,
session_id
:
this
.
props
.
session_id
,
transaction_id
:
this
.
props
.
route
.
params
.
idTrans
,
transaction_id
:
this
.
props
.
route
.
params
.
idTrans
,
...
@@ -78,7 +78,7 @@ class OrderDetail extends React.Component {
...
@@ -78,7 +78,7 @@ class OrderDetail extends React.Component {
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
screen
:
'ORDER'
});
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
screen
:
'ORDER'
});
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
''
,
response
.
msg
);
Alert
.
alert
(
''
,
response
.
msg
);
})
})
this
.
setState
({
this
.
setState
({
modalVisible
:
false
modalVisible
:
false
...
@@ -96,24 +96,24 @@ class OrderDetail extends React.Component {
...
@@ -96,24 +96,24 @@ class OrderDetail extends React.Component {
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail'
,
params
).
then
(
res
=>
{
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
let
data
=
res
.
data
if
(
data
.
trans_status_display
==
'On Queue'
)
{
if
(
data
.
trans_status_display
==
'On Queue'
)
{
data
.
trans_status_display
=
'Queueing'
data
.
trans_status_display
=
'Queueing'
}
else
}
else
if
(
data
.
trans_status_display
==
'On Process'
)
{
if
(
data
.
trans_status_display
==
'On Process'
)
{
data
.
trans_status_display
=
'Processing'
data
.
trans_status_display
=
'Processing'
}
else
}
else
if
(
data
.
trans_status_display
==
'Ready to Pickup'
)
{
if
(
data
.
trans_status_display
==
'Ready to Pickup'
)
{
data
.
trans_status_display
=
'Ready for Pickup'
data
.
trans_status_display
=
'Ready for Pickup'
}
else
}
else
if
(
data
.
trans_status_display
==
'On Delivery'
)
{
if
(
data
.
trans_status_display
==
'On Delivery'
)
{
data
.
trans_status_display
=
'Delivering'
data
.
trans_status_display
=
'Delivering'
}
else
}
else
if
(
data
.
trans_status_display
==
'On Completed'
)
{
if
(
data
.
trans_status_display
==
'On Completed'
)
{
data
.
trans_status_display
=
'Completed'
data
.
trans_status_display
=
'Completed'
}
else
}
else
if
(
data
.
trans_status_display
==
'Cancelled'
)
{
if
(
data
.
trans_status_display
==
'Cancelled'
)
{
data
.
trans_status_display
=
'Cancelled'
data
.
trans_status_display
=
'Cancelled'
}
}
// console.log(data.trans_status_display)
// console.log(data.trans_status_display)
// console.log("INI OUTLET "+ data.outlet)
// console.log("INI OUTLET "+ data.outlet)
...
@@ -146,6 +146,7 @@ class OrderDetail extends React.Component {
...
@@ -146,6 +146,7 @@ class OrderDetail extends React.Component {
render
()
{
render
()
{
// console.log(this.state.detail_trans)
// console.log(this.state.detail_trans)
// console.log(this.state.detail_trans.used_reward)
// console.log(this.state.detail_trans.used_reward)
console
.
log
(
this
.
state
.
transaction_detail
)
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
Modal
animationType
=
"slide"
<
Modal
animationType
=
"slide"
...
@@ -169,13 +170,13 @@ class OrderDetail extends React.Component {
...
@@ -169,13 +170,13 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
<
View
>
<
View
>
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
5
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
margin
:
5
,
flexDirection
:
'row'
}}
>
<
TouchableOpacity
style
=
{{
margin
:
5
}}
onPress
=
{()
=>
this
.
handleOrderCancel
()}
>
<
TouchableOpacity
style
=
{{
margin
:
5
}}
onPress
=
{()
=>
this
.
handleOrderCancel
()}
>
<
View
style
=
{
styles
.
button2
}
>
<
View
style
=
{
styles
.
button2
}
>
<
Text
style
=
{{
color
:
'white'
,
fontWeight
:
'bold'
,
fontSize
:
16
}}
>
Cancel
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontWeight
:
'bold'
,
fontSize
:
16
}}
>
Cancel
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{{
margin
:
5
}}
onPress
=
{()
=>
this
.
handleBack
()}
>
<
TouchableOpacity
style
=
{{
margin
:
5
}}
onPress
=
{()
=>
this
.
handleBack
()}
>
<
View
style
=
{
styles
.
button2
}
>
<
View
style
=
{
styles
.
button2
}
>
<
Text
style
=
{{
color
:
'white'
,
fontWeight
:
'bold'
,
fontSize
:
16
}}
>
Back
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontWeight
:
'bold'
,
fontSize
:
16
}}
>
Back
<
/Text
>
<
/View
>
<
/View
>
...
@@ -245,7 +246,15 @@ class OrderDetail extends React.Component {
...
@@ -245,7 +246,15 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
alignItems
:
'flex-start'
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
alignItems
:
'flex-start'
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
item
.
item_name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
item
.
item_name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
top
:
10
}}
>
Keterangan
:
{
item
.
item_note
}
<
/Text
>
{
item
.
item_note
==
''
?
(
null
)
:
(
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Keterangan
:
{
item
.
item_note
}
<
/Text
>
)
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', top: 10 }}>Keterangan : {item.item_note} </Text> */
}
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
paddingRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
paddingRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.item_quantity * item.item_price} </Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.item_quantity * item.item_price} </Text> */
}
...
@@ -364,10 +373,10 @@ class OrderDetail extends React.Component {
...
@@ -364,10 +373,10 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
{
{
this
.
state
.
trans_status
==
0
?
(
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleCancel
()}
>
this
.
state
.
trans_status
==
0
?
(
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleCancel
()}
>
<
View
style
=
{
styles
.
button
}
>
<
View
style
=
{
styles
.
button
}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
Cancel
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
Cancel
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity>
)
:
(
null
)
<
/TouchableOpacity>
)
:
(
null
)
}
}
{
{
...
...
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