@extends('layouts.app') @section('title', 'Soil Test Dashboard - Blackberry Farm') @section('content')

๐Ÿงช Soil Health Dashboard

Comprehensive soil analysis and monitoring for optimal blackberry production

New Soil Test View All Tests Operations
{{ $totalTests ?? 0 }}
Total Soil Tests
{{ $averagePH ?? 'N/A' }}
Average pH Level
{{ $locationsTestedCount ?? 0 }}
Locations Tested
{{ $testsThisYear ?? 0 }}
Tests This Year
{{ $overdueTests ?? 0 }}
Overdue Follow-ups

๐Ÿ“Š pH Level Analysis

Recent pH Readings

@if(isset($recentTests) && count($recentTests) > 0) @foreach($recentTests as $test)
{{ \Carbon\Carbon::parse($test->test_date)->format('M j') }}
{{ $test->ph_level ?? 'N/A' }}
{{ $test->location }}
@if($test->ph_level >= 5.5 && $test->ph_level <= 6.5) Ideal @elseif($test->ph_level < 5.5) Too Low @else Too High @endif
@endforeach @else

No recent pH readings available

@endif

Average Nutrient Levels

Nitrogen (N)
{{ $averageNitrogen ?? '-' }}
@if($nitrogenTrend === 'up') โ†— Improving @elseif($nitrogenTrend === 'down') โ†˜ Declining @else โžก Stable @endif
Phosphorus (P)
{{ $averagePhosphorus ?? '-' }}
@if($phosphorusTrend === 'up') โ†— Improving @elseif($phosphorusTrend === 'down') โ†˜ Declining @else โžก Stable @endif
Potassium (K)
{{ $averagePotassium ?? '-' }}
@if($potassiumTrend === 'up') โ†— Improving @elseif($potassiumTrend === 'down') โ†˜ Declining @else โžก Stable @endif
Organic Matter
{{ $averageOrganicMatter ?? '-' }}%
@if($organicMatterTrend === 'up') โ†— Improving @elseif($organicMatterTrend === 'down') โ†˜ Declining @else โžก Stable @endif

โš ๏ธ Alerts & Actions

@if(isset($criticalAlerts) && count($criticalAlerts) > 0) @foreach($criticalAlerts as $alert)
{{ $alert['title'] }}
{{ $alert['message'] }}
@endforeach @endif @if(isset($phStatusSummary))
pH Status Summary:
{{ $phStatusSummary['ideal'] ?? 0 }} locations with ideal pH
{{ $phStatusSummary['problem'] ?? 0 }} locations need pH adjustment
@endif @if(isset($upcomingTests) && count($upcomingTests) > 0)
Upcoming Follow-up Tests: @foreach($upcomingTests as $test)
โ€ข {{ $test->location }} - {{ \Carbon\Carbon::parse($test->follow_up_date)->format('M j, Y') }} @endforeach
@endif
๐Ÿ“‹ Schedule Test

Plan soil testing for new areas

Schedule
๐Ÿ“ˆ View Trends

Analyze historical data

View All

๐Ÿ“ Location Breakdown

@if(isset($locationSummary) && count($locationSummary) > 0) @foreach($locationSummary as $location)
{{ $location['name'] }}
pH: {{ $location['avg_ph'] ?? 'N/A' }} {{ $location['test_count'] }} test{{ $location['test_count'] != 1 ? 's' : '' }}
@endforeach @else

No location data available

@endif

๐Ÿ’ก Current Recommendations

@if(isset($recommendations) && count($recommendations) > 0) @else

๐ŸŽฏ General Recommendations:
โ€ข Test soil pH annually in early spring
โ€ข Maintain pH between 5.5-6.5 for optimal blackberry production
โ€ข Add organic matter regularly to improve soil structure
โ€ข Monitor nutrient levels and adjust fertilization accordingly
โ€ข Test different areas of the farm for consistency

@endif

Dashboard last updated: {{ date('M j, Y g:i A') }} | Total investment in soil testing: ${{ number_format($totalTestingCost ?? 0, 2) }}

@endsection