fix(tickets): fix permissions toast, board fallback, assignment search, remove load more
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
- list_resources: return [] on PSAError instead of 502 — stops global interceptor toast when CW API key lacks ticket members permission (Lesson 111) - list_boards/list_priorities: add warning logging so Railway logs reveal the root cause when CW permissions are missing - TicketsPage: derive board options from ticket search results when listBoards returns empty (CW permissions fallback) - TicketFilterBar: replace assignment <select> with searchable member picker — fixed options (All/Mine/Unassigned) + text-filtered member dropdown - TicketQueue: remove Load More / infinite scroll; page now exists at /tickets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,15 @@ export default function TicketsPage() {
|
||||
})
|
||||
setTickets(result.items)
|
||||
setTotal(result.total)
|
||||
// If the boards API returned empty (CW permissions), derive available boards from ticket data
|
||||
setBoards(prev => {
|
||||
if (prev.length > 0) return prev
|
||||
const seen = new Map<number, string>()
|
||||
result.items.forEach(t => {
|
||||
if (t.board_id && t.board_name) seen.set(t.board_id, t.board_name)
|
||||
})
|
||||
return seen.size > 0 ? Array.from(seen, ([id, name]) => ({ id, name })) : prev
|
||||
})
|
||||
} catch {
|
||||
setTickets([])
|
||||
setTotal(0)
|
||||
|
||||
Reference in New Issue
Block a user