fix: move /settings route before /{ticket} wildcard; fix null tickets on bootstrap

Route ordering caused /settings to be captured by the /{ticket} wildcard,
returning 404. Also pass safe empty pagination object when no groups exist
to prevent TypeError reading .total on null. Closes #2 #3.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joel Wedemire
2026-04-09 21:31:50 -07:00
parent a66f61c638
commit 1bc34ff16f
2 changed files with 35 additions and 30 deletions

View File

@@ -61,7 +61,7 @@ class TicketController extends Controller
$totalGroups = TicketingGroup::count();
if ($totalGroups === 0) {
return Inertia::render('Ticketing/Index', [
'tickets' => null,
'tickets' => ['data' => [], 'total' => 0, 'per_page' => 20, 'current_page' => 1, 'last_page' => 1],
'groups' => [],
'priorities' => [],
'projects' => [],