Fix My Tickets and queue filter
Build & Push / Build Server (push) Successful in 58s
Build & Push / Build Client (push) Successful in 41s

- My Tickets: exclude RESOLVED and CLOSED, show active tickets only
- Queue filter: cascading Category > Type > Item picker — each leaf is
  a distinct queue (e.g. TheWrightServer > Automation > Backup vs Sync)
- Server: support typeId and itemId as ticket list filter params

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 23:35:33 -04:00
parent 725f91578d
commit d751e36ae8
3 changed files with 190 additions and 28 deletions
+11 -5
View File
@@ -15,9 +15,16 @@ export default function MyTickets() {
useEffect(() => {
if (!user) return
api
.get<Ticket[]>('/tickets', { params: { assigneeId: user.id } })
.then((r) => setTickets(r.data))
// Only show active tickets — OPEN and IN_PROGRESS
Promise.all([
api.get<Ticket[]>('/tickets', { params: { assigneeId: user.id, status: 'OPEN' } }),
api.get<Ticket[]>('/tickets', { params: { assigneeId: user.id, status: 'IN_PROGRESS' } }),
])
.then(([openRes, inProgressRes]) => {
const combined = [...openRes.data, ...inProgressRes.data]
combined.sort((a, b) => a.severity - b.severity || new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime())
setTickets(combined)
})
.finally(() => setLoading(false))
}, [user])
@@ -27,7 +34,7 @@ export default function MyTickets() {
<div className="text-center py-16 text-gray-600 text-sm">Loading...</div>
) : tickets.length === 0 ? (
<div className="text-center py-16 text-gray-600 text-sm">
No tickets assigned to you
No active tickets assigned to you
</div>
) : (
<div className="space-y-1.5">
@@ -37,7 +44,6 @@ export default function MyTickets() {
to={`/tickets/${ticket.displayId}`}
className="flex items-center gap-4 bg-gray-900 border border-gray-800 rounded-lg px-4 py-3 hover:border-blue-500/50 transition-all group"
>
{/* Severity stripe */}
<div
className={`w-1 self-stretch rounded-full flex-shrink-0 ${
ticket.severity === 1