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
b50fa240
Commit
b50fa240
authored
Jun 04, 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
eb244595
8d16db48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
globalReducer.js
redux/globalReducer.js
+12
-0
No files found.
redux/globalReducer.js
View file @
b50fa240
...
...
@@ -707,6 +707,8 @@ const rootReducer = (state = globalState, action) => {
case
ActionType
.
SET_EDIT_NOTE
:
{
const
update
=
action
.
data
.
item
;
// Cara 1
updated_data
=
[]
for
(
let
i
=
0
;
i
<
state
.
order_item
.
length
;
i
++
)
{
const
old_data
=
state
.
order_item
[
i
];
...
...
@@ -723,6 +725,16 @@ const rootReducer = (state = globalState, action) => {
}
}
// // Cara 2
// updated_data = state.order_item
// // dicari dulu index keberapa yg mau diupdate notenya
// update_index = state.order_item.findIndex((obj => obj.id == update.id));
// // update note
// updated_data[update_index].note = update.note
return
{
...
state
,
order_item
:
updated_data
,
...
...
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