@extends('layouts.app') @section('title', 'Waste & Loss Tracking') @section('content')

πŸ—‘οΈ Waste & Loss Tracking

πŸ“Š Here’s today’s cafe inventory snapshot β€” keep spills low and data precise!

@if(session('success'))
🟒 {{ session('success') }}
@endif @if($errors->any())

β˜• Hold up, Barista! Please fix these errors:

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{-- πŸ“₯ Record Waste / Loss Form --}}

🌱 Record Cafe Loss

Accurately account for discrepancies to maintain high inventory health.

@csrf
{{-- πŸ“‘ Waste History Log Table --}}

Waste Log Ledger

Historical verification records for quality score analysis.

@forelse($wasteLogs as $w) @empty @endforelse
Product Reason Qty Logged By Timestamp
{{ $w->product->name }} @switch($w->reason) @case('expired') ⏳ Expired @break @case('damaged') πŸ’₯ Damaged @break @case('lost') πŸ” Lost @break @default πŸ“ Other @endswitch @if($w->notes)

"{{ $w->notes }}"

@endif
-{{ $w->quantity }} {{ $w->user->name }} {{ $w->created_at->format('d M Y') }} {{ $w->created_at->format('h:i A') }}
β˜•

Perfect streak! No waste logs registered yet.

@if($wasteLogs->hasPages())
{{ $wasteLogs->links() }}
@endif
@endsection