From 89300fc6d637e394013131cb678affa82b8268aa Mon Sep 17 00:00:00 2001 From: isaacclad Date: Mon, 6 Jul 2026 08:21:35 +0000 Subject: [PATCH] Drop heroes from analytics pages and remove bordered show cards. Analytics, Reports, Feedback, and Branches use simple headers again; report and related show views use shadow panels instead of card borders. Co-authored-by: Cursor --- app/Http/Controllers/Qms/BranchController.php | 8 +- .../Qms/FeedbackAdminController.php | 11 --- app/Http/Controllers/Qms/ReportController.php | 4 - .../views/qms/admin/branches/create.blade.php | 2 +- .../views/qms/admin/branches/edit.blade.php | 2 +- .../views/qms/admin/branches/index.blade.php | 67 +++++++-------- resources/views/qms/analytics/index.blade.php | 81 +++++++++---------- resources/views/qms/counters/show.blade.php | 6 +- resources/views/qms/displays/show.blade.php | 12 +-- resources/views/qms/feedback/index.blade.php | 61 +++++++------- resources/views/qms/queues/show.blade.php | 6 +- resources/views/qms/reports/index.blade.php | 26 ++---- resources/views/qms/reports/show.blade.php | 14 ++-- resources/views/qms/tickets/show.blade.php | 2 +- resources/views/qms/workflows/show.blade.php | 4 +- 15 files changed, 126 insertions(+), 180 deletions(-) diff --git a/app/Http/Controllers/Qms/BranchController.php b/app/Http/Controllers/Qms/BranchController.php index 9ab9670..d064ebf 100644 --- a/app/Http/Controllers/Qms/BranchController.php +++ b/app/Http/Controllers/Qms/BranchController.php @@ -26,13 +26,7 @@ class BranchController extends Controller ->orderBy('name') ->get(); - $heroStats = [ - 'total' => $branches->count(), - 'active' => $branches->where('is_active', true)->count(), - 'departments' => $branches->sum('departments_count'), - ]; - - return view('qms.admin.branches.index', compact('branches', 'organization', 'heroStats')); + return view('qms.admin.branches.index', compact('branches', 'organization')); } public function create(Request $request): View diff --git a/app/Http/Controllers/Qms/FeedbackAdminController.php b/app/Http/Controllers/Qms/FeedbackAdminController.php index 23ddfe5..08133bb 100644 --- a/app/Http/Controllers/Qms/FeedbackAdminController.php +++ b/app/Http/Controllers/Qms/FeedbackAdminController.php @@ -32,21 +32,10 @@ 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, ]); } } diff --git a/app/Http/Controllers/Qms/ReportController.php b/app/Http/Controllers/Qms/ReportController.php index 4632223..1bc499b 100644 --- a/app/Http/Controllers/Qms/ReportController.php +++ b/app/Http/Controllers/Qms/ReportController.php @@ -36,10 +36,6 @@ class ReportController extends Controller 'organization' => $organization, 'branches' => $branches, 'reports' => config('qms.report_types'), - 'heroStats' => [ - 'reports' => count(config('qms.report_types')), - 'branches' => $branches->count(), - ], ]); } diff --git a/resources/views/qms/admin/branches/create.blade.php b/resources/views/qms/admin/branches/create.blade.php index e6b9c9f..f75b501 100644 --- a/resources/views/qms/admin/branches/create.blade.php +++ b/resources/views/qms/admin/branches/create.blade.php @@ -1,7 +1,7 @@

New branch

-
+ @csrf
diff --git a/resources/views/qms/admin/branches/edit.blade.php b/resources/views/qms/admin/branches/edit.blade.php index 3e6dfb1..c7eea7b 100644 --- a/resources/views/qms/admin/branches/edit.blade.php +++ b/resources/views/qms/admin/branches/edit.blade.php @@ -1,7 +1,7 @@

Edit branch

- + @csrf @method('PUT')
diff --git a/resources/views/qms/admin/branches/index.blade.php b/resources/views/qms/admin/branches/index.blade.php index b8282b6..2ebd936 100644 --- a/resources/views/qms/admin/branches/index.blade.php +++ b/resources/views/qms/admin/branches/index.blade.php @@ -6,46 +6,35 @@ @endphp -
- - @if ($canManageBranches) - - New branch - - @endif - +
+

Branches

