@section('heading', 'Dashboard') @extends('layouts.app') @section('content')

Dashboard

Produk yang Sudah Mencapai Batas Minimum Stok

@forelse($lowStockProducts as $index => $item) @empty @endforelse
# Kode Produk Nama Produk Cabang Stok Saat Ini Stok Minimum Status
{{ $index + 1 }} B-{{ str_pad($item->product->id, 4, '0', STR_PAD_LEFT) }} {{ $item->product->name }} {{ $item->branch->name ?? '-' }} {{ number_format($item->quantity) }} {{ $item->product->unit }} {{ number_format($item->product->min_stock) }} {{ $item->product->unit }} @if($item->quantity == 0) Habis @elseif($item->quantity < $item->product->min_stock) Di Bawah Minimum @else Mencapai Minimum @endif
Semua produk masih aman, tidak ada yang mencapai batas minimum stok

Peringkat Produk Terlaris

@forelse($topSellingProducts as $index => $item) @empty @endforelse
# Produk Terjual Revenue
{{ $index + 1 }} {{ $item->product->name }}
{{ $item->product->brand->name ?? '-' }}
{{ number_format($item->total_sold) }} Rp {{ number_format($item->total_revenue, 0, ',', '.') }}
Belum ada data penjualan

Peringkat Customer

@forelse($topCustomers as $index => $item) @empty @endforelse
# Customer Transaksi Total Belanja
{{ $index + 1 }} {{ $item->customer->name ?? '-' }}
{{ $item->customer->phone ?? '-' }}
{{ number_format($item->total_transactions) }}x Rp {{ number_format($item->total_spending, 0, ',', '.') }}
Belum ada data customer
@endsection