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
20ab641b
Commit
20ab641b
authored
Jun 10, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter pickup
parent
f7eeee7f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
83 deletions
+89
-83
PickupName.js
view/PickupName.js
+89
-83
No files found.
view/PickupName.js
View file @
20ab641b
...
...
@@ -65,7 +65,7 @@ class PickupName extends React.Component {
this
.
getOutlet
()
}
getOutletDetail
(
id
,
name
,
address
)
{
getOutletDetail
(
id
,
name
,
address
)
{
let
OutletChange
=
{
outlet_id
:
id
,
...
...
@@ -103,7 +103,7 @@ class PickupName extends React.Component {
Axios
.
post
(
"https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_list"
,
params
).
then
(
res
=>
{
let
dataOutlets
=
res
.
data
.
outlets
;
console
.
log
(
"INI ADALAH DATA OUTLETS : "
+
JSON
.
stringify
(
dataOutlets
))
//
console.log("INI ADALAH DATA OUTLETS : " + JSON.stringify(dataOutlets))
for
(
let
i
=
0
;
i
<
dataOutlets
.
length
;
i
++
)
{
dataOutlets
[
i
][
'distance'
]
=
this
.
distance
(
dataOutlets
[
i
][
'lat'
],
dataOutlets
[
i
][
'long'
]);
let
address
=
dataOutlets
[
i
][
'address'
];
...
...
@@ -201,11 +201,13 @@ class PickupName extends React.Component {
RenderItem
=
({
item
})
=>
{
return
(
<
View
>
{
item
.
can_accept_order
==
true
?
(
{
item
.
pickup
==
true
?
(
item
.
can_accept_order
==
true
?
(
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
getOutletDetail
(
item
.
id
,
item
.
name
,
item
.
full_address
)}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
getOutletDetail
(
item
.
id
,
item
.
name
,
item
.
full_address
)}
>
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
}}
>
<
View
style
=
{{
top
:
10
}}
>
<
View
style
=
{{
top
:
10
}}
>
<
MaterialCommunityIcons
name
=
"map-marker"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
/View
>
<
View
style
=
{
styles
.
list_addrees
}
>
...
...
@@ -237,9 +239,9 @@ class PickupName extends React.Component {
<
/View
>
)
:
(
<
View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
Alert
.
alert
(
''
,
'Mohon Maaf Outlet Tutup !'
)}
>
<
TouchableOpacity
onPress
=
{()
=>
Alert
.
alert
(
''
,
'Mohon Maaf Outlet Tutup !'
)}
>
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
}}
>
<
View
style
=
{{
top
:
10
}}
>
<
View
style
=
{{
top
:
10
}}
>
<
MaterialCommunityIcons
name
=
"map-marker"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
/View
>
<
View
style
=
{
styles
.
list_addrees
}
>
...
...
@@ -270,7 +272,11 @@ class PickupName extends React.Component {
<
/TouchableOpacity
>
<
/View
>
<
/View>
)
}
<
/View>
)
)
:
(
null
)
}
<
/View
>
...
...
@@ -287,7 +293,7 @@ class PickupName extends React.Component {
/> */
}
<
View
style
=
{
styles
.
searchbar
}
>
<
View
style
=
{{
height
:
45
,
borderRadius
:
10
,
borderColor
:
'#ccb46c'
,
borderWidth
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1
,
top
:
5
}}
>
<
View
style
=
{{
flex
:
1
,
top
:
5
}}
>
<
MaterialCommunityIcons
name
=
"map-marker"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
/View
>
<
View
style
=
{{
flex
:
6
}}
>
...
...
@@ -345,9 +351,9 @@ const styles = StyleSheet.create({
searchbar
:
{
flex
:
0.5
,
justifyContent
:
'center'
,
top
:
10
,
top
:
10
,
marginRight
:
20
,
marginLeft
:
20
,
marginLeft
:
20
,
}
})
...
...
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