@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content') {{-- Statistik ringkas --}}

{{ $totalItems }}

Total Barang

{{ $totalCategories }}

Kategori

{{ $lowStockCount }}

Stok Menipis

{{ $outOfStockCount }}

Stok Habis
Total Masuk Hari Ini

+{{ number_format($todayIn) }}

Total Keluar Hari Ini

-{{ number_format($todayOut) }}

{{-- FITUR: Menu / barang yang mau habis --}}
Barang yang Perlu Restock (Stok ≤ Minimum) {{ $lowStockCount }} item
@if($lowStockItems->isEmpty())
Semua stok aman.
@else
@foreach($lowStockItems as $item) @endforeach
BarangKategoriStok MinimumStatus
{{ $item->description }} @if($item->brand_type)
{{ $item->brand_type }}@endif
{{ $item->category->name }} {{ $item->current_stock }} {{ $item->unit }} {{ $item->minimum_stock }} {{ ucfirst($item->stockStatus()) }} Tambah Stok
@endif
{{-- Transaksi terbaru --}}
Transaksi Terbaru
@forelse($recentTransactions as $t) @empty @endforelse
Tgl & JamBarangTipe QtyOlehKeterangan
{{ $t->transaction_at->format('d/m/Y H:i') }} {{ $t->item->description }} {{ $t->type }} @if($t->type==='RCD' || ($t->type==='ADJ' && $t->quantity>0)) +{{ abs($t->quantity) }} @else -{{ abs($t->quantity) }} @endif {{ $t->user->name }} {{ $t->notes ?: '-' }}
Belum ada transaksi.
@endsection