@extends('layouts.app') @section('title', 'Dashboard - Rental Stock Control') @push('styles') @endpush @section('content')

Dashboard

Real-time warehouse inventory, device statuses, and operations overview

{{ now()->format('D, d M Y') }}
{{ $stats['totalMasterIds'] ?? 0 }}
Total Master IDs
{{ $stats['inStock'] ?? 0 }}
In Stock
{{ $stats['deployed'] ?? 0 }}
Deployed / Rented
{{ $stats['pendingApprovals'] ?? 0 }}
Pending Approvals
{{ $stats['totalEquipment'] ?? 0 }}
Total Equipment
{{ $stats['maintenance'] ?? 0 }}
Maintenance
{{ $stats['lost'] ?? 0 }}
Lost
{{ $stats['stockExceptions'] ?? 0 }}
Stock Exceptions
Recent Activity
Last 7 Days @if($recentAuditLogs->isNotEmpty()) {{ $recentAuditLogs->count() }} @endif
View All
@forelse($recentAuditLogs as $log) @empty @endforelse
User Action Description Time
{{ strtoupper(substr($log->user->name ?? 'S', 0, 1)) }}
{{ $log->user->name ?? 'System' }}
@php $action = $log->action ?? 'UNKNOWN'; $actionClass = 'activity-badge-slate'; if (str_starts_with($action, 'CREATE_')) { $actionClass = 'activity-badge-emerald'; } elseif (str_starts_with($action, 'UPDATE_') || $action === 'TOGGLE_USER_STATUS') { $actionClass = 'activity-badge-amber'; } elseif (str_starts_with($action, 'DELETE_')) { $actionClass = 'activity-badge-rose'; } elseif (str_starts_with($action, 'SCAN_')) { $actionClass = 'activity-badge-indigo'; } elseif (in_array($action, ['APPROVE_REQUEST', 'APPROVE'])) { $actionClass = 'activity-badge-teal'; } elseif (in_array($action, ['REJECT_REQUEST', 'CANCEL_REQUEST'])) { $actionClass = 'activity-badge-rose'; } elseif ($action === 'LOGIN') { $actionClass = 'activity-badge-sky'; } elseif ($action === 'LOGOUT') { $actionClass = 'activity-badge-slate'; } $actionLabel = str_replace('_', ' ', $action); @endphp {{ $actionLabel }} {{ $log->description ?? $log->entity_type . ' #' . $log->entity_id }} {{ $log->created_at ? $log->created_at->diffForHumans() : '' }}

No activity in the last 7 days

Activity logs from the past week will appear here.
@endsection