@extends('layout.app') @section('title', 'Daftar Rekomendasi') @include('admin.shared.admin-styles') @section('content')

{{ $waktuMakans->where('has_recommendation', true)->count() }}

Waktu Makan Terhitung

{{ $waktuMakans->where('has_recommendation', false)->count() }}

Menunggu Perhitungan

{{ $waktuMakans->max('latest_calculation') ? \Carbon\Carbon::parse($waktuMakans->max('latest_calculation'))->format('d M Y') : 'Belum ada' }}

Terakhir Update

@if(session('error')) @endif @if(session('success')) @endif
@foreach($waktuMakans as $waktuMakan) @php $isNewlyCalculated = $waktuMakan->latest_calculation && \Carbon\Carbon::parse($waktuMakan->latest_calculation)->isToday(); @endphp
{{ $waktuMakan->nama }}
@if($waktuMakan->has_recommendation) Terhitung @else Pending @endif
Komponen Makanan
@foreach($waktuMakan->komponens as $komponen) {{ $komponen->nama }} @endforeach
@if($waktuMakan->latest_calculation)
Terakhir dihitung: {{ \Carbon\Carbon::parse($waktuMakan->latest_calculation)->format('d M Y H:i') }} @if($isNewlyCalculated) Baru @endif
@if($waktuMakan->latestConsistencyRatio)
CR: {{ number_format($waktuMakan->latestConsistencyRatio->nilai_cr, 3) }} @if($waktuMakan->latestConsistencyRatio->nilai_cr < 0.1) Konsisten @else Perlu Review @endif
@endif
@endif
@endforeach
@endsection @push('scripts') @endpush