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
51963584
Commit
51963584
authored
May 11, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change
parent
3c9b1e99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
146 additions
and
701 deletions
+146
-701
app.json
app.json
+1
-1
package-lock.json
package-lock.json
+65
-679
package.json
package.json
+2
-1
globalActionType.js
redux/globalActionType.js
+1
-1
globalReducer.js
redux/globalReducer.js
+12
-1
Home.js
view/Home.js
+20
-1
Item.js
view/Item.js
+1
-1
RewardDetail.js
view/RewardDetail.js
+44
-14
TopUpInfo.js
view/TopUpInfo.js
+0
-2
No files found.
app.json
View file @
51963584
{
{
"expo"
:
{
"expo"
:
{
"name"
:
"Excelso_update v1.
08
.05.2020"
,
"name"
:
"Excelso_update v1.
11
.05.2020"
,
"slug"
:
"excelso-pro"
,
"slug"
:
"excelso-pro"
,
"privacy"
:
"public"
,
"privacy"
:
"public"
,
"sdkVersion"
:
"36.0.0"
,
"sdkVersion"
:
"36.0.0"
,
...
...
package-lock.json
View file @
51963584
This diff is collapsed.
Click to expand it.
package.json
View file @
51963584
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
"
react
"
:
"~16.9.0"
,
"
react
"
:
"~16.9.0"
,
"
react-currency-format
"
:
"^1.0.0"
,
"
react-currency-format
"
:
"^1.0.0"
,
"
react-dom
"
:
"~16.9.0"
,
"
react-dom
"
:
"~16.9.0"
,
"
react-htmltext
"
:
"^0.40.2"
,
"
react-material-ui-form-validator
"
:
"^2.0.10"
,
"
react-material-ui-form-validator
"
:
"^2.0.10"
,
"
react-native
"
:
"
https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz
"
,
"
react-native
"
:
"
https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz
"
,
"
react-native-check-box
"
:
"^2.1.7"
,
"
react-native-check-box
"
:
"^2.1.7"
,
...
@@ -61,7 +62,7 @@
...
@@ -61,7 +62,7 @@
"
react-native-view-pager
"
:
"^0.2.3"
,
"
react-native-view-pager
"
:
"^0.2.3"
,
"
react-native-view-shot
"
:
"3.0.2"
,
"
react-native-view-shot
"
:
"3.0.2"
,
"
react-native-web
"
:
"~0.11.7"
,
"
react-native-web
"
:
"~0.11.7"
,
"
react-native-webview
"
:
"^
9.0.1
"
,
"
react-native-webview
"
:
"^
7.4.3
"
,
"
react-navigation
"
:
"^4.2.2"
,
"
react-navigation
"
:
"^4.2.2"
,
"
react-redux
"
:
"^7.2.0"
,
"
react-redux
"
:
"^7.2.0"
,
"
react-redux-i18n
"
:
"^1.9.3"
,
"
react-redux-i18n
"
:
"^1.9.3"
,
...
...
redux/globalActionType.js
View file @
51963584
...
@@ -34,7 +34,7 @@ const ActionType = {
...
@@ -34,7 +34,7 @@ const ActionType = {
SET_ORDER_FINISH
:
'SET_ORDER_FINISH'
,
SET_ORDER_FINISH
:
'SET_ORDER_FINISH'
,
UPDATE_MENU
:
'UPDATE_MENU'
,
UPDATE_MENU
:
'UPDATE_MENU'
,
CHANGE_QUANTITY
:
'CHANGE_QUANTITY'
,
CHANGE_QUANTITY
:
'CHANGE_QUANTITY'
,
SET_CORDINAT
:
'SET_CORDINAT'
,
SET_TRANS_ID
:
'SET_TRANS_ID'
,
SET_TRANS_ID
:
'SET_TRANS_ID'
,
CHANGE_TO_CHART
:
'CHANGE_TO_CHART'
CHANGE_TO_CHART
:
'CHANGE_TO_CHART'
}
}
...
...
redux/globalReducer.js
View file @
51963584
...
@@ -76,7 +76,10 @@ const globalState = {
...
@@ -76,7 +76,10 @@ const globalState = {
balanceUsed
:
''
,
balanceUsed
:
''
,
pointused
:
''
,
pointused
:
''
,
trans_id
:
''
trans_id
:
''
,
lat
:
''
,
long
:
''
}
}
...
@@ -247,6 +250,14 @@ const rootReducer = (state = globalState, action) => {
...
@@ -247,6 +250,14 @@ const rootReducer = (state = globalState, action) => {
}
}
}
}
case
ActionType
.
SET_CORDINAT
:
{
return
{
...
state
,
lat
:
action
.
data
.
lat
,
long
:
action
.
data
.
long
}
}
case
ActionType
.
SET_CHANGE_OUTLET
:
{
case
ActionType
.
SET_CHANGE_OUTLET
:
{
return
{
return
{
...
state
,
...
state
,
...
...
view/Home.js
View file @
51963584
...
@@ -34,6 +34,7 @@ class Home extends React.Component {
...
@@ -34,6 +34,7 @@ class Home extends React.Component {
this
.
_account
();
this
.
_account
();
this
.
_getPermissions
()
this
.
_getPermissions
()
this
.
_renderCarousell
()
this
.
_renderCarousell
()
console
.
log
(
"INI LAT : "
+
this
.
props
.
lat
)
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
setState
({
this
.
setState
({
...
@@ -72,11 +73,20 @@ class Home extends React.Component {
...
@@ -72,11 +73,20 @@ class Home extends React.Component {
let
latitude
=
location
.
coords
.
latitude
;
let
latitude
=
location
.
coords
.
latitude
;
let
longitude
=
location
.
coords
.
longitude
;
let
longitude
=
location
.
coords
.
longitude
;
this
.
setState
({
this
.
setState
({
my_lat
:
latitude
,
my_lat
:
latitude
,
my_long
:
longitude
my_long
:
longitude
})
})
let
cordinate
=
{
lat
:
this
.
state
.
my_lat
,
long
:
this
.
state
.
my_long
,
}
this
.
props
.
setCordinatProps
(
cordinate
);
this
.
_getOutletClosest
();
this
.
_getOutletClosest
();
}
}
...
@@ -284,7 +294,7 @@ class Home extends React.Component {
...
@@ -284,7 +294,7 @@ class Home extends React.Component {
<
TouchableOpacity
style
=
{
styles
.
submitUpgradePemium
}
activeOpacity
=
{.
5
}
onPress
=
{
this
.
onPress
}
>
<
TouchableOpacity
style
=
{
styles
.
submitUpgradePemium
}
activeOpacity
=
{.
5
}
onPress
=
{
this
.
onPress
}
>
<
Text
style
=
{{
textAlign
:
'center'
,
bottom
:
5
,
color
:
'white'
}}
>
TOP
BALANCE
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
bottom
:
5
,
color
:
'white'
}}
>
TOP
BALANCE
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
Text
>
8
May
2019
<
/Text
>
<
Text
>
11
May
2019
<
/Text
>
<
View
style
=
{{
height
:
60
}}
><
/View
>
<
View
style
=
{{
height
:
60
}}
><
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -385,6 +395,13 @@ const mapDispatchToProps = (dispacth) => {
...
@@ -385,6 +395,13 @@ const mapDispatchToProps = (dispacth) => {
}
}
}),
}),
setCordinatProps
:
(
cordinate
)
=>
dispacth
({
type
:
ActionType
.
SET_CORDINAT
,
data
:
{
lat
:
cordinate
.
lat
,
long
:
cordinate
.
long
,
}
}),
}
}
}
}
...
@@ -407,6 +424,8 @@ const mapStateToProps = (state) => {
...
@@ -407,6 +424,8 @@ const mapStateToProps = (state) => {
proses
:
state
.
proses
,
proses
:
state
.
proses
,
pageEmailConfirmation
:
state
.
pageEmailConfirmation
,
pageEmailConfirmation
:
state
.
pageEmailConfirmation
,
language
:
state
.
language
,
language
:
state
.
language
,
lat
:
state
.
lat
,
long
:
state
.
long
,
}
}
}
}
...
...
view/Item.js
View file @
51963584
...
@@ -15,7 +15,7 @@ class Item extends React.Component {
...
@@ -15,7 +15,7 @@ class Item extends React.Component {
handleChangeQuantity
=
(
item
,
qty
)
=>
{
handleChangeQuantity
=
(
item
,
qty
)
=>
{
if
(
qty
==
''
)
{
if
(
qty
==
''
)
{
qty
=
0
item
.
qty
=
0
}
else
{
}
else
{
const
order_item
=
{
const
order_item
=
{
...
...
view/RewardDetail.js
View file @
51963584
...
@@ -15,8 +15,11 @@ class RewardDetail extends React.Component {
...
@@ -15,8 +15,11 @@ class RewardDetail extends React.Component {
image
:
''
,
image
:
''
,
title
:
''
,
title
:
''
,
subtitle
:
''
,
subtitle
:
''
,
deskripsi
:
""
,
content
:
""
,
expire
:
''
expire
:
''
,
code
:
''
,
used
:
''
,
dateNow
:
''
}
}
}
}
...
@@ -30,24 +33,41 @@ class RewardDetail extends React.Component {
...
@@ -30,24 +33,41 @@ class RewardDetail extends React.Component {
session_id
:
this
.
props
.
session_id
,
session_id
:
this
.
props
.
session_id
,
reward_id
:
this
.
props
.
route
.
params
.
rewardId
reward_id
:
this
.
props
.
route
.
params
.
rewardId
}
}
console
.
log
(
params
);
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/reward/get_detail'
,
params
).
then
(
res
=>
{
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/reward/get_detail'
,
params
).
then
(
res
=>
{
this
.
setState
({
this
.
setState
({
image
:
res
.
data
.
reward
.
reward
.
content_image
,
image
:
res
.
data
.
reward
.
reward
.
content_image
,
title
:
res
.
data
.
reward
.
reward
.
title
,
title
:
res
.
data
.
reward
.
reward
.
title
,
subtitle
:
res
.
data
.
reward
.
reward
.
subtitle
,
subtitle
:
res
.
data
.
reward
.
reward
.
subtitle
,
deskripsi
:
res
.
data
.
reward
.
reward
.
content
,
content
:
res
.
data
.
reward
.
reward
.
content
,
expire
:
res
.
data
.
reward
.
expire_time
,
expire
:
res
.
data
.
reward
.
expire_time
,
code
:
res
.
data
.
reward
.
verification_number
,
used
:
res
.
data
.
reward
.
used
,
})
})
// console.log("INI TITLE : " + JSON.stringify())
})
// console.log("INI SUBTITILE : " + JSON.stringify())
}
console
.
log
(
"INI IMAGE : "
+
JSON
.
stringify
())
// console.log("INI DESKRIPSI : " + JSON.stringify(res.data.reward.reward.subtitle))
useVoucher
(){
let
params
=
{
reward_id
:
this
.
props
.
route
.
params
.
rewardId
,
lat
:
this
.
props
.
lat
,
long
:
this
.
props
.
long
}
console
.
log
(
"PARAMETER : "
+
JSON
.
stringify
(
params
)
)
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/reward/use_reward'
,
params
).
then
(
res
=>
{
console
.
long
(
'RESPONE : '
+
res
)
})
})
// this.props.navigation.navigate('Home',{screen:'MENU'})
}
useDVoucher
(){
this
.
props
.
navigation
.
navigate
(
'Order Detail'
)
}
}
render
()
{
render
()
{
const
deskripsi
=
this
.
state
.
deskripsi
const
deskripsi
=
this
.
state
.
deskripsi
...
@@ -55,16 +75,24 @@ class RewardDetail extends React.Component {
...
@@ -55,16 +75,24 @@ class RewardDetail extends React.Component {
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
body
}
>
<
ScrollView
style
=
{
styles
.
body
}
>
<
View
style
=
{
styles
.
body
}
>
<
View
style
=
{
styles
.
body
}
>
{
/* <View style={styles.images}> */
}
<
Image
style
=
{{
height
:
250
,
width
:
'100%'
}}
source
=
{
this
.
state
.
image
?
{
uri
:
this
.
state
.
image
}
:
null
}
/
>
<
Image
style
=
{{
height
:
250
,
width
:
'100%'
}}
source
=
{
this
.
state
.
image
?
{
uri
:
this
.
state
.
image
}
:
null
}
/
>
{
/* </View> */
}
<
View
style
=
{{
height
:
70
,
flex
:
1
,
backgroundColor
:
'#03989E'
,
top
:
-
60
,
marginRight
:
10
,
marginLeft
:
10
}}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
margin
:
5
}}
>
Voucher
code
:
<
/Text
>
<
HTML
html
=
{
this
.
state
.
deskripsi
}
/
>
<
Text
style
=
{{
fontSize
:
30
,
textAlign
:
'center'
,
fontWeight
:
'bold'
,
bottom
:
5
}}
>
{
this
.
state
.
code
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
10
}}
>
<
View
style
=
{{
height
:
70
,
flex
:
1
,
backgroundColor
:
'black'
,
top
:
-
70
,
marginRight
:
10
,
marginLeft
:
10
}}
>
<
Button
title
=
"Validate"
/>
<
Text
style
=
{{
margin
:
5
,
color
:
'white'
}}
>
Expired
Date
:
<
/Text
>
<
Text
style
=
{{
fontSize
:
30
,
textAlign
:
'center'
,
fontWeight
:
'bold'
,
bottom
:
5
,
color
:
'white'
}}
>
{
this
.
state
.
expire
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
top
:
-
60
,
margin
:
10
}}
>
{
this
.
state
.
used
==
0
?(
<
Button
title
=
"USE VOUCHER"
onPress
=
{()
=>
this
.
useVoucher
()}
><
/Button
>
):(
<
Button
title
=
"USED"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Menu Select'
)()}
><
/Button>
)
}
<
HTML
html
=
{
this
.
state
.
content
}
/
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
<
/View
>
<
/View
>
)
)
...
@@ -100,6 +128,8 @@ const mapStateToProps = (state) => {
...
@@ -100,6 +128,8 @@ const mapStateToProps = (state) => {
return
{
return
{
session_id
:
state
.
session_id
,
session_id
:
state
.
session_id
,
lat
:
state
.
lat
,
long
:
state
.
long
,
}
}
}
}
...
...
view/TopUpInfo.js
View file @
51963584
...
@@ -16,8 +16,6 @@ import Axios from 'axios';
...
@@ -16,8 +16,6 @@ import Axios from 'axios';
import
HTML
from
'react-native-render-html'
;
import
HTML
from
'react-native-render-html'
;
export
default
class
TopUpInfo
extends
React
.
Component
{
export
default
class
TopUpInfo
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
){
super
(
props
);
super
(
props
);
...
...
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