+ @if ($canManageBranches) + New branch + @endif +
- @include('partials.flash') + @include('partials.flash') -
- - - - - - - - - - @foreach ($branches as $branch) - - - - - - - - @endforeach - -
NameCodeDepartmentsStatus
{{ $branch->name }}{{ $branch->code ?? '—' }}{{ $branch->departments_count }}{{ $branch->is_active ? 'Active' : 'Inactive' }}Edit
-
+
+ + + + + + + + + + @foreach ($branches as $branch) + + + + + + + + @endforeach + +
NameCodeDepartmentsStatus
{{ $branch->name }}{{ $branch->code ?? '—' }}{{ $branch->departments_count }}{{ $branch->is_active ? 'Active' : 'Inactive' }}Edit
diff --git a/resources/views/qms/analytics/index.blade.php b/resources/views/qms/analytics/index.blade.php index 1d10047..ea25b96 100644 --- a/resources/views/qms/analytics/index.blade.php +++ b/resources/views/qms/analytics/index.blade.php @@ -1,51 +1,44 @@ -
- +

Analytics

-
-
-

14-day trend

- - - - @foreach ($trend as $day) - - @endforeach - -
DateIssuedCompleted
{{ $day['date'] }}{{ $day['issued'] }}{{ $day['completed'] }}
-
-
-

Busiest queues

-
    - @forelse ($overview['busiest_queues'] ?? [] as $q) -
  • {{ $q['name'] }}{{ $q['waiting'] }} waiting
  • - @empty -
  • No active queues.
  • - @endforelse -
+
+ @foreach ([ + 'waiting' => 'Waiting now', + 'serving' => 'Being served', + 'served_today' => 'Served today', + 'no_shows_today' => 'No-shows today', + 'avg_wait_seconds' => 'Avg wait (sec)', + 'appointments_today' => 'Appointments today', + 'feedback_avg_30d' => 'Avg rating (30d)', + ] as $key => $label) +
+
{{ $label }}
+
{{ $overview[$key] ?? 0 }}
+ @endforeach +
+ +
+
+

14-day trend

+ + + + @foreach ($trend as $day) + + @endforeach + +
DateIssuedCompleted
{{ $day['date'] }}{{ $day['issued'] }}{{ $day['completed'] }}
- -
- @foreach ([ - 'serving' => 'Being served', - 'no_shows_today' => 'No-shows today', - 'avg_wait_seconds' => 'Avg wait (sec)', - 'appointments_today' => 'Appointments today', - ] as $key => $label) -
-
{{ $label }}
-
{{ $overview[$key] ?? 0 }}
-
- @endforeach +
+

Busiest queues

+
    + @forelse ($overview['busiest_queues'] ?? [] as $q) +
  • {{ $q['name'] }}{{ $q['waiting'] }} waiting
  • + @empty +
  • No active queues.
  • + @endforelse +
diff --git a/resources/views/qms/counters/show.blade.php b/resources/views/qms/counters/show.blade.php index b396f69..a01f5ee 100644 --- a/resources/views/qms/counters/show.blade.php +++ b/resources/views/qms/counters/show.blade.php @@ -17,14 +17,14 @@
-
+

Assigned queues

@if ($counter->serviceQueues->isEmpty())

No queues linked yet. Edit this counter to assign service queues.

@else
    @foreach ($counter->serviceQueues as $queue) -
  • +
  • {{ $queue->name }}

    Prefix {{ $queue->prefix }}

    @@ -38,7 +38,7 @@ @endif
-
+

Now at this counter

@if ($currentTicket)
diff --git a/resources/views/qms/displays/show.blade.php b/resources/views/qms/displays/show.blade.php index 3576a72..d244ba6 100644 --- a/resources/views/qms/displays/show.blade.php +++ b/resources/views/qms/displays/show.blade.php @@ -41,7 +41,7 @@
-
+

Assigned queues

Tickets from these queues appear on this screen and trigger voice calls.

@@ -56,7 +56,7 @@ @else
    @foreach ($queues as $queue) -
  • +
  • {{ $queue->prefix }} @@ -73,7 +73,7 @@
-
+

Display details

@@ -96,7 +96,7 @@
Public display URL

Open this link on a TV, tablet, or kiosk in your waiting area.

-
+

@@ -124,7 +124,7 @@
-
+

Live preview

diff --git a/resources/views/qms/feedback/index.blade.php b/resources/views/qms/feedback/index.blade.php index d7285db..42fc033 100644 --- a/resources/views/qms/feedback/index.blade.php +++ b/resources/views/qms/feedback/index.blade.php @@ -1,37 +1,30 @@ -
- - -
- - - - - - - - - @forelse ($feedback as $item) - - - - - - - @empty - - @endforelse - -
TicketRatingCommentsWhen
{{ $item->ticket?->ticket_number }}{{ $item->rating }}/5{{ Str::limit($item->comments, 80) }}{{ $item->created_at->diffForHumans() }}
No feedback yet.
-
-
{{ $feedback->links() }}
+
+

