@extends('layouts.master') @section('title') Dashboard @endsection @section('content') @component('components.breadcrumb') @slot('li_1') PAL Centre @endslot @slot('title') Dashboard @endslot @endcomponent @php $roleBlurb = [ 'admin' => 'You oversee the whole system — manage users, roles and master data, and monitor every requisition.', 'station' => 'Create requisitions for your station and resubmit any that are returned for correction.', 'area' => 'Review and approve (or return) requisitions raised by stations in your area.', 'pal' => 'Validate requests, gather quotes, push to Procurement, send POs, confirm deliveries, verify invoices, and close completed files.', 'procurement' => 'Review PAL submissions, issue Purchase Orders, and forward verified invoices to Finance.', 'supplier' => 'Acknowledge POs, deliver, resolve any issues, invoice, and confirm payment received.', 'budget_finance' => 'Process and confirm supplier payments forwarded by Procurement.', ]; @endphp
Welcome, {{ $user->name }}

Role: {{ $user->role_label }}

{{ $roleBlurb[$user->role] ?? '' }}

@if($user->isAdmin())
Manage Users Roles
@endif
{{-- KPI cards --}}
@php $cards = [ ['label' => $queueTitle, 'value' => $counts['awaiting'], 'icon' => 'ri-time-line', 'bg' => 'warning'], ['label' => 'Overdue', 'value' => $counts['overdue'], 'icon' => 'ri-alarm-warning-line', 'bg' => 'danger'], ['label' => 'In Progress', 'value' => $counts['in_progress'], 'icon' => 'ri-loader-2-line', 'bg' => 'info'], ['label' => 'Completed', 'value' => $counts['completed'], 'icon' => 'ri-checkbox-circle-line', 'bg' => 'success'], ['label' => 'Total', 'value' => $counts['total'], 'icon' => 'ri-stack-line', 'bg' => 'secondary'], ]; @endphp @foreach($cards as $c)

{{ $c['label'] }}

{{ $c['value'] }}

@endforeach
{{-- Work queue --}}
{{ $queueTitle }}
View all requisitions
@forelse($queue as $req) @empty @endforelse
Reference Title Station Status Updated
{{ $req->reference_no }} {{ \Illuminate\Support\Str::limit($req->title, 30) }} {{ $req->station?->name }} {{ $req->status_label }} {{ $req->updated_at->diffForHumans() }} Open
Nothing is waiting on you right now.
{{-- Status breakdown --}}
By Status
@forelse($byStatus as $status => $total) {{ ucwords(str_replace('_',' ',$status)) }} {{ $total }} @empty

No requisitions yet.

@endforelse
@if($user->role === \App\Models\User::ROLE_STATION)

Need something procured?

New Requisition
@endif
@endsection