@extends('layouts.vertical', ['page_title' => 'Edit']) @section('css') @endsection @section('content')
@php // echo '
';
                // print_r($item);
                // exit;
            @endphp

            @php
                $queryParams = http_build_query([
                    'state' => request('state'),
                    'status' => request('status'),
                    'from_date' => request('from_date'),
                    'to_date' => request('to_date'),
                    'requesttype' => 'edit',
                ]);
            @endphp
            
RequestID: {{ $item->id }} | Status: {{ $item->status }}
@csrf Prev Next Back
@if (session()->has('message'))
{{ session()->get('message') }}
@endif @if (session()->has('error'))
{{ session()->get('error') }}
@endif
{{-- --}} {{-- --}} @csrf

Employee Details

Doctor Details

@php $selectedValue = old('more_than_5_nebulizer', $item->more_than_5_nebulizer ?? 'No'); @endphp
@php $maxNebulizer = 5; if (!empty($item->no_of_nebulizer) && $item->no_of_nebulizer > 5) { $maxNebulizer = 10; } @endphp
Request Letter
@php $letterPath = $item->request_letter ?? ''; $prefix = 'https://did94hhhcgq1d.cloudfront.net'; $fullUrl = strpos($letterPath, $prefix) === 0 ? $letterPath : $prefix . $letterPath; @endphp @if (!empty($letterPath))
Request Letter
Download existing @else

No request letter available.

@endif

Drop Details

Geolocation

{{-- @if (isset($item->geolocation_address))

Full Address: {{ $item->geolocation_address }}

@if (!empty($item->geolocation_json)) @php $geolocations = json_decode($item->geolocation_json); @endphp @foreach ($geolocations as $geok => $geov) @endforeach
{{ str_replace('_', ' ', $geok) }} {{ $geov }}
@endif @endif --}} {{--
--}}

Geolocation

@if (!empty($item->geolocation_address))

Full Address: {{ $item->geolocation_address }}

@endif @if (!empty($item->geolocation_json)) @php $geolocations = json_decode($item->geolocation_json); $toString = function ($v) { if (is_null($v)) { return ''; } if (is_scalar($v)) { return (string) $v; } if (is_object($v)) { $v = (array) $v; } if (is_array($v)) { $out = []; array_walk_recursive($v, fn($x) => is_scalar($x) && ($out[] = $x)); return implode(', ', $out); } return ''; }; @endphp @if (is_array($geolocations) || is_object($geolocations)) @foreach ((array) $geolocations as $key => $val) @php $value = $toString($val); @endphp @if ($value !== '') @endif @endforeach
{{ ucwords(str_replace('_', ' ', $key)) }} {{ $value }}
@endif @endif
{{--
--}}
@if (isset($doctors) && $doctors->count())
MSL Code ({{ $item->msl_code }})
@foreach ($doctors as $doc) @endforeach
ID Doctor Name TM Name Status Team Created At Action
{{ $doc->id }} {{ $doc->doctor_name ?? '-' }} {{ $doc->emp_name ?? '-' }} {{ $doc->status }} {{ $doc->team ?? '-' }} {{ \Carbon\Carbon::parse($doc->created_at)->format('d M Y') }}
@endif {{-- Doc Details in modal --}}
@endsection @section('script') @endsection