@extends('layouts.app') @section('title', 'Admin Dashboard - UniformFlow') @section('page-heading', 'Admin dashboard') @section('content')
{{ now()->timezone('Asia/Colombo')->format('l, d F Y') }}--:--:--SLST

Operations at a glance.

Stock health, employee accountability, and handover performance in one place.

+ Add employee + Receive stock + Issue uniform
EActive employees{{ number_format($activeEmployees) }}{{ $employeesWithIssues }} currently hold uniforms
IUnits with employees{{ number_format($unitsIssued) }}{{ $issuedThisMonth }} issued this month
!Stock alerts{{ $lowStock->count() }}{{ $outOfStock->count() }} sizes are out of stock
Inventory control

Stock health

{{ $stockHealth }}%
Healthy sizes At or below reorder level
Uniform types{{ $uniformTypes }}
Low stock{{ $lowStock->count() }}
Out of stock{{ $outOfStock->count() }}
This month

Movement summary

View all →
Uniforms issued{{ $issuedThisMonth }}
Exit handovers completed{{ $handoversThisMonth }}
Reusable returns{{ $handoverOutcomes['reusable'] ?? 0 }}
Damaged or not returned{{ ($handoverOutcomes['damaged'] ?? 0) + ($handoverOutcomes['not_returned'] ?? 0) }}
Action required

Stock alerts

Manage stock
@forelse($lowStock->take(7) as $variant)
{{ strtoupper(substr($variant->item->name, 0, 2)) }}
{{ $variant->item->name }}Size {{ $variant->size }} / reorder at {{ $variant->reorder_level }}
{{ $variant->quantity }} available
@empty
All size balances are above their reorder levels.
@endforelse
Employee welfare

Held over 12 months

{{ $replacementDue->count() }} due
@forelse($replacementDue as $issue)
{{ strtoupper(substr($issue->employee->name, 0, 1)) }}
{{ $issue->employee->name }}{{ $issue->variant->item->name }} / {{ $issue->variant->size }} / issued {{ $issue->issued_at->format('d M Y') }}
Review
@empty
No employee-held uniforms are over 12 months old.
@endforelse
Accountability

Issued by department

@php($maxDepartmentUnits = max(1, (int) ($departmentAllocation->max('units') ?? 1))) @forelse($departmentAllocation as $department)
{{ $department->department }}{{ $department->units }}
@empty
Department allocation appears after uniforms are issued.
@endforelse
Demand planning

Most issued uniforms

@forelse($popularUniforms as $index => $uniform)
{{ $index + 1 }}
{{ $uniform->name }}Total units issued
{{ $uniform->units }}
@empty
Demand rankings appear after uniforms are issued.
@endforelse
Audit trail

Recent activity

@forelse($recentMovements->take(6) as $movement)
{{ ucfirst(str_replace('_', ' ', $movement->type)) }} / {{ $movement->variant->item->name }}Size {{ $movement->variant->size }} / {{ $movement->created_at->diffForHumans() }}
{{ $movement->quantity_change > 0 ? '+' : '' }}{{ $movement->quantity_change }}
@empty
Stock activity will appear here.
@endforelse
Available inventory

Stock across uniform types

New and employee-returned units currently available.

New stockReturned stock
@php($maxStockTotal = max(1, (int) ($stockDistribution->max('total') ?? 1)))
@forelse($stockDistribution as $stock)
{{ $stock->name }}{{ number_format($stock->stock_value, 2) }} total value
{{ $stock->total }}
@empty
No available stock to graph.
@endforelse
Open inventory
{{ now()->timezone('Asia/Colombo')->format('F Y') }}

Detailed monthly movement summary

Every inventory movement recorded during the current month.

Movement records{{ $monthlyMovements->count() }}
Units received / returned+{{ $monthlyMovements->where('quantity_change', '>', 0)->sum('quantity_change') }}
Units issued{{ $monthlyMovements->where('quantity_change', '<', 0)->sum('quantity_change') }}
Net stock movement{{ $monthlyMovements->sum('quantity_change') > 0 ? '+' : '' }}{{ $monthlyMovements->sum('quantity_change') }}
@forelse($monthlyMovements as $movement) @empty@endforelse
Date & timeMovementUniformSizeCategoryQuantityUnit valueEmployee / reference
{{ $movement->created_at->timezone('Asia/Colombo')->format('d M Y') }}{{ $movement->created_at->timezone('Asia/Colombo')->format('h:i:s A') }}{{ ucfirst(str_replace('_', ' ', $movement->type)) }}{{ $movement->variant->item->name }}{{ $movement->variant->size }}{{ $movement->stock_category ? ucfirst($movement->stock_category) : '—' }}{{ $movement->quantity_change > 0 ? '+' : '' }}{{ $movement->quantity_change }}{{ $movement->unit_value !== null ? number_format($movement->unit_value, 2) : '—' }}{{ $movement->employee?->name ?: 'Stock operation' }}{{ $movement->notes ?: 'No reference' }}
No stock movements have been recorded this month.
@endsection