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
62271999
Commit
62271999
authored
Jun 19, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
translate order
parent
179e48f2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
44 deletions
+56
-44
en.json
lib/en.json
+7
-1
id.json
lib/id.json
+8
-3
OrderDetail.js
view/OrderDetail.js
+20
-19
OrderHistory.js
view/OrderHistory.js
+21
-21
No files found.
lib/en.json
View file @
62271999
...
@@ -121,7 +121,13 @@
...
@@ -121,7 +121,13 @@
"paymentDetails"
:
"PAYMENT DETAILS"
,
"paymentDetails"
:
"PAYMENT DETAILS"
,
"note"
:
"Note"
,
"note"
:
"Note"
,
"headerConfirmOrder"
:
"CONFIRM YOUR ORDER"
,
"headerConfirmOrder"
:
"CONFIRM YOUR ORDER"
,
"orderProcess"
:
"ORDER PROCESS"
"orderProcess"
:
"ORDER PROCESS"
,
"seeOrderDetail"
:
"See Order Detail"
,
"lookingForDriver"
:
"Looking For Driver"
,
"help"
:
"HELP"
,
"youRated"
:
"You Rated"
,
"rateOrder"
:
"Rate Order"
}
}
\ No newline at end of file
lib/id.json
View file @
62271999
...
@@ -121,7 +121,12 @@
...
@@ -121,7 +121,12 @@
"yourBalanceUsed"
:
"Saldo Kamu Digunakan"
,
"yourBalanceUsed"
:
"Saldo Kamu Digunakan"
,
"yourPointsUsed"
:
"Poin Kamu Digunakan"
,
"yourPointsUsed"
:
"Poin Kamu Digunakan"
,
"paymentDetails"
:
"DETAIL PEMBAYARAN"
,
"paymentDetails"
:
"DETAIL PEMBAYARAN"
,
"note"
:
"Keterangan"
,
"note"
:
"Keterangan"
,
"headerConfirmOrder"
:
"CONFIRM YOUR ORDER@"
,
"headerConfirmOrder"
:
"CONFIRM YOUR ORDER@"
,
"orderProcess"
:
"PROSES PESANAN"
"orderProcess"
:
"PROSES PESANAN"
,
"seeOrderDetail"
:
"Lihat Detail Pemesanan"
,
"lookingForDriver"
:
"Mencari Driver"
,
"help"
:
"BANTUAN"
,
"youRated"
:
"You Rated@"
,
"rateOrder"
:
"Rate Order@"
}
}
\ No newline at end of file
view/OrderDetail.js
View file @
62271999
...
@@ -10,6 +10,7 @@ import NumberFormat from 'react-number-format';
...
@@ -10,6 +10,7 @@ import NumberFormat from 'react-number-format';
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
{
Icon
}
from
'react-native-elements'
import
{
Icon
}
from
'react-native-elements'
import
MyStatusBar
from
'./MyStatusBar'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
i18n
from
'i18n-js'
;
class
OrderDetail
extends
React
.
Component
{
class
OrderDetail
extends
React
.
Component
{
...
@@ -264,11 +265,11 @@ class OrderDetail extends React.Component {
...
@@ -264,11 +265,11 @@ class OrderDetail extends React.Component {
{
{
this
.
state
.
detail_trans
.
trans_type_display
==
'Pick Up'
?
(
this
.
state
.
detail_trans
.
trans_type_display
==
'Pick Up'
?
(
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
PICKUP
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'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'
,
color
:
'grey'
}}
>
DELIVERY
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'delivery'
)}
<
/Text
>
<
/View
>
<
/View
>
)
)
...
@@ -298,11 +299,11 @@ class OrderDetail extends React.Component {
...
@@ -298,11 +299,11 @@ class OrderDetail extends React.Component {
{
{
this
.
state
.
detail_trans
.
trans_type_display
==
'Pick Up'
?
(
this
.
state
.
detail_trans
.
trans_type_display
==
'Pick Up'
?
(
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
0.3
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
PICKUP
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'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'
,
color
:
'grey'
}}
>
DELIVERY
<
/Text
>
<
Text
style
=
{{
textAlign
:
'right'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'delivery'
)}
<
/Text
>
<
/View
>
<
/View
>
)
)
...
@@ -315,7 +316,7 @@ class OrderDetail extends React.Component {
...
@@ -315,7 +316,7 @@ class OrderDetail extends React.Component {
{
{
this
.
state
.
detail_trans
.
grab_driver_name
==
''
?
(
this
.
state
.
detail_trans
.
grab_driver_name
==
''
?
(
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-SemiBoldItalic'
,
color
:
'grey'
}}
>
Looking
For
Driver
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-SemiBoldItalic'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'lookingForDriver'
)}
<
/Text
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
flex
:
0.6
,
justifyContent
:
'center'
,
paddingLeft
:
10
}}
>
...
@@ -366,7 +367,7 @@ class OrderDetail extends React.Component {
...
@@ -366,7 +367,7 @@ class OrderDetail extends React.Component {
<
View
style
=
{{
marginLeft
:
10
,
marginTop
:
10
,
paddingLeft
:
10
}}
>
<
View
style
=
{{
marginLeft
:
10
,
marginTop
:
10
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
PESANAN
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'yourOrders'
)}
<
/Text
>
<
/View
>
<
/View
>
{
{
...
@@ -393,7 +394,7 @@ class OrderDetail extends React.Component {
...
@@ -393,7 +394,7 @@ class OrderDetail extends React.Component {
item
.
item_note
==
''
?
(
item
.
item_note
==
''
?
(
null
null
)
:
(
)
:
(
<
Text
style
=
{{
fontSize
:
10
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Keterangan
:
{
item
.
item_note
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
{
i18n
.
t
(
'note'
)}
:
{
item
.
item_note
}
<
/Text
>
)
)
}
}
...
@@ -425,7 +426,7 @@ class OrderDetail extends React.Component {
...
@@ -425,7 +426,7 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward Detail'
,
{
rewardId
:
this
.
state
.
detail_trans
.
used_reward
[
0
].
id
})}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Reward Detail'
,
{
rewardId
:
this
.
state
.
detail_trans
.
used_reward
[
0
].
id
})}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
View
Detail
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'viewDetail'
)}
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
{
/* <NumberFormat decimalScale={0} value={this.state.detail_trans.point_reduce} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */
}
{
/* <NumberFormat decimalScale={0} value={this.state.detail_trans.point_reduce} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */
}
<
/View
>
<
/View
>
...
@@ -436,12 +437,12 @@ class OrderDetail extends React.Component {
...
@@ -436,12 +437,12 @@ class OrderDetail extends React.Component {
}
}
<
View
style
=
{{
borderTopWidth
:
1
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
marginTop
:
5
}}
>
<
View
style
=
{{
borderTopWidth
:
1
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
marginTop
:
5
}}
>
<
View
style
=
{{
paddingLeft
:
10
,
paddingTop
:
10
}}
>
<
View
style
=
{{
paddingLeft
:
10
,
paddingTop
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
PAYMENT
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'payment'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
20
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
20
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Balance
Used
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'balanceUsed'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.detail_trans.trans_paid}</Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.detail_trans.trans_paid}</Text> */
}
...
@@ -450,7 +451,7 @@ class OrderDetail extends React.Component {
...
@@ -450,7 +451,7 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
20
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
20
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Point
Used
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'pointUsed'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.detail_trans.point_booked}</Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.detail_trans.point_booked}</Text> */
}
...
@@ -459,7 +460,7 @@ class OrderDetail extends React.Component {
...
@@ -459,7 +460,7 @@ class OrderDetail extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{{
marginTop
:
5
,
borderTopWidth
:
1
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
marginTop
:
5
,
borderTopWidth
:
1
,
borderColor
:
'grey'
,
marginHorizontal
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Harga
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'price'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>{this.state.detail_trans.trans_subtotal}</Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>{this.state.detail_trans.trans_subtotal}</Text> */
}
...
@@ -471,7 +472,7 @@ class OrderDetail extends React.Component {
...
@@ -471,7 +472,7 @@ class OrderDetail extends React.Component {
this
.
state
.
detail_trans
.
used_reward
.
length
?
(
this
.
state
.
detail_trans
.
used_reward
.
length
?
(
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Voucher
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'discount'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>- {this.state.detail_trans.trans_discount}</Text> */
}
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>- {this.state.detail_trans.trans_discount}</Text> */
}
...
@@ -486,7 +487,7 @@ class OrderDetail extends React.Component {
...
@@ -486,7 +487,7 @@ class OrderDetail extends React.Component {
this
.
state
.
detail_trans
.
trans_type
==
2
?
(
this
.
state
.
detail_trans
.
trans_type
==
2
?
(
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Ongkos
kirim
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
i18n
.
t
(
'rateDelivery'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
{
...
@@ -507,7 +508,7 @@ class OrderDetail extends React.Component {
...
@@ -507,7 +508,7 @@ class OrderDetail extends React.Component {
}
}
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
,
marginTop
:
5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
flex
:
1
,
marginHorizontal
:
10
,
marginTop
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginLeft
:
10
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
Total
<
/Text
>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
{
i18n
.
t
(
'total'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
0.5
,
marginVertical
:
5
,
alignItems
:
'flex-end'
,
marginRight
:
10
}}
>
{
/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>{this.state.detail_trans.trans_total}</Text> */
}
{
/* <Text style={{ fontSize: 20, fontFamily: 'Gotham-Black', textAlign: 'right', color: '#CFB368' }}>{this.state.detail_trans.trans_total}</Text> */
}
...
@@ -528,7 +529,7 @@ class OrderDetail extends React.Component {
...
@@ -528,7 +529,7 @@ class OrderDetail extends React.Component {
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
paddingRight
:
25
}}
>
<
View
style
=
{{
paddingRight
:
25
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
Bantuan
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
{
i18n
.
t
(
'help'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -538,7 +539,7 @@ class OrderDetail extends React.Component {
...
@@ -538,7 +539,7 @@ class OrderDetail extends React.Component {
{
{
this
.
state
.
trans_status
==
0
?
(
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleCancel
()}
>
this
.
state
.
trans_status
==
0
?
(
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleCancel
()}
>
<
View
style
=
{
styles
.
button
}
>
<
View
style
=
{
styles
.
button
}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
Cancel
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
{
i18n
.
t
(
'cancel'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity>
)
:
(
null
)
<
/TouchableOpacity>
)
:
(
null
)
}
}
...
@@ -548,14 +549,14 @@ class OrderDetail extends React.Component {
...
@@ -548,14 +549,14 @@ class OrderDetail extends React.Component {
this
.
state
.
is_reviewed
?
(
this
.
state
.
is_reviewed
?
(
<
View
style
=
{{
height
:
70
,
borderWidth
:
1
,
borderRadius
:
10
,
justifyContent
:
'center'
,
margin
:
30
,
borderColor
:
'#CFB368'
}}
>
<
View
style
=
{{
height
:
70
,
borderWidth
:
1
,
borderRadius
:
10
,
justifyContent
:
'center'
,
margin
:
30
,
borderColor
:
'#CFB368'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
,
fontSize
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
You
Rated
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
,
fontSize
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
{
i18n
.
t
(
'youRated'
)}
<
/Text
>
<
Rating
imageSize
=
{
20
}
style
=
{{
top
:
5
}}
readonly
startingValue
=
{
this
.
state
.
review_rating
}
ratingBackgroundColor
=
'#CFB368'
/>
<
Rating
imageSize
=
{
20
}
style
=
{{
top
:
5
}}
readonly
startingValue
=
{
this
.
state
.
review_rating
}
ratingBackgroundColor
=
'#CFB368'
/>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
this
.
state
.
detail_trans
.
id
})}
>
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
this
.
state
.
detail_trans
.
id
})}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
,
marginRight
:
20
,
marginLeft
:
20
,
marginTop
:
50
}}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
,
marginRight
:
20
,
marginLeft
:
20
,
marginTop
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
Rate
Order
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
{
i18n
.
t
(
'rateOrder'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
)
)
...
...
view/OrderHistory.js
View file @
62271999
...
@@ -43,7 +43,7 @@ class OrderHistory extends React.Component {
...
@@ -43,7 +43,7 @@ class OrderHistory extends React.Component {
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
session_id
:
this
.
props
.
session_id
}
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/transaction/list'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/transaction/list'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
let
data
=
res
.
data
.
data
// console.log(data)
// console.log(data)
data
.
map
((
item
)
=>
{
data
.
map
((
item
)
=>
{
...
@@ -94,18 +94,18 @@ class OrderHistory extends React.Component {
...
@@ -94,18 +94,18 @@ class OrderHistory extends React.Component {
this
.
state
.
order_list
.
map
((
item
,
key
)
=>
(
this
.
state
.
order_list
.
map
((
item
,
key
)
=>
(
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
key
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
key
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1.1
,
justifyContent
:
'center'
,
margin
:
10
}}
>
<
View
style
=
{{
flex
:
1.1
,
justifyContent
:
'center'
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
outlet
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
outlet
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
moment
(
item
.
trans_time
).
format
(
"DD MMMM YYYY, hh:mm A"
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
moment
(
item
.
trans_time
).
format
(
"DD MMMM YYYY, hh:mm A"
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
trans_type_display
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
trans_type_display
}
<
/Text
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
,
marginVertical
:
5
}}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
,
marginVertical
:
5
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
12
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
Lihat
Detail
Pemesanan
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
12
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
{
i18n
.
t
(
'seeOrderDetail'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.9
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
margin
:
10
,
marginLeft
:
15
,
borderLeftWidth
:
1
,
borderColor
:
'#838383'
}}
>
<
View
style
=
{{
flex
:
0.9
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
margin
:
10
,
marginLeft
:
15
,
borderLeftWidth
:
1
,
borderColor
:
'#838383'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
12
}}
>
{
item
.
trans_status_display
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
12
}}
>
{
item
.
trans_status_display
}
<
/Text
>
<
/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