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
ed83fa43
Commit
ed83fa43
authored
Sep 28, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
parents
c874d5d8
1be80f50
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
38 deletions
+52
-38
PickupName.js
view/PickupName.js
+47
-38
ShoppingCart.js
view/ShoppingCart.js
+5
-0
No files found.
view/PickupName.js
View file @
ed83fa43
...
@@ -28,7 +28,7 @@ class PickupName extends React.Component {
...
@@ -28,7 +28,7 @@ class PickupName extends React.Component {
data_before_search
:
[],
data_before_search
:
[],
spinner
:
false
,
spinner
:
false
,
indicator
:
true
,
indicator
:
true
,
caretHidden
:
true
caretHidden
:
true
}
}
}
}
...
@@ -69,7 +69,7 @@ class PickupName extends React.Component {
...
@@ -69,7 +69,7 @@ class PickupName extends React.Component {
state_add_remove_voucher
:
false
state_add_remove_voucher
:
false
})
})
this
.
props
.
removeVoucher
()
this
.
props
.
removeVoucher
()
}
else
{
}
else
{
let
voucherProps
=
{
let
voucherProps
=
{
value_voucher
:
res
.
data
.
reward
,
value_voucher
:
res
.
data
.
reward
,
voucher
:
res
.
data
.
reward
voucher
:
res
.
data
.
reward
...
@@ -83,6 +83,7 @@ class PickupName extends React.Component {
...
@@ -83,6 +83,7 @@ class PickupName extends React.Component {
})
})
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
error
)
try
{
try
{
let
response
=
error
.
response
.
data
let
response
=
error
.
response
.
data
Alert
.
alert
(
""
,
response
.
msg
)
Alert
.
alert
(
""
,
response
.
msg
)
...
@@ -130,8 +131,8 @@ class PickupName extends React.Component {
...
@@ -130,8 +131,8 @@ class PickupName extends React.Component {
if
(
this
.
props
.
value_voucher
!==
""
)
{
if
(
this
.
props
.
value_voucher
!==
""
)
{
this
.
handleVoucherSelect
()
this
.
handleVoucherSelect
()
}
}
else
{
let
OutletChange
=
{
let
OutletChange
=
{
outlet_id
:
id
,
outlet_id
:
id
,
name_outlet
:
name
,
name_outlet
:
name
,
...
@@ -152,7 +153,6 @@ class PickupName extends React.Component {
...
@@ -152,7 +153,6 @@ class PickupName extends React.Component {
}
}
}
}
}
getOutlet
()
{
getOutlet
()
{
this
.
setState
({
this
.
setState
({
...
@@ -162,7 +162,7 @@ class PickupName extends React.Component {
...
@@ -162,7 +162,7 @@ class PickupName extends React.Component {
session_id
:
this
.
props
.
session_id
session_id
:
this
.
props
.
session_id
}
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
"crm/v2/outlet/get_list"
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
"crm/v2/outlet/get_list"
,
params
).
then
(
res
=>
{
let
dataOutlets
=
res
.
data
.
outlets
;
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
++
)
{
for
(
let
i
=
0
;
i
<
dataOutlets
.
length
;
i
++
)
{
...
@@ -281,7 +281,7 @@ class PickupName extends React.Component {
...
@@ -281,7 +281,7 @@ class PickupName extends React.Component {
:
(
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
"#ccb46c"
}}
>
{
i18n
.
t
(
'closed'
)}
<
/Text>
)
}
:
(
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
"#ccb46c"
}}
>
{
i18n
.
t
(
'closed'
)}
<
/Text>
)
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'openinghours'
)}
:
{
item
.
open_time
}
-
{
item
.
close_time
}
<
/Text
>
<
Text
style
=
{{
margin
:
5
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'openinghours'
)}
:
{
item
.
open_time
}
-
{
item
.
close_time
}
<
/Text
>
<
Text
style
=
{{
margin
:
5
,
color
:
'#b1b1b2'
,
fontFamily
:
'Gotham-Light'
}}
>
<
Text
style
=
{{
margin
:
5
,
color
:
'#b1b1b2'
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
full_address
}
{
item
.
full_address
}
<
/Text
>
<
/Text
>
...
@@ -366,7 +366,7 @@ class PickupName extends React.Component {
...
@@ -366,7 +366,7 @@ class PickupName extends React.Component {
onClear
=
{
text
=>
this
.
filterData
(
''
)}
onClear
=
{
text
=>
this
.
filterData
(
''
)}
value
=
{
this
.
state
.
search
}
value
=
{
this
.
state
.
search
}
caretHidden
=
{
this
.
state
.
caretHidden
}
caretHidden
=
{
this
.
state
.
caretHidden
}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
><
/TextInput
>
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
><
/TextInput
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
}}
>
<
Ionicons
name
=
"ios-search"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
Ionicons
name
=
"ios-search"
size
=
{
32
}
color
=
"#ccb46c"
/>
...
@@ -454,6 +454,15 @@ const mapDispatchToProps = (dispacth) => {
...
@@ -454,6 +454,15 @@ const mapDispatchToProps = (dispacth) => {
removeVoucher
:
()
=>
dispacth
({
removeVoucher
:
()
=>
dispacth
({
type
:
ActionType
.
REMOVE_VOUCHER
type
:
ActionType
.
REMOVE_VOUCHER
}),
}),
setVoucher
:
(
voucherProps
)
=>
dispacth
({
type
:
ActionType
.
SET_VOUCHER
,
data
:
{
voucher
:
voucherProps
.
voucher
,
value_voucher
:
voucherProps
.
value_voucher
,
}
}),
}
}
}
}
...
...
view/ShoppingCart.js
View file @
ed83fa43
...
@@ -78,6 +78,11 @@ class ShoppingCart extends React.Component {
...
@@ -78,6 +78,11 @@ class ShoppingCart extends React.Component {
}
}
}
}
if
(
this
.
props
.
value_voucher
!==
""
)
{
this
.
checkExpiredReward
()
}
});
});
if
(
this
.
props
.
value_voucher
!==
""
)
{
if
(
this
.
props
.
value_voucher
!==
""
)
{
...
...
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