@extends('layouts.main') @section('main-container')
{{-- HEADER --}} {{-- MAIN CARD --}}
Watershed Overview
{{-- BASIC INFO --}}

Basic Info

Name
{{ $watershed->watershed_name }}
Code
{{ $watershed->watershed_code }}
River Basin
{{ $watershed->river_basin_system }}
Status
{{ $watershed->status ?? 'Active' }}
{{-- LOCATION --}}

Location

State
{{ $watershed->state->name ?? '-' }}
District
{{ $watershed->district->name ?? '-' }}
Block
{{ $watershed->block->name ?? '-' }}
Agro Zone
{{ $watershed->agro_climatic_zone ?? '-' }}
{{-- COORDINATES --}}

Coordinates

Latitude
{{ $watershed->latitude ?? '-' }}
Longitude
{{ $watershed->longitude ?? '-' }}
{{-- ELEVATION --}}

Elevation

Highest
{{ $watershed->highest_elevation_m }}
Lowest
{{ $watershed->lowest_elevation_m }}
Difference
{{ $watershed->height_difference_m }}
{{-- AREA --}}

Area Details

Total Area
{{ number_format($watershed->total_watershed_area_ha,2) }}
Treatable
{{ number_format($watershed->total_treatable_area_ha,2) }}
Non-Treatable
{{ number_format($watershed->forest_uncultivable_area_ha,2) }}

Watershed Maps

@if($watershed->maps->isEmpty())
No maps uploaded
@else
@foreach($watershed->maps as $index => $map) @php $filePath = $map->map_uploaded ?? ''; // Proper URL (works with storage:link) $fileUrl = $filePath ? asset('storage/' . ltrim($filePath, '/')) : ''; // Safe extension detection $ext = $filePath ? strtolower(pathinfo($filePath, PATHINFO_EXTENSION)) : ''; @endphp {{-- MAP TYPE --}} {{-- PREVIEW --}} {{-- ACTION --}} @endforeach
# Map Type Preview Action
{{ $index + 1 }} {{ ucfirst($map->map_type) }} @if(in_array($ext, ['jpg','jpeg','png'])) @elseif($ext === 'pdf') 📄 PDF @else File @endif 👁 View ⬇ Download
@endif
1.3 Micro Watersheds
@forelse($watershed->microWatersheds as $micro)
{{-- HEADER --}}
Micro Code: {{ $micro->micro_watershed_code }}
{{-- ================= LOCATIONS ================= --}}
Locations
@forelse($micro->locations as $index => $loc) @empty @endforelse
# Panchayat Village
{{ $index + 1 }} {{ $loc->panchayat->name ?? '-' }} {{ $loc->village->name ?? '-' }}
No locations found
{{-- ================= LULC ================= --}}
Land Use (LULC)
@forelse($micro->microWatershedLulcs as $lulc) @empty @endforelse
Category Area %
{{ $lulc->lulcCategory->category_name ?? '-' }} {{ number_format($lulc->area, 2) }} {{ number_format($lulc->area_percentage, 2) }} %
No LULC data available
@empty
No Micro Watershed data available
@endforelse
{{-- RAINFALL --}}

Rainfall Data

@if($rainfall->isEmpty())
No rainfall data available
@else
@foreach($rainfall as $row) @endforeach
Year Rainfall (mm) Source
{{ $row->year->name ?? '-' }} {{ $row->rainfall_mm }} {{ $row->data_source }}
{{-- CLIMATIC DATA --}}

Climatic Data

@if(!$climaticData)
No climatic data available
@else {{-- BASIC INFO --}}
Nearest Station
{{ $climaticData->nearest_meteorological_station }}
Distance (km)
{{ $climaticData->distance_from_project_site_km }}
Annual Rainfall
{{ $climaticData->normal_annual_rainfall_mm }} mm
Highest Rainfall Intensity (mm/hr, 10-year)
{{ $climaticData->highest_rainfall_intensity_per_hr_10yr_mm }} mm
Highest Rainfall in 24 Hours (mm, 10-year)
{{ $climaticData->highest_rainfall_24hr_10yr_mm }} mm
Maximum Humidity (%)
{{ $climaticData->max_humidity_percent }} %
Minimum Humidity (%)
{{ $climaticData->min_humidity_percent }} %
Average Humidity (%)
{{ $climaticData->avg_humidity_percent }} %
Data Source
{{ $climaticData->data_source }}
{{-- YEAR TEMP --}}
Year-wise Temperature
@foreach($climaticData->yearWiseTemperatures as $yt) @endforeach
Year Max Temp Min Temp
{{ $yt->year->name ?? '-' }} {{ $yt->max_temperature }} {{ $yt->min_temperature }}
{{-- HUMIDITY --}}
Monthly Humidity
@foreach($climaticData->monthlyHumidities as $h) @endforeach
Month Humidity (%)
{{ $h->month }} {{ $h->humidity }}
{{-- AVG HUMIDITY --}}
Max Humidity
{{ $climaticData->max_humidity_percent }}
Min Humidity
{{ $climaticData->min_humidity_percent }}
Average
{{ $climaticData->avg_humidity_percent }}
@endif
@endif
@endsection