()
| 174 | }, [data?.tickets, filterSearch]); |
| 175 | |
| 176 | async function fetchUsers() { |
| 177 | await fetch(`/api/v1/users/all`, { |
| 178 | method: "GET", |
| 179 | headers: { |
| 180 | "Content-Type": "application/json", |
| 181 | Authorization: `Bearer ${token}`, |
| 182 | }, |
| 183 | }) |
| 184 | .then((res) => res.json()) |
| 185 | .then((res) => { |
| 186 | if (res) { |
| 187 | setUsers(res.users); |
| 188 | } |
| 189 | }); |
| 190 | } |
| 191 | |
| 192 | async function updateTicketStatus(e: any, ticket: any) { |
| 193 | await fetch(`/api/v1/ticket/status/update`, { |