@extends('layouts.app') @section('title', 'Field Details - {{ $field->name }} - Blackberry Farm') @section('content')
โœ๏ธ Edit Field ๐ŸŒฑ Add Plants โ† Back to Fields
{{ ucfirst($field->status) }}
Field Status
@if($field->acreage)
{{ number_format($field->acreage, 1) }}
Acres
@endif @if($field->plant_capacity)
{{ $field->plants->count() }}/{{ $field->plant_capacity }}
Plant Capacity
@endif @if($field->plant_capacity && $field->plant_capacity > 0)
{{ number_format(min(100, ($field->plants->count() / $field->plant_capacity) * 100), 1) }}%
Utilization
@endif
@if($field->city || $field->state || $field->street_address || $field->latitude)

๐Ÿ“ Location Details

@if($field->street_address)
Address
{{ $field->street_address }}
@endif @if($field->city || $field->state)
City/State
{{ $field->city }}{{ $field->city && $field->state ? ', ' : '' }}{{ $field->state }} {{ $field->zip_code }}
@endif @if($field->county)
County
{{ $field->county }}
@endif @if($field->latitude && $field->longitude)
Coordinates
{{ $field->latitude }}, {{ $field->longitude }}
@endif @if($field->elevation_feet)
Elevation
{{ number_format($field->elevation_feet) }} feet
@endif
@endif @if($field->topography || $field->soil_type || $field->drainage || $field->slope_percentage || $field->aspect || $field->soil_ph)

๐ŸŒฑ Terrain & Soil Conditions

@if($field->topography)
Topography
{{ ucfirst($field->topography) }}
@endif @if($field->soil_type)
Soil Type
{{ ucfirst(str_replace('_', ' ', $field->soil_type)) }}
@endif @if($field->drainage)
Drainage
{{ ucfirst(str_replace('_', ' ', $field->drainage)) }}
@endif @if($field->slope_percentage)
Slope
{{ $field->slope_percentage }}%
@endif @if($field->aspect)
Aspect
{{ ucfirst($field->aspect) }}
@endif @if($field->soil_ph)
Soil pH
{{ $field->soil_ph }} @php $ph = $field->soil_ph; if ($ph >= 5.5 && $ph <= 6.5) { $status = 'Ideal for Blackberries'; $class = 'ph-ideal'; } elseif ($ph < 5.5) { $status = 'Too Acidic'; $class = 'ph-low'; } else { $status = 'Too Alkaline'; $class = 'ph-high'; } @endphp {{ $status }}
@endif @if($field->last_soil_test)
Last Soil Test
{{ date('M j, Y', strtotime($field->last_soil_test)) }}
@endif
@endif @if($field->irrigation_type || $field->access_road || $field->has_electricity || $field->has_water_access || $field->has_storage)

๐Ÿ”ง Infrastructure & Utilities

@if($field->irrigation_type)
Irrigation System
{{ ucfirst(str_replace('_', ' ', $field->irrigation_type)) }}
@endif @if($field->access_road)
Access Road
{{ ucfirst(str_replace('_', ' ', $field->access_road)) }}
@endif
Electricity
@if($field->has_electricity) โœ“ Available @else โœ— Not Available @endif
Water Access
@if($field->has_water_access) โœ“ Available @else โœ— Not Available @endif
Storage
@if($field->has_storage) โœ“ Available @else โœ— Not Available @endif
@endif @if($field->notes)

๐Ÿ“ Field Notes

{{ $field->notes }}
@endif

๐Ÿ“‹ Field Summary

@if($field->plant_capacity && $field->plant_capacity > 0) @php $utilization = ($field->plants->count() / $field->plant_capacity) * 100; @endphp
Field Utilization {{ number_format($utilization, 1) }}%
@endif
@if($field->topography)
Terrain: {{ ucfirst($field->topography) }}
@endif @if($field->planting_pattern)
Pattern: {{ $field->planting_pattern }}
@endif
Created: {{ date('M j, Y', strtotime($field->created_at)) }}

๐ŸŒฑ Plant Management

@if($field->plants && $field->plants->count() > 0)
Plants in Field: {{ $field->plants->count() }}
@foreach($field->plants->take(5) as $plant)
{{ $plant->plant_id }}
{{ $plant->variety->name ?? 'Unknown' }}
{{ ucfirst($plant->status) }}
@endforeach @if($field->plants->count() > 5)
... and {{ $field->plants->count() - 5 }} more plants
@endif
View All Plants @else

No plants in this field yet

Add plants to start tracking growth
Add First Plant @endif

โš ๏ธ Danger Zone

@if($field->plants && $field->plants->count() > 0) This field has {{ $field->plants->count() }} plants. Deleting will mark the field as inactive. @else Permanently delete this field. This action cannot be undone. @endif

@csrf @method('DELETE')
@endsection