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
0b4aad77
Commit
0b4aad77
authored
Oct 27, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tampilkan nama outlet saat mode delivery
parent
9939621f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
129 additions
and
66 deletions
+129
-66
MenuConfirmation.js
view/MenuConfirmation.js
+117
-64
OrderDetail.js
view/OrderDetail.js
+12
-2
No files found.
view/MenuConfirmation.js
View file @
0b4aad77
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
{
FontAwesome
,
FontAwesome5
}
from
'@expo/vector-icons'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
React
from
'react'
;
import
React
from
'react'
;
...
@@ -72,7 +72,7 @@ class MenuConfirmation extends React.Component {
...
@@ -72,7 +72,7 @@ class MenuConfirmation extends React.Component {
// console.log(params)
// console.log(params)
Axios
.
post
(
this
.
props
.
BASE_URL
+
'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
// add API use voucher here
...
@@ -99,7 +99,8 @@ class MenuConfirmation extends React.Component {
...
@@ -99,7 +99,8 @@ class MenuConfirmation extends React.Component {
i18n
.
t
(
'alertSuccessTitle'
),
i18n
.
t
(
'alertSuccessTitle'
),
i18n
.
t
(
'alertSuccessOrder'
),
i18n
.
t
(
'alertSuccessOrder'
),
[
[
{
text
:
"OK"
,
onPress
:
()
=>
{
{
text
:
"OK"
,
onPress
:
()
=>
{
let
data_order
=
res
.
data
.
data
.
id
let
data_order
=
res
.
data
.
data
.
id
this
.
setState
({
this
.
setState
({
...
@@ -111,7 +112,8 @@ class MenuConfirmation extends React.Component {
...
@@ -111,7 +112,8 @@ class MenuConfirmation extends React.Component {
}
}
this
.
props
.
setTransId
(
transIdProps
);
this
.
props
.
setTransId
(
transIdProps
);
this
.
orderSuccess
()
this
.
orderSuccess
()
}
}
}
}
],
],
{
cancelable
:
false
}
{
cancelable
:
false
}
...
@@ -122,7 +124,7 @@ class MenuConfirmation extends React.Component {
...
@@ -122,7 +124,7 @@ class MenuConfirmation extends React.Component {
''
,
''
,
response
.
msg
,
response
.
msg
,
[
[
{
text
:
"OK"
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
})
}
{
text
:
"OK"
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
})
}
],
],
);
);
})
})
...
@@ -147,7 +149,7 @@ class MenuConfirmation extends React.Component {
...
@@ -147,7 +149,7 @@ class MenuConfirmation extends React.Component {
// console.log(params)
// console.log(params)
Axios
.
post
(
this
.
props
.
BASE_URL
+
'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
// add API use voucher here
// let param = {
// let param = {
// session_id: this.props.session_id,
// session_id: this.props.session_id,
...
@@ -172,7 +174,8 @@ class MenuConfirmation extends React.Component {
...
@@ -172,7 +174,8 @@ class MenuConfirmation extends React.Component {
i18n
.
t
(
'alertSuccessTitle'
),
i18n
.
t
(
'alertSuccessTitle'
),
i18n
.
t
(
'alertSuccessOrder'
),
i18n
.
t
(
'alertSuccessOrder'
),
[
[
{
text
:
"OK"
,
onPress
:
()
=>
{
{
text
:
"OK"
,
onPress
:
()
=>
{
let
data_order
=
res
.
data
.
data
.
id
let
data_order
=
res
.
data
.
data
.
id
this
.
setState
({
this
.
setState
({
...
@@ -185,7 +188,8 @@ class MenuConfirmation extends React.Component {
...
@@ -185,7 +188,8 @@ class MenuConfirmation extends React.Component {
this
.
props
.
setTransId
(
transIdProps
);
this
.
props
.
setTransId
(
transIdProps
);
this
.
orderSuccess
()
this
.
orderSuccess
()
}
}
}
}
],
],
{
cancelable
:
false
}
{
cancelable
:
false
}
...
@@ -196,7 +200,7 @@ class MenuConfirmation extends React.Component {
...
@@ -196,7 +200,7 @@ class MenuConfirmation extends React.Component {
''
,
''
,
response
.
msg
,
response
.
msg
,
[
[
{
text
:
"OK"
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
})
}
{
text
:
"OK"
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
})
}
],
],
);
);
})
})
...
@@ -226,6 +230,8 @@ class MenuConfirmation extends React.Component {
...
@@ -226,6 +230,8 @@ class MenuConfirmation extends React.Component {
{
/* <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> */
}
{
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
borderColor
:
'#838383'
,
margin
:
10
,
paddingBottom
:
20
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
borderColor
:
'#838383'
,
margin
:
10
,
paddingBottom
:
20
,
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"
/>
...
@@ -256,7 +262,54 @@ class MenuConfirmation extends React.Component {
...
@@ -256,7 +262,54 @@ class MenuConfirmation extends React.Component {
)
)
}
}
<
/View
>
)
:
(
<
View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
margin
:
10
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
}}
>
<
FontAwesome
name
=
"map-marker"
size
=
{
24
}
color
=
"red"
/>
<
/View
>
{
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
flex
:
0.7
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
14
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
{
this
.
props
.
name_outlet
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
outlet_detailadress
}
<
/Text
>
<
/View
>
)
:
(
<
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.2
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'pickup'
)}
<
/Text
>
<
/View
>
)
:
(
<
View
style
=
{{
flex
:
0.2
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'delivery'
)}
<
/Text
>
<
/View
>
)
}
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
borderColor
:
'#838383'
,
marginHorizontal
:
10
,
paddingBottom
:
20
,
paddingHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
}}
>
<
FontAwesome5
name
=
"store"
size
=
{
18
}
color
=
"#CFB368"
/>
<
/View
>
<
View
style
=
{{
flex
:
0.7
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
14
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
{
this
.
props
.
name_outlet
}
<
/Text
>
<
Text
style
=
{{
textAlign
:
'left'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
this
.
props
.
outlet_detailadress
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
)
}
<
View
style
=
{{
marginHorizontal
:
10
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
marginHorizontal
:
10
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'yourOrders'
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'yourOrders'
)}
<
/Text
>
<
/View
>
<
/View
>
...
@@ -330,7 +383,7 @@ class MenuConfirmation extends React.Component {
...
@@ -330,7 +383,7 @@ class MenuConfirmation extends React.Component {
<
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={''} /
>
<
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
,
display
:
'none'
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginTop
:
-
10
,
display
:
'none'
}}
>
<
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'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'pointUsed'
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'pointUsed'
)}
<
/Text
>
<
/View
>
<
/View
>
...
@@ -559,7 +612,7 @@ const mapStateToProps = (state) => {
...
@@ -559,7 +612,7 @@ const mapStateToProps = (state) => {
outlet_detailadress
:
state
.
outlet_detailadress
,
outlet_detailadress
:
state
.
outlet_detailadress
,
lat
:
state
.
lat
,
lat
:
state
.
lat
,
long
:
state
.
long
,
long
:
state
.
long
,
BASE_URL
:
state
.
BASE_URL
,
BASE_URL
:
state
.
BASE_URL
,
}
}
}
}
...
...
view/OrderDetail.js
View file @
0b4aad77
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
{
FontAwesome
,
FontAwesome5
}
from
'@expo/vector-icons'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
...
@@ -358,6 +358,16 @@ class OrderDetail extends React.Component {
...
@@ -358,6 +358,16 @@ class OrderDetail extends React.Component {
)
)
}
}
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
FontAwesome5
name
=
"store"
size
=
{
18
}
color
=
"#CFB368"
/>
<
/View
>
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
14
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
{
this
.
state
.
detail_trans
.
outlet
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
this
.
state
.
detail_trans
.
outlet_address
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
borderBottomWidth
:
1
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.1
,
justifyContent
:
'center'
}}
>
<
Image
source
=
{
require
(
'../assets/grab-logo.png'
)}
style
=
{{
height
:
32
,
width
:
32
,
borderRadius
:
5
,
}}
/
>
<
Image
source
=
{
require
(
'../assets/grab-logo.png'
)}
style
=
{{
height
:
32
,
width
:
32
,
borderRadius
:
5
,
}}
/
>
...
...
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