@extends('layouts.winemaker') @section('title', 'Harvests - Winemaker') @section('content')
Create Blended Wine
@if($harvests->count() > 0)
@foreach($harvests as $harvest) @endforeach
ID Date Grape Variety Weight Sugar Content Quality Status Action
#{{ $harvest->id }}
@if($harvest->plannedTask && $harvest->plannedTask->execution_date) {{ \Carbon\Carbon::parse($harvest->plannedTask->execution_date)->format('d M Y') }} @else {{ \Carbon\Carbon::parse($harvest->date)->format('d M Y') }} @endif
{{ $harvest->varietyVariation->grapeVariety->variety_name ?? 'Unknown' }}
{{ number_format($harvest->weight, 2) }} kg
{{ number_format($harvest->sugar_content, 1) }}°NM
@php $qualityColors = [ 'excellent' => ['bg' => 'linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%)', 'color' => '#065f46'], 'good' => ['bg' => 'linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%)', 'color' => '#1e40af'], 'fair' => ['bg' => 'linear-gradient(135deg, #fef9c3 0%, #fde68a 100%)', 'color' => '#78350f'], 'poor' => ['bg' => 'linear-gradient(135deg, #fecaca 0%, #fca5a5 100%)', 'color' => '#7f1d1d'], ]; $quality = $harvest->quality ?? 'good'; $colors = $qualityColors[$quality] ?? $qualityColors['good']; @endphp {{ ucfirst($quality) }} @if($harvest->isFullyUsed()) Fully Used @elseif($harvest->isPartiallyUsed()) {{ number_format($harvest->usage_percentage, 0) }}% Used
{{ number_format($harvest->remaining_weight, 2) }} kg left
@else Available @endif
@if($harvest->canBeDeleted())
@csrf @method('DELETE')
@elseif(!$harvest->isFullyUsed()) Bottle @else Wines in cellar @endif
@if($harvests->hasPages())
{{ $harvests->links() }}
@endif @else

No Harvests Yet

Start recording your grape harvests to bottle wines.

Record Harvest
@endif
@endsection