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:
@@ -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' => [],
|
||||
|
||||
Reference in New Issue
Block a user