From 02ae94e226acb06b00ced91409f09797c0dbd5c5 Mon Sep 17 00:00:00 2001 From: andreapier Date: Wed, 2 Oct 2024 12:49:52 +0200 Subject: [PATCH] Update orders list when an order is closed --- src/cappanna-helper-app/src/reducers/orders.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cappanna-helper-app/src/reducers/orders.js b/src/cappanna-helper-app/src/reducers/orders.js index a340b9d..3931cdb 100644 --- a/src/cappanna-helper-app/src/reducers/orders.js +++ b/src/cappanna-helper-app/src/reducers/orders.js @@ -2,6 +2,7 @@ import { LOAD_ORDERS_LIST_COMPLETED, ORDER_CREATED, ORDER_CHANGED, + ORDER_CLOSED, ORDER_PRINTED, TOGGLE_ORDERS_LIST_FILTER_BY_USER, TOGGLE_ORDERS_LIST_FILTER_BY_STAND, @@ -41,7 +42,8 @@ const orders = (state = initialState, action) => { return { ...state, items: [action.payload].concat(state.items) }; case ORDER_CHANGED: - case ORDER_PRINTED: { + case ORDER_PRINTED: + case ORDER_CLOSED: { let found = false; return {