From e388b69839255bbe197857bf9fe8172cbc72955b Mon Sep 17 00:00:00 2001 From: canove Date: Wed, 29 Jul 2020 16:38:00 -0300 Subject: [PATCH] fix: show all tickets not working when mytickets=0 --- frontend/src/components/TicketsList/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/TicketsList/index.js b/frontend/src/components/TicketsList/index.js index 1669f5a..846ade6 100644 --- a/frontend/src/components/TicketsList/index.js +++ b/frontend/src/components/TicketsList/index.js @@ -349,7 +349,6 @@ const TicketsList = () => { }; const handleSearchContact = e => { - // let searchTerm = e.target.value.toLowerCase(); setSearchParam(e.target.value.toLowerCase()); }; @@ -371,7 +370,9 @@ const TicketsList = () => { const countTickets = (status, userId) => { const ticketsFound = tickets.filter( - t => t.status === status && t.userId === userId + t => + (t.status === status && t.userId === userId) || + (t.status === status && showAllTickets) ).length; if (ticketsFound === 0) return "";