@extends('layouts.usermain') @section('main-container')
{{-- Flash Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Pre Work Level Measurements (Edit)

@csrf @method('PUT') @php $planning = $data->waterHarvestingStructuresPlannings->first() ?? null; @endphp {{-- Beneficiary & Project Info --}}
{{-- Beneficiary Name --}}
{{-- Beneficiary Name --}}
{{ $data->baseline->name_of_respondent ?? 'N/A' }}
{{-- Dimensions --}}
{{ $planning->length ?? 'N/A' }} m × {{ $planning->width ?? 'N/A' }} m × {{ $planning->depth_or_height ?? 'N/A' }} m
{{-- Village, Panchayat, Block --}} @foreach (['Village' => $data->baseline?->village?->name, 'Panchayat' => $data->baseline?->panchayat?->name, 'Block' => $data->baseline?->block?->name] as $label => $value)
{{ ucfirst(strtolower($value ?? 'N/A')) }}
@endforeach {{-- District --}}
{{ ucfirst(strtolower($data->baseline?->district?->name ?? 'N/A')) }}
{{-- Project Type --}}
{{ $data->baseline?->projectType->name ?? 'N/A' }}
{{-- Plot No --}}
{{-- Measurement Date --}}
{{-- Latitude --}}
{{-- Longitude --}}
{{-- Station Table --}}
@php if (is_string($data->stations)) { $stations = json_decode($data->stations, true) ?? []; } elseif (is_array($data->stations)) { $stations = $data->stations; } else { $stations = []; } @endphp {{-- TBM row (first fixed row) --}} @if(!empty($stations)) @foreach($stations as $index => $s) @php $s = is_array($s) ? $s : []; @endphp @endforeach @else @endif
Station Chainage BS IS FS HI RL Remarks Action
TBM
{{ $s['station'] ?? $index + 1 }}
No station readings available.
Average RL
{{-- Hidden identifiers --}}
Cancel
@endsection