feat: add queue color to tickets list item

This commit is contained in:
canove
2021-01-11 07:22:56 -03:00
parent f642f2c788
commit 90b438025b
6 changed files with 25 additions and 24 deletions

View File

@@ -100,6 +100,8 @@ const reducer = (state, action) => {
if (action.type === "UPDATE_TICKET") {
const ticket = action.payload;
console.log("TICKET", ticket);
const ticketIndex = state.findIndex(t => t.id === ticket.id);
if (ticketIndex !== -1) {
state[ticketIndex] = ticket;