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
6e3f99c0
Commit
6e3f99c0
authored
Apr 27, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
# Conflicts: # redux/globalReducer.js
parents
d47eebb0
baf57aa8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
globalReducer.js
redux/globalReducer.js
+5
-3
DeliveryAddrees.js
view/DeliveryAddrees.js
+8
-3
MenuSelection.js
view/MenuSelection.js
+3
-2
PickupName.js
view/PickupName.js
+10
-3
No files found.
redux/globalReducer.js
View file @
6e3f99c0
...
...
@@ -58,7 +58,9 @@ const globalState = {
order_quantity
:
0
,
order_total
:
0
,
address
:
''
address
:
''
,
addressId
:
''
}
const
rootReducer
=
(
state
=
globalState
,
action
)
=>
{
...
...
@@ -205,8 +207,8 @@ const rootReducer = (state = globalState, action) => {
case
ActionType
.
SET_ADDRESS
:
{
return
{
...
state
,
address
:
action
.
data
.
address
address
:
action
.
data
.
address
,
addressId
:
action
.
data
.
addressId
}
}
case
ActionType
.
SET_LOGOUT
:
{
...
...
view/DeliveryAddrees.js
View file @
6e3f99c0
...
...
@@ -15,7 +15,7 @@ class DeliveryAddrees extends React.Component {
componentDidMount
()
{
this
.
getAddreess
()
console
.
log
(
this
.
props
)
console
.
log
(
"INI ID ADDRESS : "
+
this
.
props
.
addressId
)
}
onChangeAddress
=
data
=>
{
...
...
@@ -35,12 +35,13 @@ class DeliveryAddrees extends React.Component {
for
(
let
i
=
0
;
i
<
dataAlamat
.
length
;
i
++
)
{
const
element
=
dataAlamat
[
i
];
address
.
push
(
element
)
}
this
.
setState
({
data
:
address
})
console
.
log
(
this
.
state
.
data
[
0
].
id
)
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
...
...
@@ -69,7 +70,8 @@ class DeliveryAddrees extends React.Component {
)
let
setDataAddress
=
{
address
:
address
address
:
address
,
addressId
:
this
.
state
.
data
[
0
].
id
}
this
.
props
.
setAddress
(
setDataAddress
);
...
...
@@ -162,9 +164,11 @@ const styles = StyleSheet.create({
})
const
mapStateToProps
=
(
state
)
=>
{
console
.
log
(
"INI STATE : "
+
JSON
.
stringify
(
state
))
return
{
session_id
:
state
.
session_id
,
addressId
:
state
.
addressId
}
}
...
...
@@ -177,6 +181,7 @@ const mapDispatchToProps = (dispacth) => {
data
:
{
address
:
setDataAddress
.
address
,
addressId
:
setDataAddress
.
addressId
}
}),
}
...
...
view/MenuSelection.js
View file @
6e3f99c0
...
...
@@ -28,7 +28,7 @@ class MenuSelection extends React.Component {
this
.
getMenuList
()
// console.log("INI TOTAL ORDER : " + this.props.orders)
// console.log("INI TOTAL QTY :" + this.props.quantity)
console
.
log
(
"INI O
RDERAN NYA :"
+
JSON
.
stringify
(
this
.
props
.
cart_shop
))
console
.
log
(
"INI O
ETLET :"
+
JSON
.
stringify
(
this
.
props
.
outlet_id
))
}
getMenuList
()
{
...
...
@@ -288,7 +288,8 @@ const mapStateToProps = (state) => {
order_quantity
:
state
.
order_quantity
,
order_total
:
state
.
order_total
,
quantity
:
state
.
quantity
,
address
:
state
.
address
address
:
state
.
address
,
// qty: state.qty,
// totalOrder: state.totalOrder,
// totalQty: state.totalQty,
...
...
view/PickupName.js
View file @
6e3f99c0
...
...
@@ -64,8 +64,15 @@ class PickupName extends React.Component {
this
.
getOutlet
()
}
getOutletDetail
(
id
)
{
this
.
props
.
navigation
.
navigate
(
'Outlet Detail'
,{
id
:
id
})
getOutletDetail
(
id
,
name
)
{
let
OutletChange
=
{
outlet_id
:
id
,
name_outlet
:
name
,
}
this
.
props
.
setChangeOutletProps
(
OutletChange
);
this
.
props
.
navigation
.
navigate
(
"Menu Select"
)
}
getOutlet
()
{
...
...
@@ -190,7 +197,7 @@ class PickupName extends React.Component {
<
/Text
>
<
/View
>
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
getOutletDetail
(
item
.
id
)}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
getOutletDetail
(
item
.
id
,
item
.
name
)}
>
<
CheckBox
center
checkedIcon
=
'dot-circle-o'
...
...
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