@extends('layouts.winemaker') @section('content')

All Completed Activities

@if($completedActivities->isEmpty())
No Completed Activities

No completed actions recorded.

@else
@foreach($completedActivities as $activity) @if($activity->activity_type === 'task') @php $taskType = strtolower($activity->type); @endphp
@if($taskType === 'spraying') @elseif($taskType === 'fertilization') @elseif($taskType === 'watering') @elseif($taskType === 'pruning') @elseif($taskType === 'harvest') @endif
{{ $activity->type }} Completed
{{ $activity->activity_date->format('M j, Y') }}
@if($activity->note)
{{ $activity->note }}
@endif @if($activity->vineyard_rows->isNotEmpty())
@foreach($activity->vineyard_rows->sortBy('id') as $row) Row {{ $row->id }} @endforeach
@endif
@elseif($activity->activity_type === 'production')
@if($activity->is_blend) Created Blend: {{ $activity->wine->wine_name }} @else Bottled Wine: {{ $activity->wine->wine_name }} @endif
{{ $activity->activity_date->format('M j, Y') }}
Produced {{ number_format($activity->wine->bottles_produced) }} bottles @if($activity->is_blend) from {{ $activity->productions->count() }} harvests @endif ({{ number_format($activity->total_weight, 1) }} kg of grapes)
{{ $activity->wine->grapeVariety->variety_name }} {{ ucfirst($activity->wine->wine_type) }} Wine {{ $activity->wine->alcohol_percentage }}% ABV
@elseif($activity->activity_type === 'harvest')
Harvest Recorded
{{ $activity->activity_date->format('M j, Y') }}
Harvested {{ number_format($activity->harvest->weight, 1) }} kg from Row {{ $activity->harvest->vineyard_row_id }}
{{ number_format($activity->harvest->sugar_content, 1) }} sugar content {{ ucfirst($activity->harvest->quality) }} quality
@endif @endforeach
@endif
@endsection