Add hero sections to Queue index pages and soften analytics cards.
Deploy Ladill Queue / deploy (push) Successful in 36s
Deploy Ladill Queue / deploy (push) Successful in 36s
Introduce shared x-qms.page-hero with summary stats across queues, tickets, counters, admin pages, and insights; remove bordered cards on Analytics, Reports, Feedback, and Branches list views. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,10 +32,21 @@ class FeedbackAdminController extends Controller
|
||||
->when($branchScope, fn ($q) => $q->whereHas('ticket', fn ($t) => $t->where('branch_id', $branchScope)))
|
||||
->avg('rating');
|
||||
|
||||
$feedbackQuery = CustomerFeedback::owned($owner)
|
||||
->where('organization_id', $organization->id)
|
||||
->when($branchScope, fn ($q) => $q->whereHas('ticket', fn ($t) => $t->where('branch_id', $branchScope)));
|
||||
|
||||
$heroStats = [
|
||||
'total' => (clone $feedbackQuery)->count(),
|
||||
'avg_rating' => round((float) $avgRating, 1),
|
||||
'this_month' => (clone $feedbackQuery)->where('created_at', '>=', now()->startOfMonth())->count(),
|
||||
];
|
||||
|
||||
return view('qms.feedback.index', [
|
||||
'feedback' => $feedback,
|
||||
'organization' => $organization,
|
||||
'avgRating' => round((float) $avgRating, 1),
|
||||
'heroStats' => $heroStats,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user