Fold contractor count into Visitors Today dashboard card.
Deploy Ladill Frontdesk / deploy (push) Successful in 38s
Deploy Ladill Frontdesk / deploy (push) Successful in 38s
Remove the standalone Contractors stat tile and show the contractor total as a subtitle under Visitors Today. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
<x-app-layout title="Reception Dashboard">
|
<x-app-layout title="Reception Dashboard">
|
||||||
@php
|
@php
|
||||||
$cards = [
|
$cards = [
|
||||||
['label' => 'Visitors Today', 'value' => number_format($stats['visitors_today']), 'href' => route('frontdesk.visits.index')],
|
[
|
||||||
|
'label' => 'Visitors Today',
|
||||||
|
'value' => number_format($stats['visitors_today']),
|
||||||
|
'meta' => number_format($stats['contractors_today']).' contractor'.($stats['contractors_today'] === 1 ? '' : 's'),
|
||||||
|
'href' => route('frontdesk.visits.index'),
|
||||||
|
],
|
||||||
['label' => 'Currently Inside', 'value' => number_format($stats['currently_inside']), 'href' => route('frontdesk.visits.index', ['status' => 'checked_in'])],
|
['label' => 'Currently Inside', 'value' => number_format($stats['currently_inside']), 'href' => route('frontdesk.visits.index', ['status' => 'checked_in'])],
|
||||||
['label' => 'Expected Arrivals', 'value' => number_format($stats['expected_arrivals']), 'href' => route('frontdesk.visits.index', ['status' => 'expected'])],
|
['label' => 'Expected Arrivals', 'value' => number_format($stats['expected_arrivals']), 'href' => route('frontdesk.visits.index', ['status' => 'expected'])],
|
||||||
['label' => 'Waiting', 'value' => number_format($stats['waiting']), 'href' => route('frontdesk.visits.index', ['status' => 'waiting'])],
|
['label' => 'Waiting', 'value' => number_format($stats['waiting']), 'href' => route('frontdesk.visits.index', ['status' => 'waiting'])],
|
||||||
@@ -9,7 +14,6 @@
|
|||||||
['label' => 'Pending Approval', 'value' => number_format($stats['pending_approvals']), 'href' => route('frontdesk.visits.index', ['status' => 'waiting'])],
|
['label' => 'Pending Approval', 'value' => number_format($stats['pending_approvals']), 'href' => route('frontdesk.visits.index', ['status' => 'waiting'])],
|
||||||
['label' => 'Checked Out', 'value' => number_format($stats['checked_out_today']), 'href' => route('frontdesk.visits.index', ['status' => 'checked_out'])],
|
['label' => 'Checked Out', 'value' => number_format($stats['checked_out_today']), 'href' => route('frontdesk.visits.index', ['status' => 'checked_out'])],
|
||||||
['label' => 'Deliveries', 'value' => number_format($stats['deliveries_today']), 'href' => route('frontdesk.visits.index')],
|
['label' => 'Deliveries', 'value' => number_format($stats['deliveries_today']), 'href' => route('frontdesk.visits.index')],
|
||||||
['label' => 'Contractors', 'value' => number_format($stats['contractors_today']), 'href' => route('frontdesk.visits.index')],
|
|
||||||
];
|
];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@@ -59,6 +63,9 @@
|
|||||||
<a href="{{ $card['href'] }}" class="rounded-2xl border border-slate-200 bg-white p-5 transition hover:border-indigo-300 hover:shadow-sm">
|
<a href="{{ $card['href'] }}" class="rounded-2xl border border-slate-200 bg-white p-5 transition hover:border-indigo-300 hover:shadow-sm">
|
||||||
<p class="text-xs font-medium uppercase tracking-wide text-slate-500">{{ $card['label'] }}</p>
|
<p class="text-xs font-medium uppercase tracking-wide text-slate-500">{{ $card['label'] }}</p>
|
||||||
<p class="mt-2 text-2xl font-semibold text-slate-900">{{ $card['value'] }}</p>
|
<p class="mt-2 text-2xl font-semibold text-slate-900">{{ $card['value'] }}</p>
|
||||||
|
@if (! empty($card['meta']))
|
||||||
|
<p class="mt-1 text-xs text-slate-400">{{ $card['meta'] }}</p>
|
||||||
|
@endif
|
||||||
</a>
|
</a>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user