Dashboard — ProcureFlow {{-- ═══════════ STAT CARDS ═══════════ --}} @php $statCards = [ ['val' => $stats['active'], 'label' => 'Active Procurements', 'sub' => 'Ongoing processes', 'ac' => 'var(--blue)', 'abg' => 'rgba(22,101,52,.08)', 'icon' => 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2'], ['val' => $stats['pendingApprovals'], 'label' => 'Pending Approvals', 'sub' => 'Awaiting your decision', 'ac' => 'var(--amber)', 'abg' => 'rgba(245,158,11,.08)', 'icon' => 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'], ['val' => $stats['completed'], 'label' => 'Completed', 'sub' => 'Last 30 days', 'ac' => 'var(--green)', 'abg' => 'rgba(16,185,129,.08)', 'icon' => 'M5 13l4 4L19 7'], ['val' => $stats['delayed'], 'label' => 'Delayed', 'sub' => 'Critical variance', 'ac' => 'var(--red)', 'abg' => 'rgba(239,68,68,.08)', 'icon' => 'M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'], ]; @endphp
@foreach($statCards as $s)
{{ $s['label'] }}
{{ $s['val'] }}
{{ $s['sub'] }}
@endforeach
{{-- ═══════════ COMPLIANCE + PENDING APPROVALS ═══════════ --}} @php $overallScore = $compliance['overall']; $overallColor = $overallScore >= 80 ? '#10b981' : ($overallScore >= 50 ? '#f59e0b' : '#ef4444'); $overallLabel = $overallScore >= 80 ? 'Compliant' : ($overallScore >= 50 ? 'Partial' : 'At Risk'); $metrics = [ ['key' => 'docCompleteness', 'label' => 'Document Completeness', 'icon' => 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'], ['key' => 'approvalTrail', 'label' => 'Approval Trail', 'icon' => 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'], ['key' => 'versionControl', 'label' => 'Version Control (Docs)', 'icon' => 'M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'], ['key' => 'timelineAdherence', 'label' => 'Timeline Adherence', 'icon' => 'M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'], ]; @endphp
{{-- COMPLIANCE SCORE --}}
Compliance Score
Audit Packs
{{ $overallScore }}%
{{ $overallLabel }}
Overall compliance
@if($overallScore >= 80)All metrics passing @elseif($overallScore >= 50)Needs attention @elseAction required @endif
@foreach($metrics as $m) @php $val = $compliance[$m['key']]; $bc = $val >= 80 ? '#10b981' : ($val >= 50 ? '#f59e0b' : '#ef4444'); @endphp
{{ $m['label'] }}
{{ $val }}%
@endforeach
{{-- PENDING APPROVALS --}}
Pending Approvals
Manage All
@forelse($pendingActions as $action) @empty @endforelse
Procurement Role Action
{{ $action->procurement->reference }}
{{ \Illuminate\Support\Str::limit($action->procurement->title, 40) }}
{{ $action->role_label }} Review
No pending approvals
You're all caught up!
{{-- /.dash-mid --}} {{-- ═══════════ RECENT PROCUREMENTS ═══════════ --}}
Recent Procurements
View All
@forelse($recentProcurements as $proc) @empty @endforelse
Reference Title Stage Status
{{ $proc->reference }} {{ $proc->title }} Stage {{ $proc->current_stage }} @if($proc->status === 'active')Active @elseif($proc->status === 'completed')Completed @else{{ ucfirst($proc->status) }} @endif
No active procurements found
{{-- ═══════════ EXECUTION & DELIVERY MONITORING ═══════════ --}} @php $activeContracts = \App\Models\Contract::where('tenant_id', auth()->user()->tenant_id) ->where('status', 'active') ->with(['procurement', 'supplier']) ->orderBy('end_date', 'asc') ->take(5) ->get(); @endphp
Execution & Delivery Monitoring
View All Contracts
@forelse($activeContracts as $c) @empty @endforelse
Contract # Supplier Procurement Award Value Deadline Status
{{ $c->contract_number }} {{ $c->supplier->name }} {{ $c->procurement->reference }} — {{ \Illuminate\Support\Str::limit($c->procurement->title, 28) }} {{ $c->currency }} {{ number_format($c->contract_value, 0) }} @if($c->end_date && $c->end_date->isPast())EXPIRED @elseif($c->end_date){{ $c->end_date->format('M d, Y') }} @elseContinuous @endif Executing
No contracts in execution phase
Active contract deliverables will appear here