@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content')
{{-- Stat Cards --}}
Omzet Hari Ini ๐Ÿ’ฐ
Rp {{ number_format($todaySales->sales ?? 0, 0, ',', '.') }}
{{ $todaySales->trx ?? 0 }} transaksi selesai
Pembelian Stok ๐Ÿ“ฆ
Rp {{ number_format($todayPurchase, 0, ',', '.') }}
hari ini dari suplier
Pengeluaran ๐Ÿ’ธ
Rp {{ number_format($todayExpense, 0, ',', '.') }}
hari ini (biaya operasional)
Profit Estimasi ๐Ÿ“ˆ
@php $profit = ($todaySales->sales ?? 0) - $todayPurchase - $todayExpense; @endphp
Rp {{ number_format($profit, 0, ',', '.') }}
omzet - beli - biaya
{{-- Grafik 7 Hari --}}

๐Ÿ“ˆ Penjualan 7 Hari Terakhir

{{-- Top Produk Hari Ini --}}

๐Ÿ”ฅ Produk Terlaris Hari Ini

@forelse($topTodayProducts as $i => $p)
{{ $i+1 }}
{{ $p->product_name }}
{{ $p->qty }}
@empty
Belum ada penjualan hari ini
@endforelse
{{-- Stok Menipis --}} @if($lowStockProducts->count() > 0)

โš ๏ธ Produk Stok Menipis (โ‰ค Min. Stok)

@foreach($lowStockProducts as $p) @endforeach
Produk Kategori Stok Min. Stok Aksi
{{ $p->name }} {{ $p->category?->name ?? '-' }} {{ $p->stock }} {{ $p->min_stock }} Kelola
@endif {{-- Hutang Jatuh Tempo --}} @if($debtsSummary->count > 0)

๐Ÿ’ณ Ringkasan Hutang Suplier

Total: Rp {{ number_format($debtsSummary->total, 0, ',', '.') }}
@if($overdueDebts->count() > 0)

โš ๏ธ Jatuh Tempo / Lewat Tanggal :

@foreach($overdueDebts as $debt)
{{ $debt->invoice_number }}
{{ $debt->supplier->name }}
Tempo: {{ $debt->due_date->format('d M Y') }}
Rp {{ number_format($debt->total_amount, 0, ',', '.') }}
Bayar โ†’
@endforeach
@else
โœ… Tidak ada hutang yang jatuh tempo hari ini.
@endif
@endif {{-- Quick Links --}}
@foreach([ ['route' => 'pos.index', 'icon' => '๐Ÿงพ', 'label' => 'Buka Kasir', 'color' => 'blue'], ['route' => 'products.index','icon' => '๐Ÿ“ฆ', 'label' => 'Kelola Produk', 'color' => 'indigo'], ['route' => 'reports.sales', 'icon' => '๐Ÿ“ˆ', 'label' => 'Lap. Penjualan', 'color' => 'emerald'], ['route' => 'reports.clerk', 'icon' => '๐Ÿ‘ค', 'label' => 'Lap. Kasir', 'color' => 'amber'], ] as $link)
{{ $link['icon'] }}
{{ $link['label'] }}
@endforeach
@push('scripts') @endpush @endsection