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
0714322f
Commit
0714322f
authored
Jun 18, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set base url (2)
parent
01c1429d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
28 deletions
+29
-28
MenuConfirmation.js
view/MenuConfirmation.js
+8
-6
PickupName.js
view/PickupName.js
+4
-2
Renewal.js
view/Renewal.js
+0
-7
RewardHistory.js
view/RewardHistory.js
+3
-2
RewardSelect.js
view/RewardSelect.js
+1
-1
ShoppingCart.js
view/ShoppingCart.js
+5
-4
setBaseUrl.js
view/setBaseUrl.js
+8
-6
No files found.
view/MenuConfirmation.js
View file @
0714322f
...
...
@@ -27,8 +27,9 @@ class MenuConfirmation extends React.Component {
}
componentDidMount
()
{
// console.log("INI URLS : "+this.props.BASE_URL)
// console.log(" DESTINASI : "+ this.props.grabdestination)
console
.
log
(
"ONGKIR"
+
this
.
props
.
grabamount
)
//
console.log("ONGKIR" + this.props.grabamount)
// console.log("drop off"+this.props.grabdropoff)
// console.log("pickup"+this.props.grabpickup)
// console.log("type" +this.props.grabtype)
...
...
@@ -74,7 +75,7 @@ class MenuConfirmation extends React.Component {
// console.log(params)
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/
crm/v2/transaction/booking'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'
crm/v2/transaction/booking'
,
params
).
then
(
res
=>
{
// add API use voucher here
...
...
@@ -85,7 +86,7 @@ class MenuConfirmation extends React.Component {
// long: this.props.long
// }
// Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/reward/use_reward', param).then(res => {
// Axios.post('https://excelsocrm.ravintoladev
s
.com/crm/v2/reward/use_reward', param).then(res => {
// console.log(res.data)
// }).catch(error => {
// const { navigation } = this.props
...
...
@@ -149,7 +150,7 @@ class MenuConfirmation extends React.Component {
// console.log(params)
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/
crm/v2/transaction/booking'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'
crm/v2/transaction/booking'
,
params
).
then
(
res
=>
{
// add API use voucher here
// let param = {
// session_id: this.props.session_id,
...
...
@@ -158,7 +159,7 @@ class MenuConfirmation extends React.Component {
// long: this.props.long
// }
// Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/reward/use_reward', param).then(res => {
// Axios.post('https://excelsocrm.ravintoladev
s
.com/crm/v2/reward/use_reward', param).then(res => {
// console.log(res.data)
// }).catch(error => {
// const { navigation } = this.props
...
...
@@ -561,7 +562,8 @@ const mapStateToProps = (state) => {
name_outlet
:
state
.
name_outlet
,
outlet_detailadress
:
state
.
outlet_detailadress
,
lat
:
state
.
lat
,
long
:
state
.
long
long
:
state
.
long
,
BASE_URL
:
state
.
BASE_URL
,
}
}
...
...
view/PickupName.js
View file @
0714322f
...
...
@@ -35,6 +35,7 @@ class PickupName extends React.Component {
componentDidMount
()
{
this
.
_getPermissions
()
console
.
log
(
"INI BASE : "
+
this
.
props
.
BASE_URL
)
}
...
...
@@ -103,7 +104,7 @@ class PickupName extends React.Component {
session_id
:
this
.
props
.
session_id
}
Axios
.
post
(
"https://excelsocrm.ravintoladev.com/
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
;
// console.log("INI ADALAH DATA OUTLETS : " + JSON.stringify(dataOutlets))
for
(
let
i
=
0
;
i
<
dataOutlets
.
length
;
i
++
)
{
...
...
@@ -398,7 +399,8 @@ const mapStateToProps = (state) => {
outlet_id
:
state
.
outlet_id
,
name_outlet
:
state
.
name_outlet
,
outlet_detailadress
:
state
.
outlet_detailadress
,
language
:
state
.
language
language
:
state
.
language
,
BASE_URL
:
state
.
BASE_URL
}
}
...
...
view/Renewal.js
View file @
0714322f
...
...
@@ -23,8 +23,6 @@ class Renewal extends React.Component {
// console.log(this.props.BASE_URL)
}
<<<<<<<
HEAD
=======
_handleRenewal
()
{
Alert
.
alert
(
"Renewal"
,
...
...
@@ -43,7 +41,6 @@ class Renewal extends React.Component {
)
}
>>>>>>>
3
e3692eccd3a8082482d5d3ac9218561fbefd778
_renewal
()
{
let
params
=
{
session_id
:
this
.
props
.
session_id
...
...
@@ -80,12 +77,8 @@ class Renewal extends React.Component {
date
.
setFullYear
(
date
.
getFullYear
()
+
1
);
let
date_nextyear_string
=
date
.
getFullYear
()
+
"-"
+
date
.
getMonth
()
+
"-"
+
date
.
getDate
()
<<<<<<<
HEAD
=======
console
.
log
(
"INI YA : "
+
date_nextyear_string
)
>>>>>>>
3
e3692eccd3a8082482d5d3ac9218561fbefd778
this
.
setState
({
current_balance
:
balance
,
expired
:
expired
,
...
...
view/RewardHistory.js
View file @
0714322f
...
...
@@ -30,7 +30,7 @@ class RewardHistory extends React.Component {
let
params
=
{
session_id
:
this
.
props
.
session_id
}
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/
crm/v2/reward/history'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'
crm/v2/reward/history'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
.
rewards
// console.log(data)
data
.
map
((
item
,
key
)
=>
{
...
...
@@ -119,7 +119,8 @@ const mapStateToProps = (state) => {
return
{
session_id
:
state
.
session_id
,
languange
:
state
.
language
languange
:
state
.
language
,
BASE_URL
:
state
.
BASE_URL
}
}
...
...
view/RewardSelect.js
View file @
0714322f
...
...
@@ -16,7 +16,7 @@ class RewardSelect extends React.Component {
}
componentDidMount
()
{
console
.
log
(
this
.
props
.
BASE_URL
);
console
.
log
(
"INI URL NYA :"
+
this
.
props
.
BASE_URL
);
this
.
getRewardsList
()
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
getRewardsList
()
...
...
view/ShoppingCart.js
View file @
0714322f
...
...
@@ -46,7 +46,7 @@ class ShoppingCart extends React.Component {
componentDidMount
()
{
console
.
log
(
this
.
props
.
home_address
)
console
.
log
(
"INI YA : "
+
this
.
props
.
BASE_URL
)
// console.log('INI VALUE : ' + this.props.value_voucher)
if
(
!
this
.
props
.
type_pickup
)
{
this
.
getRate
()
...
...
@@ -65,7 +65,7 @@ class ShoppingCart extends React.Component {
let
params
=
this
.
props
.
route
.
params
;
if
(
params
!=
undefined
)
{
if
(
params
.
outlet_change
!=
undefined
&&
params
.
outlet_change
)
{
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/
crm/v2/menu/get_list'
,
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'
crm/v2/menu/get_list'
,
{
outlet_id
:
params
.
outlet_id
}).
then
(
res
=>
{
let
data
=
res
.
data
.
data
...
...
@@ -341,7 +341,7 @@ class ShoppingCart extends React.Component {
// console.log("INI PRAMETER NYA : " + JSON.stringify(params))
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/
crm/v2/delivery/rate'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'
crm/v2/delivery/rate'
,
params
).
then
(
res
=>
{
this
.
setState
({
grabamount
:
res
.
data
.
data
.
amount
,
...
...
@@ -410,7 +410,7 @@ class ShoppingCart extends React.Component {
session_id
:
this
.
props
.
session_id
,
}
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/
crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'
crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
const
{
kaspro_balance
,
kaspro_point
}
=
res
.
data
this
.
setState
({
kasproBalance
:
kaspro_balance
.
replace
(
/,/g
,
''
),
...
...
@@ -1071,6 +1071,7 @@ const mapStateToProps = (state) => {
grabpickup
:
state
.
grabpickup
,
grabdropoff
:
state
.
grabdropoff
,
grabdestination
:
state
.
grabdestination
,
BASE_URL
:
state
.
BASE_URL
}
}
...
...
view/setBaseUrl.js
View file @
0714322f
...
...
@@ -16,13 +16,13 @@ class setBaseUrl extends React.Component {
}
handleSetUrl
()
{
if
(
this
.
state
.
base_url
==
''
)
{
Alert
.
alert
(
''
,
'Url tidak boleh kosong!'
)
Alert
.
alert
(
''
,
'Url tidak boleh kosong!'
)
}
else
{
let
setUrls
=
{
BASE_URL
:
this
.
state
.
base_url
}
this
.
props
.
setUrlProps
(
setUrls
);
Alert
.
alert
(
'Berhasil'
,
'berhasil set ke : '
+
this
.
props
.
BASE_URL
)
Alert
.
alert
(
'Berhasil'
,
'berhasil set ke : '
+
this
.
state
.
base_url
)
}
}
...
...
@@ -35,11 +35,13 @@ class setBaseUrl extends React.Component {
<
TextInput
style
=
{{
height
:
40
,
borderWidth
:
1
,
padding
:
5
,
margin
:
5
,
borderRadius
:
10
,
borderColor
:
'grey'
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'center'
,
color
:
'grey'
,
fontWeight
:
'bold'
,
fontSize
:
12
}}
onChangeText
=
{(
base_url
)
=>
this
.
setState
({
base_url
})}
value
=
{
this
.
state
.
base_url
}
autoCapitalize
=
"none"
autoCapitalize
=
"none"
placeholder
=
{
this
.
props
.
BASE_URL
}
/
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginTop
:
20
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
CHANGE
URL
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleSetUrl
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginTop
:
20
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
CHANGE
URL
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
...
...
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