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
07124f10
Commit
07124f10
authored
May 29, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update design
parent
a3066646
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
16 deletions
+65
-16
Home.js
view/Home.js
+5
-2
Item.js
view/Item.js
+1
-1
ItemShopingCart.js
view/ItemShopingCart.js
+1
-1
MenuConfirmation.js
view/MenuConfirmation.js
+10
-6
OrderDetail.js
view/OrderDetail.js
+23
-3
OrderHistory.js
view/OrderHistory.js
+22
-0
RewardDetail.js
view/RewardDetail.js
+1
-1
ShoppingCart.js
view/ShoppingCart.js
+2
-2
No files found.
view/Home.js
View file @
07124f10
...
...
@@ -158,14 +158,16 @@ class Home extends React.Component {
}
// console.log(params);
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest'
,
params
).
then
(
res
=>
{
console
.
log
(
res
.
data
.
data
)
let
outletId
=
res
.
data
.
data
.
outlet_id
let
outletName
=
res
.
data
.
data
.
outlet_name
let
outletAddress
=
res
.
data
.
data
.
outlet_address
let
OutletChange
=
{
outlet_id
:
outletId
,
name_outlet
:
outletName
,
outlet_detailadress
:
outletAddress
}
this
.
props
.
setChangeOutletProps
(
OutletChange
);
this
.
setState
({
...
...
@@ -205,7 +207,7 @@ class Home extends React.Component {
render
()
{
console
.
log
(
this
.
state
.
images
)
//
console.log(this.state.images)
return
(
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
>
...
...
@@ -508,6 +510,7 @@ const mapDispatchToProps = (dispacth) => {
data
:
{
outlet_id
:
OutletChange
.
outlet_id
,
name_outlet
:
OutletChange
.
name_outlet
,
outlet_detailadress
:
OutletChange
.
outlet_detailadress
}
}),
setTypePickup
:
(
type
)
=>
dispacth
({
...
...
view/Item.js
View file @
07124f10
...
...
@@ -170,7 +170,7 @@ const styles = StyleSheet.create({
shadowOffset
:
{
width
:
0
,
height
:
2
},
shadowOpacity
:
0.8
,
shadowRadius
:
2
,
elevation
:
1
,
elevation
:
0.5
,
marginLeft
:
5
,
marginRight
:
5
,
marginTop
:
5
,
...
...
view/ItemShopingCart.js
View file @
07124f10
...
...
@@ -157,7 +157,7 @@ const styles = StyleSheet.create({
shadowOffset
:
{
width
:
0
,
height
:
2
},
shadowOpacity
:
0.8
,
shadowRadius
:
2
,
elevation
:
1
,
elevation
:
0.5
,
marginLeft
:
5
,
marginRight
:
5
,
marginTop
:
5
,
...
...
view/MenuConfirmation.js
View file @
07124f10
...
...
@@ -224,23 +224,25 @@ class MenuConfirmation extends React.Component {
<
/View
>
{
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
name_outlet
}
<
/Text
>
<
View
style
=
{{
flex
:
0.7
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
14
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
Excelso
{
this
.
props
.
name_outlet
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Excelso
{
this
.
props
.
outlet_detailadress
}
<
/Text
>
<
/View
>
)
:
(
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
address
}
<
/Text
>
<
View
style
=
{{
flex
:
0.7
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
14
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
{
this
.
props
.
home_address
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
address
}
<
/Text
>
<
/View
>
)
}
{
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
flex
:
0.
3
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.
2
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
PICKUP
<
/Text
>
<
/View
>
)
:
(
<
View
style
=
{{
flex
:
0.
3
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.
2
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
DELIVERY
<
/Text
>
<
/View
>
...
...
@@ -526,6 +528,7 @@ const mapStateToProps = (state) => {
order_item
:
state
.
order_item
,
quantity
:
state
.
quantity
,
address
:
state
.
address
,
home_address
:
state
.
home_address
,
grabtype
:
state
.
grabtype
,
grabamount
:
state
.
grabamount
,
grabpickup
:
state
.
grabpickup
,
...
...
@@ -537,6 +540,7 @@ const mapStateToProps = (state) => {
addressId
:
state
.
addressId
,
outlet_id
:
state
.
outlet_id
,
name_outlet
:
state
.
name_outlet
,
outlet_detailadress
:
state
.
outlet_detailadress
,
lat
:
state
.
lat
,
long
:
state
.
long
}
...
...
view/OrderDetail.js
View file @
07124f10
...
...
@@ -82,7 +82,27 @@ class OrderDetail extends React.Component {
// console.log("PARAMETER : " + JSON.stringify(params))
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
// console.log('ini data' + JSON.stringify(data))
if
(
data
.
trans_status_display
==
'On Queue'
)
{
data
.
trans_status_display
=
'Queueing'
}
else
if
(
data
.
trans_status_display
==
'On Process'
)
{
data
.
trans_status_display
=
'Processing'
}
else
if
(
data
.
trans_status_display
==
'Ready to Pickup'
)
{
data
.
trans_status_display
=
'Ready for Pickup'
}
else
if
(
data
.
trans_status_display
==
'On Delivery'
)
{
data
.
trans_status_display
=
'Delivering'
}
else
if
(
data
.
trans_status_display
==
'On Completed'
)
{
data
.
trans_status_display
=
'Completed'
}
else
if
(
data
.
trans_status_display
==
'Cancelled'
)
{
data
.
trans_status_display
=
'Cancelled'
}
// console.log(data.trans_status_display)
// console.log("INI OUTLET "+ data.outlet)
// console.log("OUTLET-CODE" + data.outlet_code)
// console.log("TRANS-DISPLAY" + data.trans_type_display)
...
...
@@ -111,7 +131,7 @@ class OrderDetail extends React.Component {
}
render
()
{
console
.
log
(
this
.
state
.
detail_trans
)
//
console.log(this.state.detail_trans)
// console.log(this.state.detail_trans.used_reward)
return
(
<
View
style
=
{
styles
.
container
}
>
...
...
@@ -144,7 +164,7 @@ class OrderDetail extends React.Component {
<
/Modal
>
<
View
style
=
{
styles
.
header
}
>
<
Text
style
=
{{
fontSize
:
2
0
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
color
:
'grey'
}}
>
#
{
this
.
state
.
numberId
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
2
6
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
color
:
'grey'
}}
>
#
{
this
.
state
.
numberId
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
color
:
'grey'
}}
>
{
moment
(
this
.
state
.
detail_trans
.
trans_time
).
format
(
'DD MMMM YYYY HH:mm:ss'
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
color
:
'grey'
}}
>
{
this
.
state
.
detail_trans
.
trans_status_display
}
<
/Text
>
<
/View
>
...
...
view/OrderHistory.js
View file @
07124f10
...
...
@@ -45,6 +45,28 @@ class OrderHistory extends React.Component {
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/list'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
// console.log(data)
data
.
map
((
item
)
=>
{
if
(
item
.
trans_status_display
==
'On Queue'
)
{
item
.
trans_status_display
=
'Queueing'
}
else
if
(
item
.
trans_status_display
==
'On Process'
)
{
item
.
trans_status_display
=
'Processing'
}
else
if
(
item
.
trans_status_display
==
'Ready to Pickup'
)
{
item
.
trans_status_display
=
'Ready for Pickup'
}
else
if
(
item
.
trans_status_display
==
'On Delivery'
)
{
item
.
trans_status_display
=
'Delivering'
}
else
if
(
item
.
trans_status_display
==
'On Completed'
)
{
item
.
trans_status_display
=
'Completed'
}
else
if
(
item
.
trans_status_display
==
'Cancelled'
)
{
item
.
trans_status_display
=
'Cancelled'
}
// console.log(data)
})
this
.
setState
({
order_list
:
data
,
indicator
:
false
,
...
...
view/RewardDetail.js
View file @
07124f10
...
...
@@ -122,7 +122,7 @@ class RewardDetail extends React.Component {
style
=
{{
marginHorizontal
:
20
}}
>
<
HTML
html
=
{
this
.
state
.
content
}
tagsStyles
=
{{
p
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
},
li
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
},
ul
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
,
marginTop
:
10
},
blockquote
:
{
backgroundColor
:
"#f1f1f1"
,
padding
:
12
,
paddingBottom
:
0
,
marginTop
:
6
}
}}
/
>
<
HTML
html
=
{
this
.
state
.
content
}
tagsStyles
=
{{
p
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
},
li
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
},
ul
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
,
marginTop
:
10
},
blockquote
:
{
backgroundColor
:
"#f1f1f1"
,
padding
:
12
,
paddingBottom
:
0
,
marginTop
:
6
}
}}
ignoredTags
=
{[
'br'
]}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
content
}
>
...
...
view/ShoppingCart.js
View file @
07124f10
...
...
@@ -445,13 +445,13 @@ class ShoppingCart extends React.Component {
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
12
,
color
:
'grey'
}}
>
YOU
WILL
PICKUP
YOUR
ORDER
AT
<
/Text
>
{
/* <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>Excelso {this.props.name_outlet}</Text> */
}
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
top
:
5
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
Excelso
{
this
.
props
.
name_outlet
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
12
,
top
:
5
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Excelso
{
this
.
props
.
outlet_detailadress
}
<
/Text
>
<
/View
>
)
:
(
<
View
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
12
,
color
:
'grey'
}}
>
OUR
DRIVER
WILL
DELIVER
YOUR
ORDER
TO
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
top
:
5
,
fontFamily
:
'Gotham-
Light
'
,
color
:
'grey'
}}
>
{
this
.
props
.
home_address
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
top
:
5
,
fontFamily
:
'Gotham-
Black
'
,
color
:
'grey'
}}
>
{
this
.
props
.
home_address
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
fontSize
:
12
,
top
:
5
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
this
.
props
.
address
}
<
/Text
>
<
/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