diff --git a/frontend/src/components/TicketsManagerTabs/index.js b/frontend/src/components/TicketsManagerTabs/index.js index a8a1d4a1..697489de 100644 --- a/frontend/src/components/TicketsManagerTabs/index.js +++ b/frontend/src/components/TicketsManagerTabs/index.js @@ -115,12 +115,14 @@ const TicketsManagerTabs = () => { const [selectedTags, setSelectedTags] = useState([]); const [selectedUsers, setSelectedUsers] = useState([]); - useEffect(() => { - if (user.profile.toUpperCase() === "ADMIN") { - setShowAllTickets(true); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); +useEffect(() => { +if ( +user.profile.toUpperCase() === "ADMIN" || +user.profile.toUpperCase() === "SUPERVISOR" +) { +setShowAllTickets(true); +} +}, [user]); useEffect(() => { if (tab === "search") { @@ -320,7 +322,7 @@ const TicketsManagerTabs = () => { - {profile === "admin" && ( + {(profile === "admin" || profile === "supervisor") && ( )} { required > Admin + Supervisor User diff --git a/frontend/src/rules.js b/frontend/src/rules.js index 17c669ff..76de0548 100644 --- a/frontend/src/rules.js +++ b/frontend/src/rules.js @@ -3,6 +3,16 @@ const rules = { static: [], }, + supervisor: { + static: [ + "dashboard:view", + "tickets-manager:showall", + "ticket-options:deleteTicket", + "contacts-page:deleteContact", + "contact-modal:editUserDefault", + ], + }, + admin: { static: [ //"dashboard:view",