Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eCartPro-Customer
Project
Project
Details
Activity
Releases
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
Dida Adams Arizona
eCartPro-Customer
Commits
53e898dc
Commit
53e898dc
authored
Jul 27, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finishing ngantuk
parent
34e5dab7
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
55 deletions
+71
-55
CartScreen.js
App/Containers/CartScreen.js
+6
-6
DetailOrderScreen.js
App/Containers/DetailOrderScreen.js
+56
-47
MyOrderScreen.js
App/Containers/MyOrderScreen.js
+9
-2
No files found.
App/Containers/CartScreen.js
View file @
53e898dc
...
...
@@ -262,7 +262,7 @@ class CartScreen extends Component {
<
BarIndicator
count
=
{
5
}
color
=
'#4cc9f0'
size
=
{
25
}
/
>
<
/View>
:
<
View
style
=
{[
styles
.
scrollContent
]}
>
<
View
style
=
{{
padding
:
20
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
borderBottomColor
:
'#ececec'
,
borderBottomWidth
:
1
}}
>
{
this
.
state
.
listCart
.
length
!=
0
&&
<
View
style
=
{{
padding
:
20
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
borderBottomColor
:
'#ececec'
,
borderBottomWidth
:
1
}}
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
state
.
arrayCheck
.
length
>
0
&&
this
.
state
.
arrayCheck
.
length
==
this
.
state
.
listCart
.
length
?
...
...
@@ -276,13 +276,13 @@ class CartScreen extends Component {
<
BaseText
onPress
=
{()
=>
{
this
.
state
.
arrayCheck
.
length
>
0
&&
this
.
state
.
arrayCheck
.
length
==
this
.
state
.
listCart
.
length
?
this
.
setState
({
arrayCheck
:
[],
dataCheckout
:
[]})
:
this
.
handleCheckAll
()
}}
text
=
{
"Pilih Semua
O
rang"
}
type
=
{
"bold"
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
15
,
alignSelf
:
'flex-end'
,}}
/
>
}}
text
=
{
"Pilih Semua
Ba
rang"
}
type
=
{
"bold"
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
15
,
alignSelf
:
'flex-end'
,}}
/
>
<
/View
>
<
View
>
<
BaseText
text
=
{
'Hapus'
}
type
=
{
"bold"
}
style
=
{{
opacity
:
.
8
,
color
:
'#4cc9f0'
}}
/
>
<
/View
>
<
/View
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
style
=
{{
backgroundColor
:
'white'
}}
>
<
/View>
}
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
style
=
{
this
.
state
.
listCart
.
length
==
0
?
styles
.
scrollContent
:
{
backgroundColor
:
'white'
}}
>
{
this
.
state
.
listCart
.
map
((
item
,
index
)
=>
{
return
(
<
View
key
=
{
index
}
>
...
...
@@ -384,7 +384,7 @@ class CartScreen extends Component {
<
/View
>
<
View
style
=
{{
width
:
'100%'
,
height
:
15
,
backgroundColor
:
'#ececec'
}}
/
>
{
index
==
this
.
state
.
listCart
.
length
-
1
&&
item
.
default_size
.
length
>
0
&&
<
View
style
=
{{
height
:
200
,
backgroundColor
:
'
#ececec
'
,
width
:
'100%'
}}
/>
}
{
index
==
this
.
state
.
listCart
.
length
-
1
&&
item
.
default_size
.
length
>
0
&&
<
View
style
=
{{
height
:
200
,
backgroundColor
:
'
white
'
,
width
:
'100%'
}}
/>
}
<
/View
>
)
})}
...
...
@@ -398,7 +398,7 @@ class CartScreen extends Component {
<
BaseText
text
=
{
this
.
getTotalCart
()}
type
=
{
"bold"
}
style
=
{{
opacity
:
.
8
,
color
:
'#4cc9f0'
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'40%'
}}
>
<
BaseButton
text
=
{
'Checkout'
}
onPress
=
{()
=>
this
.
handleNavigateCheckout
()}
fontSizeText
=
{
14
}
/
>
<
BaseButton
text
=
{
'Checkout'
}
color
=
{
this
.
state
.
listCart
.
length
==
0
?
'#dedede'
:
'#4cc9f0'
}
onPress
=
{()
=>
this
.
state
.
listCart
.
length
==
0
?
null
:
this
.
handleNavigateCheckout
()}
fontSizeText
=
{
14
}
/
>
<
/View
>
<
/View
>
<
/View
>
...
...
App/Containers/DetailOrderScreen.js
View file @
53e898dc
This diff is collapsed.
Click to expand it.
App/Containers/MyOrderScreen.js
View file @
53e898dc
...
...
@@ -16,6 +16,7 @@ import Api from '../Services/Api';
import
moment
from
'moment'
;
import
Constant
from
'../Lib/Constant'
;
import
{
formatRp
}
from
'../Lib/Utils'
;
import
{
BarIndicator
}
from
'react-native-indicators'
;
class
MyOrderScreen
extends
Component
{
constructor
(
props
)
{
...
...
@@ -23,7 +24,8 @@ class MyOrderScreen extends Component {
this
.
state
=
{
activeTab
:
0
,
listOrder
:
[],
currency
:
''
currency
:
''
,
loading
:
false
}
}
backAction
=
()
=>
{
...
...
@@ -38,10 +40,12 @@ class MyOrderScreen extends Component {
}
getListOrder
()
{
this
.
setState
({
loading
:
true
})
Api
.
create
().
getOrder
().
then
((
response
)
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
listOrder
:
response
.
data
.
data
})
}
this
.
setState
({
loading
:
false
})
})
}
...
...
@@ -98,6 +102,9 @@ class MyOrderScreen extends Component {
<
View
style
=
{{
zIndex
:
99
}}
>
<
BaseHeader
leftText
=
{
'Pesanan Saya'
}
onBackPress
=
{
this
.
backAction
}
/
>
<
/View
>
{
this
.
state
.
loading
?
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
,
borderTopLeftRadius
:
32
,
borderTopRightRadius
:
32
}}
>
<
BarIndicator
count
=
{
5
}
color
=
'#4cc9f0'
size
=
{
25
}
/
>
<
/View>
:
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
,
...
...
@@ -194,7 +201,7 @@ class MyOrderScreen extends Component {
<
/View
>
<
/Tab
>
<
/Tabs
>
<
/View
>
<
/View>
}
<
/Container
>
)
}
...
...
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