fix: show all tickets not working when mytickets=0

This commit is contained in:
canove
2020-07-29 16:38:00 -03:00
parent a443c82c71
commit e388b69839

View File

@@ -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 "";