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
c5af5e89
Commit
c5af5e89
authored
May 04, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ini udah bisa
parent
9e0f0674
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
Home.js
view/Home.js
+3
-0
MenuSelection.js
view/MenuSelection.js
+15
-4
OrderHistory.js
view/OrderHistory.js
+5
-2
No files found.
view/Home.js
View file @
c5af5e89
...
@@ -34,6 +34,9 @@ class Home extends React.Component {
...
@@ -34,6 +34,9 @@ class Home extends React.Component {
this
.
_renderCarousell
()
this
.
_renderCarousell
()
this
.
_account
();
this
.
_account
();
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
setState
({
indicator
:
true
,
})
this
.
_getPermissions
()
this
.
_getPermissions
()
this
.
_renderCarousell
()
this
.
_renderCarousell
()
this
.
_account
();
this
.
_account
();
...
...
view/MenuSelection.js
View file @
c5af5e89
...
@@ -26,6 +26,7 @@ class MenuSelection extends React.Component {
...
@@ -26,6 +26,7 @@ class MenuSelection extends React.Component {
componentDidMount
()
{
componentDidMount
()
{
if
(
this
.
props
.
outlet_id
!=
''
)
{
if
(
this
.
props
.
outlet_id
!=
''
)
{
this
.
getMenuList
()
this
.
getMenuList
()
}
else
{
}
else
{
Alert
.
alert
(
'Device belum mendapatkan lokasi anda'
)
Alert
.
alert
(
'Device belum mendapatkan lokasi anda'
)
...
@@ -33,6 +34,9 @@ class MenuSelection extends React.Component {
...
@@ -33,6 +34,9 @@ class MenuSelection extends React.Component {
console
.
log
(
"INI OUTLET : "
+
this
.
props
.
outlet_id
)
console
.
log
(
"INI OUTLET : "
+
this
.
props
.
outlet_id
)
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
if
(
this
.
props
.
outlet_id
!=
''
)
{
if
(
this
.
props
.
outlet_id
!=
''
)
{
this
.
setState
({
indicator
:
true
})
this
.
getMenuList
()
this
.
getMenuList
()
}
else
{
}
else
{
Alert
.
alert
(
'Device belum mendapatkan lokasi anda'
)
Alert
.
alert
(
'Device belum mendapatkan lokasi anda'
)
...
@@ -221,10 +225,17 @@ class MenuSelection extends React.Component {
...
@@ -221,10 +225,17 @@ class MenuSelection extends React.Component {
)}
)}
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
shadow
}
>
<
View
style
=
{
styles
.
shadow
}
>
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
style
=
{{
top
:
10
}}
size
=
"large"
color
=
"#c9af6d"
/>
):(
<
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
:
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
>
)
}
<
View
>
<
View
>
<
Button
title
=
"VIEW CART"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Shopping Cart'
)}
><
/Button
>
<
Button
title
=
"VIEW CART"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Shopping Cart'
)}
><
/Button
>
<
/View
>
<
/View
>
...
...
view/OrderHistory.js
View file @
c5af5e89
...
@@ -18,9 +18,12 @@ class OrderHistory extends React.Component {
...
@@ -18,9 +18,12 @@ class OrderHistory extends React.Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getOrderHistory
()
this
.
getOrderHistory
()
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
return
(
this
.
setState
({
indicator
:
true
,
})
this
.
getOrderHistory
()
this
.
getOrderHistory
()
)
});
});
}
}
...
...
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