@extends('layouts.app')
@section('title', 'Pests & Disease Dashboard - Blackberry Farm')
@section('content')
📋 Issue Information
Date Observed:
{{ isset($issue->observed_date) ? \Carbon\Carbon::parse($issue->observed_date)->format('M j, Y') : 'N/A' }}
Issue Type:
{{ ucfirst($issue->issue_type ?? 'Unknown') }}
Affected Plant:
@if($issue->plant_id)
{{ $issue->plant_id }}
@else
{{ $issue->area_affected ?? 'General area' }}
@endif
Spread Risk:
{{ ucwords(str_replace('_', ' ', $issue->spread_risk ?? 'Low')) }}
📊 Current Status
Status:
@php
$status = $issue->status ?? 'active';
if ($issue->treatment_applied && $status === 'active') {
$status = 'treated';
}
@endphp
{{ ucfirst($status) }}
Plant Stress:
@if($issue->plant_stress_level)
{{ $issue->plant_stress_level }}/5
@if($issue->plant_stress_level >= 4) (High)
@elseif($issue->plant_stress_level >= 3) (Moderate)
@else (Low)
@endif
@else
Not assessed
@endif
Weather Context:
{{ ucwords(str_replace('_', ' ', $issue->weather_conditions ?? 'Not recorded')) }}
Follow-up Due:
@if($issue->follow_up_date)
@php
$followUp = \Carbon\Carbon::parse($issue->follow_up_date);
$isOverdue = $followUp->isPast();
@endphp
{{ $followUp->format('M j, Y') }}
@if($isOverdue)
(OVERDUE)
@else
({{ $followUp->diffForHumans() }})
@endif
@else
Not scheduled
@endif
@if(isset($issue->severity_level) && $issue->severity_level)
@php
$severity = $issue->severity_level;
$severityLabels = [
1 => 'Minor Issue',
2 => 'Moderate Issue',
3 => 'Significant Issue',
4 => 'Severe Issue',
5 => 'Critical Issue'
];
$severityDescriptions = [
1 => 'Isolated problem with minimal impact',
2 => 'Noticeable symptoms requiring attention',
3 => 'Clear damage requiring treatment',
4 => 'Major damage requiring immediate action',
5 => 'Plant death risk - emergency response needed'
];
@endphp
{{ $severity }}
{{ $severityLabels[$severity] ?? 'Unknown Severity' }}
{{ $severityDescriptions[$severity] ?? '' }}
@endif
@if($issue->treatment_applied || $issue->treatment_details)
💊 Treatment Applied
Treatment Type:
{{ $issue->treatment_applied ? ucwords(str_replace('_', ' ', $issue->treatment_applied)) : 'None yet' }}
Treatment Date:
@if($issue->treatment_date)
{{ \Carbon\Carbon::parse($issue->treatment_date)->format('M j, Y') }}
@else
Not specified
@endif
Treatment Cost:
@if($issue->treatment_cost)
${{ number_format($issue->treatment_cost, 2) }}
@else
Not tracked
@endif
@if($issue->treatment_details)
Treatment Details:
{{ $issue->treatment_details }}
@endif
@endif
🌡️ Environmental Assessment
Weather Conditions:
{{ ucwords(str_replace('_', ' ', $issue->weather_conditions ?? 'Not recorded')) }}
Plant Stress Level:
{{ $issue->plant_stress_level ?? 'N/A' }}/5
@if($issue->plant_stress_level >= 4) High Stress
@elseif($issue->plant_stress_level >= 3) Moderate Stress
@elseif($issue->plant_stress_level >= 1) Low Stress
@endif
Spread Risk:
{{ ucwords(str_replace('_', ' ', $issue->spread_risk ?? 'Low')) }}
@if($issue->description)
📝 Description & Symptoms
{{ $issue->description }}
@endif
@if($issue->notes)
📋 Additional Notes & Action Plan
{{ $issue->notes }}
@endif
@if(isset($issue->follow_up_date) && \Carbon\Carbon::parse($issue->follow_up_date)->isPast())
⚠️ Follow-up Overdue
The scheduled follow-up check was due on {{ \Carbon\Carbon::parse($issue->follow_up_date)->format('M j, Y') }}
({{ \Carbon\Carbon::parse($issue->follow_up_date)->diffForHumans() }}).
Please assess the current status and update this issue.
@endif
Record Created:
@if(isset($issue->created_at))
{{ \Carbon\Carbon::parse($issue->created_at)->format('M j, Y g:i A') }}
@else
N/A
@endif
@if(isset($issue->updated_at) && $issue->updated_at != $issue->created_at)
Last Updated:
{{ \Carbon\Carbon::parse($issue->updated_at)->format('M j, Y g:i A') }}
@endif
@endsection