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
70f52f85
Commit
70f52f85
authored
May 28, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add review in order detaiil
parent
b33f1cac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
26 deletions
+27
-26
OrderDetail.js
view/OrderDetail.js
+27
-14
OrderHistory.js
view/OrderHistory.js
+0
-12
No files found.
view/OrderDetail.js
View file @
70f52f85
...
@@ -272,32 +272,32 @@ class OrderDetail extends React.Component {
...
@@ -272,32 +272,32 @@ class OrderDetail extends React.Component {
{
{
this
.
state
.
detail_trans
!=
''
?
(
this
.
state
.
detail_trans
!=
''
?
(
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'
}}
>
Voucher
<
/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> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
used_reward
[
0
].
reward
.
value
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
textAlign
:
'right'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
used_reward
[
0
].
reward
.
value
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
textAlign
:
'right'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:(
null
)
)
:
(
null
)
)
:
(
null
)
)
:
(
null
)
}
}
{
{
this
.
state
.
detail_trans
!=
''
?
(
this
.
state
.
detail_trans
!=
''
?
(
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'
}}
>
Ongkis
kirim
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Ongkis
kirim
<
/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
}}
>
{
{
this
.
state
.
detail_trans
.
transaction_detail
.
map
((
item
,
index
)
=>
{
this
.
state
.
detail_trans
.
transaction_detail
.
map
((
item
,
index
)
=>
{
// console.log(item)
// console.log(item)
if
(
item
.
item_code
==
'GRAB-DELIVERY'
)
{
if
(
item
.
item_code
==
'GRAB-DELIVERY'
)
{
return
(
return
(
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
item
.
item_price
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
textAlign
:
'right'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
item
.
item_price
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
textAlign
:
'right'
}}
>-
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
)
)
}
}
})
})
...
@@ -305,14 +305,14 @@ class OrderDetail extends React.Component {
...
@@ -305,14 +305,14 @@ class OrderDetail extends React.Component {
{
/* <NumberFormat decimalScale={0} value={this.state.detail_trans.trans_discount} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', textAlign: 'right' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */
}
{
/* <NumberFormat decimalScale={0} value={this.state.detail_trans.trans_discount} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', textAlign: 'right' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:(
null
)
)
:
(
null
)
)
:
(
null
)
)
:
(
null
)
}
}
<
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'
}}
>
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> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
point_reduce
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
detail_trans
.
point_reduce
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
20
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'right'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
...
@@ -321,11 +321,23 @@ class OrderDetail extends React.Component {
...
@@ -321,11 +321,23 @@ 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
:
22
,
fontFamily
:
'Gotham-Black'
}}
>
Cancel
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontFamily
:
'Gotham-Black'
}}
>
Cancel
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity>
)
:
(
null
)
<
/TouchableOpacity>
)
:
(
null
)
}
}
{
this
.
state
.
trans_status
==
4
?
(
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
item
.
id
})}
>
<
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
}}
>
Rating
Order
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
)
:
(
null
)
}
...
@@ -385,9 +397,10 @@ const styles = StyleSheet.create({
...
@@ -385,9 +397,10 @@ const styles = StyleSheet.create({
borderWidth
:
1
,
borderWidth
:
1
,
},
},
button
:
{
button
:
{
backgroundColor
:
'#CFB368'
,
backgroundColor
:
'#d34343'
,
height
:
40
,
marginTop
:
25
,
marginTop
:
25
,
marginHorizontal
:
3
0
,
marginHorizontal
:
2
0
,
borderRadius
:
10
,
borderRadius
:
10
,
paddingVertical
:
5
,
paddingVertical
:
5
,
alignItems
:
'center'
,
alignItems
:
'center'
,
...
...
view/OrderHistory.js
View file @
70f52f85
...
@@ -88,18 +88,6 @@ class OrderHistory extends React.Component {
...
@@ -88,18 +88,6 @@ class OrderHistory extends React.Component {
<
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
>
{
this
.
trans_status
==
4
?(
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
item
.
id
})}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
,
marginRight
:
20
,
marginLeft
:
20
,
marginTop
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
12
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
Rating
Order
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
):(
null
)
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/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