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
2abb154a
Commit
2abb154a
authored
May 26, 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
9dc2f308
2cfe4ba6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
62 deletions
+71
-62
Auth.js
view/Auth.js
+3
-3
MenuConfirmation.js
view/MenuConfirmation.js
+55
-46
RewardsList.js
view/RewardsList.js
+10
-10
ShoppingCart.js
view/ShoppingCart.js
+1
-1
WelcomeLog.js
view/WelcomeLog.js
+2
-2
No files found.
view/Auth.js
View file @
2abb154a
...
@@ -500,7 +500,7 @@ class Auth extends React.Component {
...
@@ -500,7 +500,7 @@ class Auth extends React.Component {
{
/* <Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> */
}
{
/* <Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> */
}
<
Stack
.
Screen
name
=
"News Detail"
component
=
{
NewsDetail
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"News Detail"
component
=
{
NewsDetail
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"C
onfirm Your Order
"
component
=
{
MenuConfirmation
}
<
Stack
.
Screen
name
=
"C
ONFIRM YOUR ORDER
"
component
=
{
MenuConfirmation
}
options
=
{{
options
=
{{
headerStyle
:
{
backgroundColor
:
"#CFB368"
},
headerStyle
:
{
backgroundColor
:
"#CFB368"
},
headerBackTitleStyle
:
{
color
:
'white'
},
headerBackTitleStyle
:
{
color
:
'white'
},
...
@@ -509,9 +509,9 @@ class Auth extends React.Component {
...
@@ -509,9 +509,9 @@ class Auth extends React.Component {
headerTitleStyle
:
{
headerTitleStyle
:
{
fontFamily
:
'Gotham-Black'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
color
:
'white'
,
fontSize
:
18
,
fontSize
:
20
,
},
},
title
:
'C
onfirm Your Order
'
title
:
'C
ONFIRM YOUR ORDER
'
}}
/
>
}}
/
>
<
Stack
.
Screen
name
=
"Date Time"
component
=
{
DateTime
}
/
>
<
Stack
.
Screen
name
=
"Date Time"
component
=
{
DateTime
}
/
>
<
Stack
.
Screen
name
=
"New Register"
component
=
{
NewRegister
}
<
Stack
.
Screen
name
=
"New Register"
component
=
{
NewRegister
}
...
...
view/MenuConfirmation.js
View file @
2abb154a
...
@@ -7,6 +7,7 @@ import Spinner from 'react-native-loading-spinner-overlay';
...
@@ -7,6 +7,7 @@ import Spinner from 'react-native-loading-spinner-overlay';
import
session
from
'../function/session'
;
import
session
from
'../function/session'
;
import
moment
from
'moment'
import
moment
from
'moment'
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
NumberFormat
from
'react-number-format'
;
class
MenuConfirmation
extends
React
.
Component
{
class
MenuConfirmation
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
...
@@ -214,21 +215,21 @@ class MenuConfirmation extends React.Component {
...
@@ -214,21 +215,21 @@ class MenuConfirmation extends React.Component {
textContent
=
{
'Sedang Proses...'
}
textContent
=
{
'Sedang Proses...'
}
textStyle
=
{
styles
.
spinnerTextStyle
}
textStyle
=
{
styles
.
spinnerTextStyle
}
/
>
/
>
<
View
style
=
{{
margin
:
10
,
padding
:
20
,
borderBottomWidth
:
1
}}
>
{
/*
<View style={{ margin: 10, padding: 20, borderBottomWidth: 1 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center' }}>{moment().utcOffset('+07:00').format('DD MMMM YYYY HH:mm:ss')}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center' }}>{moment().utcOffset('+07:00').format('DD MMMM YYYY HH:mm:ss')}</Text>
<
/View
>
</View>
*/
}
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
margin
:
10
,
paddingBottom
:
30
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
borderColor
:
'#838383'
,
margin
:
10
,
paddingBottom
:
30
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
}}
>
<
FontAwesome
name
=
"map-marker"
size
=
{
24
}
color
=
"red"
/>
<
FontAwesome
name
=
"map-marker"
size
=
{
24
}
color
=
"red"
/>
<
/View
>
<
/View
>
{
{
this
.
props
.
type_pickup
==
true
?
(
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
name_outlet
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
name_outlet
}
<
/Text
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
address
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
address
}
<
/Text
>
<
/View
>
<
/View
>
)
)
...
@@ -236,18 +237,18 @@ class MenuConfirmation extends React.Component {
...
@@ -236,18 +237,18 @@ class MenuConfirmation extends React.Component {
{
{
this
.
props
.
type_pickup
==
true
?
(
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
PICKUP
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
PICKUP
<
/Text
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
DELIVERY
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
DELIVERY
<
/Text
>
<
/View
>
<
/View
>
)
)
}
}
<
/View
>
<
/View
>
<
View
style
=
{{
marginHorizontal
:
10
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
marginHorizontal
:
10
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Pesanan
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
PESANAN
<
/Text
>
<
/View
>
<
/View
>
{
{
this
.
props
.
order_item
.
map
((
item
,
index
)
=>
{
this
.
props
.
order_item
.
map
((
item
,
index
)
=>
{
...
@@ -255,20 +256,21 @@ class MenuConfirmation extends React.Component {
...
@@ -255,20 +256,21 @@ class MenuConfirmation extends React.Component {
return
(
return
(
<
View
style
=
{{
margin
:
0
}}
key
=
{
index
}
>
<
View
style
=
{{
margin
:
0
}}
key
=
{
index
}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-around'
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-around'
}}
>
<
View
style
=
{{
flex
:
0.
3
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'flex-end'
}}
>
<
Image
source
=
{{
uri
:
item
.
image
}}
style
=
{{
height
:
50
,
width
:
50
,
borderRadius
:
5
}}
><
/Image
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
quantity
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
}}
>
<
View
style
=
{{
flex
:
0.
2
,
alignItems
:
'flex-end'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
quantity
}
<
/Text
>
<
Image
source
=
{{
uri
:
item
.
image
}}
style
=
{{
height
:
50
,
width
:
50
,
borderRadius
:
5
}}
><
/Image
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.1
,
alignItems
:
'flex-start'
,
justifyContent
:
'center'
,
}}
>
{
/*
<View style={{ flex: 0.1, alignItems: 'flex-start', justifyContent:'center', }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>x</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>x</Text>
</View> */
}
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
name
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
}}
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
name
}
<
/Text
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color:'#838383' }}>{item.quantity * item.price} </Text> */
}
<
/View
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
item
.
quantity
*
item
.
price
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
quantity
*
item
.
price
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -280,16 +282,16 @@ class MenuConfirmation extends React.Component {
...
@@ -280,16 +282,16 @@ class MenuConfirmation extends React.Component {
null
null
)
:
(
)
:
(
<>
<>
<
View
style
=
{{
borderTopWidth
:
1
,
margin
:
10
,
padding
:
10
}}
>
<
View
style
=
{{
borderTopWidth
:
1
,
borderColor
:
'#838383'
,
margin
:
10
,
padding
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Voucher
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
VOUCHER
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
Direction
:
'row'
,
justifyContent
:
'space-between'
,
margin
:
10
,
marginTop
:
-
1
0
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
margin
:
10
,
marginTop
:
-
2
0
}}
>
<
View
style
=
{{
margin
:
10
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
flex
:
0.8
,
margin
:
10
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
voucher
.
reward
.
title
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
voucher
.
reward
.
title
}
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward Detail'
,
{
rewardId
:
this
.
props
.
voucher
.
id
})}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward Detail'
,
{
rewardId
:
this
.
props
.
voucher
.
id
})}
>
<
View
style
=
{{
margin
:
10
,
paddingRight
:
5
}}
>
<
View
style
=
{{
flex
:
0.2
,
marginVertical
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
View
Detail
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
View
Detail
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
...
@@ -297,43 +299,47 @@ class MenuConfirmation extends React.Component {
...
@@ -297,43 +299,47 @@ class MenuConfirmation extends React.Component {
<
/
>
<
/
>
)
)
}
}
<
View
style
=
{{
borderTopWidth
:
1
,
marginHorizontal
:
10
,
paddingLeft
:
10
,
padding
:
10
}}
>
<
View
style
=
{{
borderTopWidth
:
1
,
borderColor
:
'#838383'
,
marginHorizontal
:
10
,
paddingLeft
:
10
,
padding
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Payment
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
PAYMENT
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
paddingLeft
:
20
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
paddingLeft
:
20
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Balance
Used
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Balance
Used
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
alignItems
:
'flex-end'
,
paddingRight
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
alignItems
:
'flex-end'
,
paddingRight
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
route
.
params
.
balanceUsed
}
<
/Text
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.props.route.params.balanceUsed}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
props
.
route
.
params
.
balanceUsed
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
paddingLeft
:
20
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
paddingLeft
:
20
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Point
Used
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Point
Used
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
alignItems
:
'flex-end'
,
paddingRight
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
margin
:
10
,
alignItems
:
'flex-end'
,
paddingRight
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
this
.
props
.
route
.
params
.
pointused
}
<
/Text
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.props.route.params.pointused}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
props
.
route
.
params
.
pointused
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
borderTopWidth
:
1
,
margin
:
10
,
paddingLeft
:
10
,
padding
:
10
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
borderTopWidth
:
1
,
borderColor
:
'#838383'
,
margin
:
10
,
paddingLeft
:
10
,
padding
:
10
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Harga
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Harga
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'right'
}}
>
{
total
}
<
/Text
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right', color:'#838383' }}>{total}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
total
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'right'
,
color
:
'#838383'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
{
{
this
.
props
.
value_voucher
==
''
?
(
this
.
props
.
value_voucher
==
''
?
(
null
null
)
:
(
)
:
(
<
View
style
=
{{
margin
:
10
,
marginTop
:
-
10
,
paddingLeft
:
10
,
padding
:
20
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
margin
:
10
,
marginTop
:
-
10
,
paddingLeft
:
10
,
padding
:
10
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Voucher
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Voucher
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'right'
}}
>-
{
this
.
props
.
voucher
.
reward
.
value
}
<
/Text
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right', color:'#838383' }}>- {this.props.voucher.reward.value}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
props
.
voucher
.
reward
.
value
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'right'
,
color
:
'#838383'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
)
...
@@ -342,28 +348,31 @@ class MenuConfirmation extends React.Component {
...
@@ -342,28 +348,31 @@ class MenuConfirmation extends React.Component {
this
.
props
.
type_pickup
==
true
?
(
this
.
props
.
type_pickup
==
true
?
(
null
null
)
:
(
)
:
(
<
View
style
=
{{
margin
:
10
,
marginTop
:
-
10
,
paddingLeft
:
10
,
padding
:
20
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
margin
:
10
,
marginTop
:
-
10
,
paddingLeft
:
10
,
padding
:
10
,
paddingBottom
:
-
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Ongkos
Kirim
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Ongkos
Kirim
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'right'
}}
>
{
this
.
props
.
grabamount
}
<
/Text
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>{this.props.grabamount}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
props
.
grabamount
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'right'
,
color
:
'#838383'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
)
}
}
<
View
style
=
{{
marginHorizontal
:
7
,
paddingHorizontal
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
margin
Vertical
:
10
,
margin
Horizontal
:
7
,
paddingHorizontal
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
Total
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
Total
<
/Text
>
<
/View
>
<
/View
>
{
{
this
.
props
.
value_voucher
==
''
?
(
this
.
props
.
value_voucher
==
''
?
(
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
,
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
,
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
{
this
.
props
.
order_total
+
this
.
props
.
grabamount
}
<
/Text
>
{
/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>{this.props.order_total + this.props.grabamount}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
props
.
order_total
+
this
.
props
.
grabamount
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
,
}}
>
<
View
style
=
{{
flex
:
0.4
,
marginRight
:
-
5
,
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
)}
<
/Text
>
{
/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>{Math.max(0, this.props.order_total - this.props.voucher.reward.value + this.props.grabamount)}</Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
)}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
)
)
}
}
...
@@ -447,7 +456,7 @@ class MenuConfirmation extends React.Component {
...
@@ -447,7 +456,7 @@ class MenuConfirmation extends React.Component {
</View> */
}
</View> */
}
<
TouchableOpacity
onPress
=
{()
=>
this
.
setOrder
(
this
.
props
.
type_pickup
)}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
setOrder
(
this
.
props
.
type_pickup
)}
>
<
View
style
=
{
styles
.
button
}
>
<
View
style
=
{
styles
.
button
}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
22
,
fontFamily
:
'Gotham-Black'
}}
>
Proses
Pesanan
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
Proses
Pesanan
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{{
height
:
30
}}
/
>
<
View
style
=
{{
height
:
30
}}
/
>
...
@@ -480,11 +489,11 @@ const styles = StyleSheet.create({
...
@@ -480,11 +489,11 @@ const styles = StyleSheet.create({
button
:
{
button
:
{
backgroundColor
:
'#CFB368'
,
backgroundColor
:
'#CFB368'
,
marginTop
:
25
,
marginTop
:
25
,
marginHorizontal
:
3
0
,
marginHorizontal
:
4
0
,
borderRadius
:
10
,
borderRadius
:
10
,
paddingVertical
:
5
,
height
:
40
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
justifyContent
:
'center'
,
},
},
})
})
...
...
view/RewardsList.js
View file @
2abb154a
...
@@ -51,7 +51,7 @@ class RewardsList extends React.Component {
...
@@ -51,7 +51,7 @@ class RewardsList extends React.Component {
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
header
}
>
<
Text
style
=
{{
color
:
'white'
,
textAlign
:
'center'
,
fontSize
:
18
,
fontFamily
:
'Gotham-Black'
}}
>
REWARDS
E
-
VOUCHER
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
textAlign
:
'center'
,
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
}}
>
REWARDS
E
-
VOUCHER
<
/Text
>
<
/View
>
<
/View
>
<
ScrollView
style
=
{
styles
.
body
}
>
<
ScrollView
style
=
{
styles
.
body
}
>
{
{
...
@@ -59,21 +59,21 @@ class RewardsList extends React.Component {
...
@@ -59,21 +59,21 @@ class RewardsList extends React.Component {
this
.
state
.
rewardsList
.
map
((
item
,
key
)
=>
(
this
.
state
.
rewardsList
.
map
((
item
,
key
)
=>
(
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward Detail'
,
{
rewardId
:
item
.
id
})}
>
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward Detail'
,
{
rewardId
:
item
.
id
})}
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
Card
style
=
{{
padding
:
5
,
margin
:
10
}}
>
<
Card
style
=
{{
padding
:
5
,
margin
:
5
}}
>
<
View
>
<
View
>
<
Image
source
=
{{
uri
:
item
.
reward
.
title_image
}}
<
Image
source
=
{{
uri
:
item
.
reward
.
title_image
}}
resizeMethod
=
"resize"
resizeMethod
=
"resize"
resizeMode
=
'cover'
resizeMode
=
'cover'
style
=
{{
height
:
100
,
width
:
'100%'
}}
/
>
style
=
{{
height
:
100
,
width
:
'100%'
}}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
Direction
:
'row'
,
justifyContent
:
'space-between'
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
>
<
View
style
=
{{
flex
:
0.6
}}
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
}}
>
{
item
.
reward
.
title
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
{
item
.
reward
.
title
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
reward
.
subtitle
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
reward
.
subtitle
}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
style
=
{{
flex
:
0.4
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
Expired
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Expired
On
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
}}
>
{
item
.
expire_time
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
item
.
expire_time
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/Card
>
<
/Card
>
...
@@ -86,7 +86,7 @@ class RewardsList extends React.Component {
...
@@ -86,7 +86,7 @@ class RewardsList extends React.Component {
<
/View
>
<
/View
>
)
)
}
}
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward History'
)}
>
<
TouchableOpacity
style
=
{{
marginVertical
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward History'
)}
>
<
Text
style
=
{{
textAlign
:
'center'
,
color
:
'#CFB368'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
}}
>
REDEEM
E
-
VOUCHER
HISTORY
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
color
:
'#CFB368'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
}}
>
REDEEM
E
-
VOUCHER
HISTORY
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{{
height
:
15
}}
/
>
<
View
style
=
{{
height
:
15
}}
/
>
...
...
view/ShoppingCart.js
View file @
2abb154a
...
@@ -393,7 +393,7 @@ class ShoppingCart extends React.Component {
...
@@ -393,7 +393,7 @@ class ShoppingCart extends React.Component {
}
else
if
(
this
.
state
.
checkedBalance
==
false
&&
this
.
state
.
checkedPoint
==
false
&&
this
.
state
.
checkedBalancePoint
==
false
)
{
}
else
if
(
this
.
state
.
checkedBalance
==
false
&&
this
.
state
.
checkedPoint
==
false
&&
this
.
state
.
checkedBalancePoint
==
false
)
{
Alert
.
alert
(
'Error'
,
'Please insert payment methods'
)
Alert
.
alert
(
'Error'
,
'Please insert payment methods'
)
}
else
{
}
else
{
this
.
props
.
navigation
.
navigate
(
'C
onfirm Your Order
'
,
{
balanceUsed
:
this
.
state
.
balanceused
,
pointused
:
this
.
state
.
pointsused
})
this
.
props
.
navigation
.
navigate
(
'C
ONFIRM YOUR ORDER
'
,
{
balanceUsed
:
this
.
state
.
balanceused
,
pointused
:
this
.
state
.
pointsused
})
}
}
}
}
...
...
view/WelcomeLog.js
View file @
2abb154a
...
@@ -47,8 +47,8 @@ export default class WelcomeLog extends React.Component {
...
@@ -47,8 +47,8 @@ export default class WelcomeLog extends React.Component {
},
},
],
],
})}
>
})}
>
<
View
style
=
{{
height
:
50
,
borderRadius
:
2
0
,
backgroundColor
:
'#CFB368'
}}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
1
0
,
backgroundColor
:
'#CFB368'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'
black'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
15
}}
>
NEXT
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'
white'
,
fontSize
:
16
,
textAlign
:
'center'
,
margin
:
11
}}
>
NEXT
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/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