Customer feedback

+

Average rating: {{ $avgRating ?: '—' }} / 5

+ +
+ + + + + + + + + @forelse ($feedback as $item) + + + + + + + @empty + + @endforelse + +
TicketRatingCommentsWhen
{{ $item->ticket?->ticket_number }}{{ $item->rating }}/5{{ Str::limit($item->comments, 80) }}{{ $item->created_at->diffForHumans() }}
No feedback yet.
+
+
{{ $feedback->links() }}
diff --git a/resources/views/qms/queues/show.blade.php b/resources/views/qms/queues/show.blade.php index 0cdc4fd..2aab48b 100644 --- a/resources/views/qms/queues/show.blade.php +++ b/resources/views/qms/queues/show.blade.php @@ -9,9 +9,9 @@
@include('partials.flash')
-
Waiting
{{ $waiting }}
-
Prefix
{{ $queue->prefix }}
-
Status
{{ $queue->is_paused ? 'Paused' : ($queue->is_active ? 'Active' : 'Inactive') }}
+
Waiting
{{ $waiting }}
+
Prefix
{{ $queue->prefix }}
+
Status
{{ $queue->is_paused ? 'Paused' : ($queue->is_active ? 'Active' : 'Inactive') }}
Queue rules diff --git a/resources/views/qms/reports/index.blade.php b/resources/views/qms/reports/index.blade.php index cda9fe3..1bb0e66 100644 --- a/resources/views/qms/reports/index.blade.php +++ b/resources/views/qms/reports/index.blade.php @@ -1,22 +1,12 @@ -
- +

Reports

-
- @foreach ($reports as $type => $label) - -

{{ $label }}

-

View metrics and export CSV

-
- @endforeach -
+
+ @foreach ($reports as $type => $label) + +

{{ $label }}

+

View metrics and export CSV

+
+ @endforeach
diff --git a/resources/views/qms/reports/show.blade.php b/resources/views/qms/reports/show.blade.php index 0850d50..76ca03f 100644 --- a/resources/views/qms/reports/show.blade.php +++ b/resources/views/qms/reports/show.blade.php @@ -2,13 +2,14 @@
← Reports -

{{ $label }}

+

{{ $label }}

@if ($canExport) Export CSV @endif
- + + -
+ +
@if ($type === 'wait_times' && isset($data['hourly'])) - @foreach ($data['hourly'] as $row)@endforeach + @foreach ($data['hourly'] as $row)@endforeach
HourAvg wait (sec)
{{ $row['hour'] }}:00{{ $row['avg_wait_seconds'] }}
{{ $row['hour'] }}:00{{ $row['avg_wait_seconds'] }}
@elseif ($type === 'counters' && isset($data['counters'])) - @foreach ($data['counters'] as $row)@endforeach + @foreach ($data['counters'] as $row)@endforeach
CounterServed
{{ $row['name'] }}{{ $row['served'] }}
{{ $row['name'] }}{{ $row['served'] }}
@else
@foreach ($data as $key => $value) @if (!is_array($value)) -
{{ str_replace('_', ' ', $key) }}
{{ $value }}
+
{{ str_replace('_', ' ', $key) }}
{{ $value }}
@endif @endforeach
diff --git a/resources/views/qms/tickets/show.blade.php b/resources/views/qms/tickets/show.blade.php index 03c5626..1c36246 100644 --- a/resources/views/qms/tickets/show.blade.php +++ b/resources/views/qms/tickets/show.blade.php @@ -3,7 +3,7 @@ @if (session('success'))

{{ session('success') }}

@endif -
+

Ticket

{{ $ticket->ticket_number }}

{{ $ticket->serviceQueue?->name }}

diff --git a/resources/views/qms/workflows/show.blade.php b/resources/views/qms/workflows/show.blade.php index 67fe4dc..c6dd6a8 100644 --- a/resources/views/qms/workflows/show.blade.php +++ b/resources/views/qms/workflows/show.blade.php @@ -4,11 +4,11 @@

{{ $workflow->name }}

@if ($workflow->description)

{{ $workflow->description }}

@endif
-
+

Steps

    @foreach ($workflow->steps as $step) -
  1. +
  2. {{ $step->sort_order }}
    {{ $step->name }}