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
15cb4e61
Commit
15cb4e61
authored
Jul 27, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
70171da7
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
348 additions
and
210 deletions
+348
-210
BaseHeader.js
App/Components/BaseHeader.js
+1
-1
CartScreen.js
App/Containers/CartScreen.js
+129
-99
CheckOutScreen.js
App/Containers/CheckOutScreen.js
+89
-59
DeliveryScreen.js
App/Containers/DeliveryScreen.js
+100
-37
HomePageScreen.js
App/Containers/HomePageScreen.js
+3
-2
PaymentMethodScreen.js
App/Containers/PaymentMethodScreen.js
+17
-11
icon_delete.png
App/Images/Icons/icon_delete.png
+0
-0
Api.js
App/Services/Api.js
+8
-1
Images.js
App/Themes/Images.js
+1
-0
No files found.
App/Components/BaseHeader.js
View file @
15cb4e61
...
@@ -85,7 +85,7 @@ export default class BaseHeader extends Component {
...
@@ -85,7 +85,7 @@ export default class BaseHeader extends Component {
<
/View>
}
<
/View>
}
{
this
.
props
.
notification
&&
<
View
style
=
{{
alignItems
:
'center'
,
width
:
'100%'
,
paddingBottom
:
10
,
paddingHorizontal
:
20
,
height
:
STATUSBAR_HEIGHT
+
60
,
paddingTop
:
50
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
backgroundColor
:
'#4cc9f0'
}}
>
{
this
.
props
.
notification
&&
<
View
style
=
{{
alignItems
:
'center'
,
width
:
'100%'
,
paddingBottom
:
10
,
paddingHorizontal
:
20
,
height
:
STATUSBAR_HEIGHT
+
60
,
paddingTop
:
50
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
backgroundColor
:
'#4cc9f0'
}}
>
<
TouchableOpacity
onPress
=
{
this
.
props
.
onBackPress
}
style
=
{{
marginBottom
:
-
3
,
flexDirection
:
'row'
}}
>
<
TouchableOpacity
onPress
=
{
this
.
props
.
onBackPress
}
style
=
{{
marginBottom
:
-
3
,
flexDirection
:
'row'
}}
>
<
Image
source
=
{
Images
.
icon_backwhite
}
style
=
{{
width
:
20
,
height
:
15
,
alignSelf
:
'center'
}}
/
>
{
/* <Image source={Images.icon_backwhite} style={{ width: 20, height: 15, alignSelf: 'center' }} /> */
}
<
BaseText
text
=
{
this
.
props
.
leftText
}
type
=
{
'bold'
}
style
=
{{
marginLeft
:
10
,
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
/
>
<
BaseText
text
=
{
this
.
props
.
leftText
}
type
=
{
'bold'
}
style
=
{{
marginLeft
:
10
,
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
,
alignSelf
:
'center'
,
marginBottom
:
-
3
,
}}
onPress
=
{
this
.
props
.
notificationPress
}
>
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
,
alignSelf
:
'center'
,
marginBottom
:
-
3
,
}}
onPress
=
{
this
.
props
.
notificationPress
}
>
...
...
App/Containers/CartScreen.js
View file @
15cb4e61
This diff is collapsed.
Click to expand it.
App/Containers/CheckOutScreen.js
View file @
15cb4e61
This diff is collapsed.
Click to expand it.
App/Containers/DeliveryScreen.js
View file @
15cb4e61
This diff is collapsed.
Click to expand it.
App/Containers/HomePageScreen.js
View file @
15cb4e61
...
@@ -20,6 +20,7 @@ import { NavigationEvents } from 'react-navigation';
...
@@ -20,6 +20,7 @@ import { NavigationEvents } from 'react-navigation';
import
Toast
from
'react-native-toast-message'
;
import
Toast
from
'react-native-toast-message'
;
import
Api
from
'../Services/Api'
;
import
Api
from
'../Services/Api'
;
import
Constant
from
'../Lib/Constant'
import
Constant
from
'../Lib/Constant'
import
{
titleCase
}
from
'../Lib/Utils'
;
class
HomePageScreen
extends
Component
{
class
HomePageScreen
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -83,9 +84,9 @@ class HomePageScreen extends Component {
...
@@ -83,9 +84,9 @@ class HomePageScreen extends Component {
<
View
style
=
{{
width
:
'50%'
,
paddingTop
:
30
}}
>
<
View
style
=
{{
width
:
'50%'
,
paddingTop
:
30
}}
>
<
Image
source
=
{
Images
.
logo_eCart
}
style
=
{{
width
:
120
,
height
:
35
}}
/
>
<
Image
source
=
{
Images
.
logo_eCart
}
style
=
{{
width
:
120
,
height
:
35
}}
/
>
<
View
style
=
{{
elevation
:
5
,
width
:
85
,
height
:
85
,
borderRadius
:
85
,
borderWidth
:
46
,
borderColor
:
'white'
,
marginTop
:
25
,
backgroundColor
:
'red'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,}}
>
<
View
style
=
{{
elevation
:
5
,
width
:
85
,
height
:
85
,
borderRadius
:
85
,
borderWidth
:
46
,
borderColor
:
'white'
,
marginTop
:
25
,
backgroundColor
:
'red'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,}}
>
<
Image
source
=
{
Images
.
beautyProduct
}
style
=
{{
width
:
85
,
height
:
85
,
borderRadius
:
85
}}
/
>
<
Image
source
=
{
{
uri
:
this
.
state
.
user
!=
null
?
'https://apiecart.eksad.com/'
+
this
.
state
.
user
.
data
.
user_image
:
Images
.
beautyProduct
}
}
style
=
{{
width
:
85
,
height
:
85
,
borderRadius
:
85
}}
/
>
<
/View
>
<
/View
>
<
BaseText
type
=
{
"bold"
}
text
=
{
'Kang Dadang'
}
style
=
{{
fontSize
:
18
,
color
:
'#4b4b4b'
,
marginLeft
:
5
,
marginTop
:
10
}}
/
>
<
BaseText
type
=
{
"bold"
}
text
=
{
this
.
state
.
user
!=
null
?
titleCase
(
this
.
state
.
user
.
data
.
user_name
)
:
'Kang Dadang'
}
style
=
{{
fontSize
:
18
,
color
:
'#4b4b4b'
,
marginLeft
:
5
,
marginTop
:
10
}}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
alignItems
:
'flex-end'
}}
>
<
View
style
=
{{
width
:
'50%'
,
alignItems
:
'flex-end'
}}
>
{
/* <Image source={Images.sliceCircleBlue} style={{width: '100%', height: 150}}/> */
}
{
/* <Image source={Images.sliceCircleBlue} style={{width: '100%', height: 150}}/> */
}
...
...
App/Containers/PaymentMethodScreen.js
View file @
15cb4e61
...
@@ -23,7 +23,8 @@ class PaymentMethodScreen extends Component {
...
@@ -23,7 +23,8 @@ class PaymentMethodScreen extends Component {
loading
:
false
,
loading
:
false
,
currency
:
''
,
currency
:
''
,
paymentMethod
:
[],
paymentMethod
:
[],
paymentID
:
0
paymentID
:
0
,
paymentName
:
''
}
}
}
}
...
@@ -51,6 +52,7 @@ class PaymentMethodScreen extends Component {
...
@@ -51,6 +52,7 @@ class PaymentMethodScreen extends Component {
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
Api
.
create
().
getPaymentMethod
().
then
(
response
=>
{
Api
.
create
().
getPaymentMethod
().
then
(
response
=>
{
if
(
response
.
data
.
status
==
"success"
)
{
if
(
response
.
data
.
status
==
"success"
)
{
console
.
log
(
response
.
data
)
this
.
setState
({
this
.
setState
({
paymentMethod
:
response
.
data
.
data
.
reverse
(),
paymentMethod
:
response
.
data
.
data
.
reverse
(),
loading
:
false
loading
:
false
...
@@ -72,6 +74,7 @@ class PaymentMethodScreen extends Component {
...
@@ -72,6 +74,7 @@ class PaymentMethodScreen extends Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginTop
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginTop
:
10
}}
>
<
BaseText
text
=
{
'Use'
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
}}
/
>
<
BaseText
text
=
{
'Use'
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
}}
/
>
<
BaseText
text
=
{
this
.
state
.
paymentName
}
type
=
{
'bold'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
10
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#ececec'
}}
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#ececec'
}}
>
...
@@ -85,23 +88,26 @@ class PaymentMethodScreen extends Component {
...
@@ -85,23 +88,26 @@ class PaymentMethodScreen extends Component {
}
}
{
this
.
state
.
paymentMethod
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
paymentMethod
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
View
style
=
{{
flexDirection
:
'row'
,
backgroundColor
:
'white'
,
padding
:
20
,
borderBottomWidth
:
1
,
borderBottomColor
:
'#e0e0e0'
,
justifyContent
:
'space-between'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
props
.
navigation
.
state
.
params
.
setProps
({
paymentMethod
:
item
})
this
.
setState
({
paymentID
:
item
.
payment_method_id
,
paymentName
:
item
.
payment_method_name
});
}}
style
=
{{
flexDirection
:
'row'
,
backgroundColor
:
'white'
,
padding
:
20
,
borderBottomWidth
:
1
,
borderBottomColor
:
'#e0e0e0'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
TouchableOpacity
<
View
style
=
{
this
.
state
.
paymentID
==
item
.
payment_method_id
?
styles
.
radioCircleClick
:
styles
.
radioCircle
}
style
=
{
this
.
state
.
paymentID
==
item
.
payment_method_id
?
styles
.
radioCircleClick
:
styles
.
radioCircle
}
>
onPress
=
{()
=>
{
this
.
setState
({
paymentID
:
item
.
payment_method_id
,
});
}}
>
{
this
.
state
.
paymentID
==
item
.
payment_method_id
&&
<
View
style
=
{
styles
.
selectedRb
}
/>
}
{
this
.
state
.
paymentID
==
item
.
payment_method_id
&&
<
View
style
=
{
styles
.
selectedRb
}
/>
}
<
/
TouchableOpacity
>
<
/
View
>
<
BaseText
text
=
{
item
.
payment_method_name
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
20
}}
/
>
<
BaseText
text
=
{
item
.
payment_method_name
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
20
}}
/
>
<
/View
>
<
/View
>
{
item
.
value
!=
0
&&
index
==
0
?
{
item
.
value
!=
0
&&
index
==
0
?
<
BaseText
text
=
{
item
.
value
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
20
}}
/>
:
<
BaseText
text
=
{
item
.
value
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
20
}}
/>
:
null
}
null
}
<
/
View
>
<
/
TouchableOpacity
>
)
)
})}
})}
<
/View
>
<
/View
>
...
...
App/Images/Icons/icon_delete.png
0 → 100644
View file @
15cb4e61
1.35 KB
App/Services/Api.js
View file @
15cb4e61
...
@@ -75,7 +75,12 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
...
@@ -75,7 +75,12 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
const
getWallet
=
()
=>
api
.
get
(
'get_wallet'
)
const
getWallet
=
()
=>
api
.
get
(
'get_wallet'
)
const
topUpWallet
=
(
body
)
=>
api
.
post
(
'topup_wallet'
,
body
)
const
topUpWallet
=
(
body
)
=>
api
.
post
(
'topup_wallet'
,
body
)
const
getPaymentMethod
=
()
=>
api
.
get
(
'get_payment_method'
)
const
getPaymentMethod
=
()
=>
api
.
get
(
'get_payment_method'
)
// Courier
const
getCategoryCourier
=
()
=>
api
.
get
(
'get_category_courier'
)
const
getCategoryCourier
=
()
=>
api
.
get
(
'get_category_courier'
)
const
getEstimateCourier
=
(
rateId
)
=>
api
.
get
(
`get_estimate_courier/
${
rateId
}
`
)
const
getEstimateDelivery
=
(
courierId
)
=>
api
.
get
(
`get_estimate_delivery/
${
courierId
}
`
)
// Deal Of The Day
// Deal Of The Day
const
getPeriodeDeal
=
(
body
)
=>
api
.
post
(
'get_deal_product_per_periode'
,
body
)
const
getPeriodeDeal
=
(
body
)
=>
api
.
post
(
'get_deal_product_per_periode'
,
body
)
...
@@ -189,7 +194,9 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
...
@@ -189,7 +194,9 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
getNotification
,
getNotification
,
getDetailNotif
,
getDetailNotif
,
readNotification
,
readNotification
,
readAllNotification
readAllNotification
,
getEstimateCourier
,
getEstimateDelivery
,
}
}
}
}
...
...
App/Themes/Images.js
View file @
15cb4e61
...
@@ -52,6 +52,7 @@ const images = {
...
@@ -52,6 +52,7 @@ const images = {
icon_coupon
:
require
(
'../Images/Icons/icon_coupon.png'
),
icon_coupon
:
require
(
'../Images/Icons/icon_coupon.png'
),
icon_check
:
require
(
'../Images/Icons/icon_check.png'
),
icon_check
:
require
(
'../Images/Icons/icon_check.png'
),
icon_pembayaran
:
require
(
'../Images/Icons/icon_pembayaran.png'
),
icon_pembayaran
:
require
(
'../Images/Icons/icon_pembayaran.png'
),
icon_delete
:
require
(
'../Images/Icons/icon_delete.png'
),
// big image
// big image
letter
:
require
(
'../Images/letter.png'
),
letter
:
require
(
'../Images/letter.png'
),
...
...
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