Commit 698916df authored by Afid's avatar Afid

update menu note

parent af4812ae
...@@ -733,19 +733,20 @@ const rootReducer = (state = globalState, action) => { ...@@ -733,19 +733,20 @@ const rootReducer = (state = globalState, action) => {
} }
} }
// // Cara 2 // Cara 2
// updated_data = state.order_item updated_menu = state.menu_item
// // dicari dulu index keberapa yg mau diupdate notenya // dicari dulu index keberapa yg mau diupdate notenya
// update_index = state.order_item.findIndex((obj => obj.id == update.id)); update_index = state.menu_item.findIndex((obj => obj.id == update.id));
// // update note // update note
// updated_data[update_index].note = update.note updated_menu[update_index].note = update.note
return { return {
...state, ...state,
order_item: updated_data, order_item: updated_data,
menu_item: updated_menu,
} }
} }
......
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