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
96eb77fc
Commit
96eb77fc
authored
Jun 08, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
outlet_id di set hanya ketika kosong
parent
18dd3607
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
Home.js
view/Home.js
+23
-4
No files found.
view/Home.js
View file @
96eb77fc
...
@@ -36,12 +36,24 @@ class Home extends React.Component {
...
@@ -36,12 +36,24 @@ class Home extends React.Component {
componentDidMount
()
{
componentDidMount
()
{
console
.
log
(
'ini outlet id'
+
this
.
props
.
outlet_id
)
console
.
log
(
'ini nama outlet '
+
this
.
props
.
name_outlet
)
console
.
log
(
'ini alamat outlet '
+
this
.
props
.
outlet_detailadress
)
const
screenWidth
=
Math
.
round
(
Dimensions
.
get
(
'window'
).
width
);
const
screenWidth
=
Math
.
round
(
Dimensions
.
get
(
'window'
).
width
);
this
.
setState
({
this
.
setState
({
slider_height
:
screenWidth
slider_height
:
screenWidth
})
})
this
.
_account
();
this
.
_account
();
this
.
_getPermissions
()
if
(
this
.
props
.
outlet_id
==
''
&&
this
.
props
.
name_outlet
==
''
&&
this
.
props
.
outlet_detailadress
==
''
)
{
this
.
_getPermissions
()
}
else
{
this
.
setState
({
indicator
:
false
})
}
this
.
_renderCarousell
()
this
.
_renderCarousell
()
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
...
@@ -49,7 +61,13 @@ class Home extends React.Component {
...
@@ -49,7 +61,13 @@ class Home extends React.Component {
indicator
:
true
,
indicator
:
true
,
})
})
this
.
_account
();
this
.
_account
();
this
.
_getPermissions
()
if
(
this
.
props
.
outlet_id
==
''
&&
this
.
props
.
name_outlet
==
''
&&
this
.
props
.
outlet_detailadress
==
''
)
{
this
.
_getPermissions
()
}
else
{
this
.
setState
({
indicator
:
false
})
}
this
.
_renderCarousell
()
this
.
_renderCarousell
()
});
});
...
@@ -195,7 +213,7 @@ class Home extends React.Component {
...
@@ -195,7 +213,7 @@ class Home extends React.Component {
_orderNow
=
()
=>
{
_orderNow
=
()
=>
{
if
(
this
.
props
.
outlet_id
!=
''
&&
this
.
props
.
name_outlet
!=
''
)
{
if
(
this
.
props
.
outlet_id
!=
''
&&
this
.
props
.
name_outlet
!=
''
)
{
this
.
props
.
setTypePickup
(
true
)
//
this.props.setTypePickup(true)
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
screen
:
'MENU'
,
screen
:
'MENU'
,
params
:
{
user
:
'jaxi'
},
params
:
{
user
:
'jaxi'
},
...
@@ -330,7 +348,7 @@ class Home extends React.Component {
...
@@ -330,7 +348,7 @@ class Home extends React.Component {
{i18n.t('orderInfo')}
{i18n.t('orderInfo')}
</Text> */
}
</Text> */
}
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
OUR
DRIVER
WILL
DELIVER
YOUR
ORDER
TO
OUR
DRIVER
WILL
DELIVER
YOUR
ORDER
TO
<
/Text
>
<
/Text
>
{
this
.
state
.
indicator
==
true
?
(
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
size
=
"small"
color
=
"#c9af6d"
/>
<
ActivityIndicator
size
=
"small"
color
=
"#c9af6d"
/>
...
@@ -645,6 +663,7 @@ const mapStateToProps = (state) => {
...
@@ -645,6 +663,7 @@ const mapStateToProps = (state) => {
email
:
state
.
email
,
email
:
state
.
email
,
outlet_id
:
state
.
outlet_id
,
outlet_id
:
state
.
outlet_id
,
name_outlet
:
state
.
name_outlet
,
name_outlet
:
state
.
name_outlet
,
outlet_detailadress
:
state
.
name_outlet
,
session_id
:
state
.
session_id
,
session_id
:
state
.
session_id
,
password
:
state
.
password
,
password
:
state
.
password
,
fb_token
:
state
.
fb_token
,
fb_token
:
state
.
fb_token
,
...
...
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