@extends('admin.layouts.app') @section('title', 'Dashboard - Admin') @section('page-title', 'Dashboard') @section('content') {{-- Stat Cards --}}
๐Ÿ“ฆ
Total Products
{{ $totalProducts }}
{{ $lowStock }} low stock
๐Ÿท๏ธ
Categories
{{ $totalCategories }}
๐Ÿ‘ฅ
Total Users
{{ $totalUsers }}
๐Ÿ’ฐ
Total Revenue
RM {{ number_format($totalRevenue, 2) }}
{{ $totalOrders }} orders
{{-- Alert Popup Modal --}} @if($expired > 0 || $expiringSoon > 0 || $lowStock > 0)
{{-- Header --}}
โš ๏ธ
Action Required
Please review the following alerts
{{-- Alert Items --}}
@if($expired > 0)
๐Ÿšจ
{{ $expired }} product(s) EXPIRED
Remove or replace these items immediately
@endif @if($expiringSoon > 0)
๐Ÿ•
{{ $expiringSoon }} product(s) expiring within 7 days
Check inventory and plan promotions
@endif @if($lowStock > 0)
๐Ÿ“‰
{{ $lowStock }} product(s) low stock (โ‰ค 3)
Restock soon to avoid running out
@endif
{{-- Actions --}}
๐Ÿ—„๏ธ View Inventory
@endif
{{-- Monthly Sales Chart --}}
๐Ÿ“ˆ Monthly Sales ({{ now()->year }})
@php $months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; $maxSale = $monthlySales->max('total') ?: 1; @endphp
@foreach($months as $i => $month) @php $sale = $monthlySales->get($i + 1); $height = $sale ? ($sale->total / $maxSale) * 100 : 0; @endphp
{{ $month }}
@endforeach
{{-- Recent Orders --}}
๐Ÿงพ Recent Orders
@if($recentOrders->isEmpty())

No orders yet.

@else @foreach($recentOrders as $order) @endforeach
User Total Status Date
{{ $order->user->name }} RM {{ number_format($order->total, 2) }} {{ $order->status }} {{ $order->created_at->format('d M Y') }}
@endif
{{-- Quick Actions --}}
โšก Quick Actions
+ Add Product + Add Category ๐Ÿ—„๏ธ Inventory ๐Ÿ’ฐ Revenue Report ๐Ÿ‘ฅ View Users
@endsection @push('scripts') @endpush