@extends('layouts.app') @section('title', 'Weather Dashboard - Blackberry Farm') @section('content')
📊 Historical Data 🌱 Soil Conditions 🌿 Growing Analysis ⚙️ Data Management
@if(!empty($alerts))

⚠️ Weather Alerts

@foreach($alerts as $alert)
@if($alert['type'] === 'frost') ❄️ @elseif($alert['type'] === 'heat') 🌡️ @elseif($alert['type'] === 'wind') 💨 @elseif($alert['type'] === 'drought') 🏜️ @else ⚠️ @endif
{{ strtoupper($alert['priority']) }} ALERT: {{ $alert['message'] }}
@endforeach
@endif @if($currentWeather)

☀️ Current Conditions

{{ round($currentWeather['main']['temp']) }}°F
{{ ucfirst($currentWeather['weather'][0]['description']) }}
Feels like {{ round($currentWeather['main']['feels_like']) }}°F
@if(strpos($currentWeather['weather'][0]['main'], 'Clear') !== false) ☀️ @elseif(strpos($currentWeather['weather'][0]['main'], 'Cloud') !== false) ☁️ @elseif(strpos($currentWeather['weather'][0]['main'], 'Rain') !== false) 🌧️ @elseif(strpos($currentWeather['weather'][0]['main'], 'Snow') !== false) ❄️ @else 🌤️ @endif
💧 Humidity
{{ $currentWeather['main']['humidity'] }}%
💨 Wind
{{ round($currentWeather['wind']['speed'] ?? 0) }} mph
🌫️ Pressure
{{ round($currentWeather['main']['pressure'] ?? 0) }} hPa
☁️ Clouds
{{ $currentWeather['clouds']['all'] ?? 0 }}%
@endif
@if($latestData)

🌱 Agricultural Conditions

Soil Temp
{{ round($latestData->soil_temperature_6cm_f ?? 0) }}°F
Soil Moisture
{{ round(($latestData->soil_moisture_3_9cm ?? 0) * 100, 1) }}%
Growing DD
{{ round($latestData->growing_degree_days ?? 0, 1) }}
@if($latestData->frost_risk)
❄️ Frost Risk
YES
@endif
@endif @if($recentData && $recentData->count() > 0)

📊 Last 24 Hours

@foreach($recentData->reverse()->take(10) as $record)
{{ $record->recorded_at->format('g:i A') }} {{ round($record->temperature_2m_f ?? 0) }}°F {{ round($record->relative_humidity_2m ?? 0) }}% {{ round($record->wind_speed_10m_mph ?? 0) }} mph
@endforeach
@endif
@if(!empty($weeklyStats))

📈 7-Day Summary

Average Temperature
{{ round($weeklyStats['temperature']['avg'] ?? 0) }}°F
Range: {{ round($weeklyStats['temperature']['min'] ?? 0) }}° - {{ round($weeklyStats['temperature']['max'] ?? 0) }}°
Total Precipitation
{{ round($weeklyStats['precipitation']['total_inches'] ?? 0, 2) }}"
{{ $weeklyStats['precipitation']['rain_days'] ?? 0 }} rain days
Growing Degree Days
{{ round($weeklyStats['growing_conditions']['total_gdd'] ?? 0) }}
{{ $weeklyStats['growing_conditions']['frost_days'] ?? 0 }} frost days
Average Wind
{{ round($weeklyStats['wind']['avg_speed'] ?? 0) }} mph
Max gust: {{ round($weeklyStats['wind']['max_gust'] ?? 0) }} mph
@endif

🌦️ Weather Navigation

🏠 Home ← Operations Dashboard
@endsection