From 71022b77821dd0a5d9e179a58ee9673bdebd7d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Castillo?= Date: Mon, 23 Dec 2024 17:29:05 -0300 Subject: [PATCH] Fix issue with attendee UI when a new ticket is added MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Castillo --- src/reducers/attendees/attendee-reducer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/reducers/attendees/attendee-reducer.js b/src/reducers/attendees/attendee-reducer.js index 3e57fea94..c3f63c9b1 100644 --- a/src/reducers/attendees/attendee-reducer.js +++ b/src/reducers/attendees/attendee-reducer.js @@ -95,12 +95,14 @@ const attendeeReducer = (state = DEFAULT_STATE, action = {}) => { return { ...state }; } case TICKET_ADDED: { - const newTicket = payload.response; + const newOrder = payload.response; + const newTicket = newOrder.tickets[0]; return { ...state, entity: { ...state.entity, - tickets: [...state.entity.tickets, newTicket] + tickets: [...state.entity.tickets, newTicket], + orders: [...state.entity.orders, newOrder] } }; }