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
416a101b
Commit
416a101b
authored
Jul 27, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
update See merge request
!49
parents
70171da7
15cb4e61
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 @
416a101b
...
...
@@ -85,7 +85,7 @@ export default class BaseHeader extends Component {
<
/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'
}}
>
<
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'
}}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
,
alignSelf
:
'center'
,
marginBottom
:
-
3
,
}}
onPress
=
{
this
.
props
.
notificationPress
}
>
...
...
App/Containers/CartScreen.js
View file @
416a101b
This diff is collapsed.
Click to expand it.
App/Containers/CheckOutScreen.js
View file @
416a101b
This diff is collapsed.
Click to expand it.
App/Containers/DeliveryScreen.js
View file @
416a101b
This diff is collapsed.
Click to expand it.
App/Containers/HomePageScreen.js
View file @
416a101b
...
...
@@ -20,6 +20,7 @@ import { NavigationEvents } from 'react-navigation';
import
Toast
from
'react-native-toast-message'
;
import
Api
from
'../Services/Api'
;
import
Constant
from
'../Lib/Constant'
import
{
titleCase
}
from
'../Lib/Utils'
;
class
HomePageScreen
extends
Component
{
constructor
(
props
)
{
...
...
@@ -83,9 +84,9 @@ class HomePageScreen extends Component {
<
View
style
=
{{
width
:
'50%'
,
paddingTop
:
30
}}
>
<
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'
,}}
>
<
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
>
<
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
style
=
{{
width
:
'50%'
,
alignItems
:
'flex-end'
}}
>
{
/* <Image source={Images.sliceCircleBlue} style={{width: '100%', height: 150}}/> */
}
...
...
App/Containers/PaymentMethodScreen.js
View file @
416a101b
...
...
@@ -23,7 +23,8 @@ class PaymentMethodScreen extends Component {
loading
:
false
,
currency
:
''
,
paymentMethod
:
[],
paymentID
:
0
paymentID
:
0
,
paymentName
:
''
}
}
...
...
@@ -51,6 +52,7 @@ class PaymentMethodScreen extends Component {
this
.
setState
({
loading
:
true
})
Api
.
create
().
getPaymentMethod
().
then
(
response
=>
{
if
(
response
.
data
.
status
==
"success"
)
{
console
.
log
(
response
.
data
)
this
.
setState
({
paymentMethod
:
response
.
data
.
data
.
reverse
(),
loading
:
false
...
...
@@ -72,6 +74,7 @@ class PaymentMethodScreen extends Component {
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginTop
:
10
}}
>
<
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
style
=
{{
flex
:
1
,
backgroundColor
:
'#ececec'
}}
>
...
...
@@ -85,23 +88,26 @@ class PaymentMethodScreen extends Component {
}
{
this
.
state
.
paymentMethod
.
map
((
item
,
index
)
=>
{
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'
}}
>
<
TouchableOpacity
style
=
{
this
.
state
.
paymentID
==
item
.
payment_method_id
?
styles
.
radioCircleClick
:
styles
.
radioCircle
}
onPress
=
{()
=>
{
this
.
setState
({
paymentID
:
item
.
payment_method_id
,
});
}}
>
<
View
style
=
{
this
.
state
.
paymentID
==
item
.
payment_method_id
?
styles
.
radioCircleClick
:
styles
.
radioCircle
}
>
{
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
}}
/
>
<
/View
>
{
item
.
value
!=
0
&&
index
==
0
?
<
BaseText
text
=
{
item
.
value
}
type
=
{
'regular'
}
style
=
{{
opacity
:
.
7
,
fontSize
:
12
,
marginLeft
:
20
}}
/>
:
null
}
<
/
View
>
<
/
TouchableOpacity
>
)
})}
<
/View
>
...
...
App/Images/Icons/icon_delete.png
0 → 100644
View file @
416a101b
1.35 KB
App/Services/Api.js
View file @
416a101b
...
...
@@ -75,7 +75,12 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
const
getWallet
=
()
=>
api
.
get
(
'get_wallet'
)
const
topUpWallet
=
(
body
)
=>
api
.
post
(
'topup_wallet'
,
body
)
const
getPaymentMethod
=
()
=>
api
.
get
(
'get_payment_method'
)
// 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
const
getPeriodeDeal
=
(
body
)
=>
api
.
post
(
'get_deal_product_per_periode'
,
body
)
...
...
@@ -189,7 +194,9 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
getNotification
,
getDetailNotif
,
readNotification
,
readAllNotification
readAllNotification
,
getEstimateCourier
,
getEstimateDelivery
,
}
}
...
...
App/Themes/Images.js
View file @
416a101b
...
...
@@ -52,6 +52,7 @@ const images = {
icon_coupon
:
require
(
'../Images/Icons/icon_coupon.png'
),
icon_check
:
require
(
'../Images/Icons/icon_check.png'
),
icon_pembayaran
:
require
(
'../Images/Icons/icon_pembayaran.png'
),
icon_delete
:
require
(
'../Images/Icons/icon_delete.png'
),
// big image
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