@extends('layouts.layout-admin') @section('title', 'Dashboard') @section('header_title', 'Dashboard Overview') @section('header_subtitle', 'Monitor your store performance') @section('content')

Total Revenue

Rp {{ number_format($totalRevenue, 0, ',', '.') }}

Total Orders

{{ $totalOrders }}

orders
@foreach (['unpaid', 'paid', 'verify', 'dikirim'] as $s)

{{ ucfirst($s) }}

{{ $ordersByStatus[$s] ?? 0 }}

@endforeach

Products

{{ $totalProducts }}

total items

In Stock

{{ $productsInStock }}

Low Stock

{{ $productsLowStock }}

Customers

{{ $totalCustomers }}

registered

Sales This Week

Top Products

@forelse ($topProducts as $item)
{{ $item->product->name ?? 'Deleted' }}

{{ $item->product->name ?? 'Deleted' }}

{{ $item->total_qty }} sold

@empty

No sales data yet

@endforelse

Recent Orders

@forelse ($recentOrders as $order) @empty @endforelse
Order Code Customer Items Total Status Date
{{ $order->order_code }} {{ $order->user->name }} @foreach ($order->items as $item)
{{ $item->product->name ?? 'Deleted' }} x {{ $item->quantity }}
@endforeach
Rp {{ number_format($order->total_amount, 0, ',', '.') }} {{ ucfirst($order->status) }} {{ $order->created_at->format('d/m/Y') }}
No orders yet
@endsection @push('scripts') @endpush