Commit b50fa240 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Conflicts:
#	redux/globalReducer.js
parents eb244595 8d16db48
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment