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
03e4a898
Commit
03e4a898
authored
Apr 24, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change address redux
parent
560b2871
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
21 deletions
+25
-21
DeliveryAddrees.js
view/DeliveryAddrees.js
+22
-20
MenuSelection.js
view/MenuSelection.js
+1
-0
ShoppingCart.js
view/ShoppingCart.js
+2
-1
No files found.
view/DeliveryAddrees.js
View file @
03e4a898
...
@@ -63,7 +63,7 @@ class DeliveryAddrees extends React.Component {
...
@@ -63,7 +63,7 @@ class DeliveryAddrees extends React.Component {
'Apakah anda akan memilih alamat untuk pengiriman ?'
,
'Apakah anda akan memilih alamat untuk pengiriman ?'
,
[
[
{
text
:
'OK'
,
onPress
:
()
=>
this
.
props
.
navigation
.
navigate
(
''
)},
{
text
:
'OK'
,
onPress
:
()
=>
this
.
props
.
navigation
.
navigate
(
'
Menu Select
'
)},
],
],
{
cancelable
:
false
}
{
cancelable
:
false
}
)
)
...
@@ -75,25 +75,27 @@ class DeliveryAddrees extends React.Component {
...
@@ -75,25 +75,27 @@ class DeliveryAddrees extends React.Component {
this
.
props
.
setAddress
(
setDataAddress
);
this
.
props
.
setAddress
(
setDataAddress
);
}
}
render
()
{
function
Item
({
name
,
description
,
address
})
{
renderItem
=
({
item
})
=>
{
return
(
return
(
<
View
style
=
{
styles
.
list_addrees
}
>
<
View
style
=
{
styles
.
list_addrees
}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
onSave
(
address
)}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
onSave
(
item
.
address
)}
>
<
View
style
=
{{
margin
:
5
,
}}
>
<
View
style
=
{{
margin
:
5
,
}}
>
<
Text
style
=
{{
fontWeight
:
'bold'
,
fontSize
:
20
}}
>
{
name
}
<
/Text
>
<
Text
style
=
{{
fontWeight
:
'bold'
,
fontSize
:
20
}}
>
{
item
.
name
}
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{{
margin
:
5
}}
>
<
Text
style
=
{{
margin
:
5
}}
>
{
address
}
{
item
.
address
}
<
/Text
>
<
/Text
>
<
Text
style
=
{{
margin
:
5
}}
>
<
Text
style
=
{{
margin
:
5
}}
>
Patokan
:
{
description
}
Patokan
:
{
item
.
description
}
<
/Text
>
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
);
);
}
}
render
()
{
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
header
}
>
...
@@ -107,7 +109,7 @@ class DeliveryAddrees extends React.Component {
...
@@ -107,7 +109,7 @@ class DeliveryAddrees extends React.Component {
<
FlatList
<
FlatList
data
=
{
this
.
state
.
data
}
data
=
{
this
.
state
.
data
}
renderItem
=
{
({
item
})
=>
<
Item
name
=
{
item
.
name
}
description
=
{
item
.
description
}
address
=
{
item
.
address
}
/>
}
renderItem
=
{
this
.
renderItem
}
keyExtractor
=
{
item
=>
item
.
id
}
keyExtractor
=
{
item
=>
item
.
id
}
/
>
/
>
{
/*
{
/*
...
@@ -180,5 +182,5 @@ const mapDispatchToProps = (dispacth) => {
...
@@ -180,5 +182,5 @@ const mapDispatchToProps = (dispacth) => {
}
}
}
}
export
default
connect
(
mapStateToProps
)(
DeliveryAddrees
)
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
DeliveryAddrees
)
view/MenuSelection.js
View file @
03e4a898
...
@@ -218,6 +218,7 @@ const mapStateToProps = (state) => {
...
@@ -218,6 +218,7 @@ const mapStateToProps = (state) => {
order_quantity
:
state
.
order_quantity
,
order_quantity
:
state
.
order_quantity
,
order_total
:
state
.
order_total
,
order_total
:
state
.
order_total
,
quantity
:
state
.
quantity
,
quantity
:
state
.
quantity
,
address
:
state
.
address
// qty: state.qty,
// qty: state.qty,
// totalOrder: state.totalOrder,
// totalOrder: state.totalOrder,
// totalQty: state.totalQty,
// totalQty: state.totalQty,
...
...
view/ShoppingCart.js
View file @
03e4a898
...
@@ -360,7 +360,7 @@ class ShoppingCart extends React.Component {
...
@@ -360,7 +360,7 @@ class ShoppingCart extends React.Component {
<
Text
style
=
{{
paddingLeft
:
20
,
paddingTop
:
10
,
color
:
'gray'
}}
>
Tujuan
<
/Text
>
<
Text
style
=
{{
paddingLeft
:
20
,
paddingTop
:
10
,
color
:
'gray'
}}
>
Tujuan
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
Text
style
=
{{
color
:
'#ccb46c'
,
paddingRight
:
150
,
paddingTop
:
10
}}
>
undefined
<
/Text
>
<
Text
style
=
{{
color
:
'#ccb46c'
,
paddingRight
:
150
,
paddingTop
:
10
}}
>
{
this
.
props
.
address
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
}}
>
<
View
style
=
{{
margin
:
20
,
}}
>
...
@@ -513,6 +513,7 @@ const mapStateToProps = (state) => {
...
@@ -513,6 +513,7 @@ const mapStateToProps = (state) => {
order_total
:
state
.
order_total
,
order_total
:
state
.
order_total
,
order_item
:
state
.
order_item
,
order_item
:
state
.
order_item
,
quantity
:
state
.
quantity
,
quantity
:
state
.
quantity
,
address
:
state
.
address
}
}
}
}
...
...
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