@extends('layouts.vertical', ['page_title' => 'View']) @section('css') @endsection @section('content')
@php $queryParams = http_build_query([ 'state' => is_array(request('state')) ? request('state')[0] ?? '' : request('state'), 'status' => is_array(request('status')) ? request('status')[0] ?? '' : request('status'), 'from_date' => is_array(request('from_date')) ? request('from_date')[0] ?? '' : request('from_date'), 'to_date' => is_array(request('to_date')) ? request('to_date')[0] ?? '' : request('to_date'), 'requesttype' => 'view', ]); // Helper function to safely output values (handle arrays) if (!function_exists('safeOutput')) { function safeOutput($value) { if (is_array($value)) { return json_encode($value); } return $value ?? ''; } } @endphp
RequestID: {{ is_array($item->id ?? null) ? json_encode($item->id) : $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

Employee Details

Emp ID of TM: {{ is_array($item->emp_id ?? null) ? json_encode($item->emp_id) : $item->emp_id ?? '' }}

Name of TM: {{ is_array($item->emp_name ?? null) ? json_encode($item->emp_name) : $item->emp_name ?? '' }}

TM Mobile Number: {{ is_array($item->emp_phone ?? null) ? json_encode($item->emp_phone) : $item->emp_phone ?? '' }}

TM Email ID: {{ is_array($item->emp_email ?? null) ? json_encode($item->emp_email) : $item->emp_email ?? '' }}

ABM Name: {{ is_array($item->abm_name ?? null) ? json_encode($item->abm_name) : $item->abm_name ?? '' }}

RBM Name: {{ is_array($item->rbm_name ?? null) ? json_encode($item->rbm_name) : $item->rbm_name ?? '' }}

{{--

Request Letter: Download

--}}

Doctor Details

Dr Name: {{ is_array($item->doctor_name ?? null) ? json_encode($item->doctor_name) : $item->doctor_name ?? '' }}

Doctor Mobile Number: {{ is_array($item->doctor_phone ?? null) ? json_encode($item->doctor_phone) : $item->doctor_phone ?? '' }}

Speciality: {{ is_array($item->doctor_speciality ?? null) ? json_encode($item->doctor_speciality) : $item->doctor_speciality ?? '' }}

MSL CODE of Dr: {{ is_array($item->msl_code ?? null) ? json_encode($item->msl_code) : $item->msl_code ?? '' }}

Type of Nebulizer: {{ is_array($item->type_of_nebulizer ?? null) ? json_encode($item->type_of_nebulizer) : $item->type_of_nebulizer ?? '' }}

Do you need more than 5 nebulizers {{ isset($item->more_than_5_nebulizer) ? (is_array($item->more_than_5_nebulizer) ? json_encode($item->more_than_5_nebulizer) : $item->more_than_5_nebulizer) : '' }}

No of Nebulizer: {{ is_array($item->no_of_nebulizer ?? null) ? json_encode($item->no_of_nebulizer) : $item->no_of_nebulizer ?? '' }}

Value of the Parcel: {{ is_array($item->value_of_parcel ?? null) ? json_encode($item->value_of_parcel) : $item->value_of_parcel ?? '' }}

Team: {{ is_array($item->team ?? null) ? json_encode($item->team) : $item->team ?? '' }}

@php $letterPath = $item->request_letter ?? ''; if (strpos($letterPath, 'https') === 0) { $fullUrl = $letterPath; } else { $fullUrl = 'https://did94hhhcgq1d.cloudfront.net' . $letterPath; } @endphp @if (!empty($letterPath))

Request Letter

Request Letter
Download existing
@endif

Drop Details

Clinic / Hospital / Home Name: {{ is_array($item->clinic_hospital_name ?? null) ? json_encode($item->clinic_hospital_name) : $item->clinic_hospital_name ?? '' }}

Building Name: {{ is_array($item->address_building ?? null) ? json_encode($item->address_building) : $item->address_building ?? '' }}

Address Type: {{ is_array($item->address_type ?? null) ? json_encode($item->address_type) : $item->address_type ?? '' }}

Address line 1: {{ is_array($item->address_line_1 ?? null) ? json_encode($item->address_line_1) : $item->address_line_1 ?? '' }}

Address line 2: {{ is_array($item->address_line_2 ?? null) ? json_encode($item->address_line_2) : $item->address_line_2 ?? '' }}

State: {{ is_array($item->address_state ?? null) ? json_encode($item->address_state) : $item->address_state ?? '' }}

City: {{ is_array($item->address_city ?? null) ? json_encode($item->address_city) : $item->address_city ?? '' }}

Pin Code: {{ is_array($item->address_pin_code ?? null) ? json_encode($item->address_pin_code) : $item->address_pin_code ?? '' }}

Remarks: {{ is_array($item->remarks ?? null) ? json_encode($item->remarks) : $item->remarks ?? '' }}

Paramedic/Alternate Contact number: {{ is_array($item->paramedic_alternate_contact_number ?? null) ? json_encode($item->paramedic_alternate_contact_number) : $item->paramedic_alternate_contact_number ?? '' }}

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

Geolocation Details

Address: {{ is_array($item->geolocation_address ?? null) ? json_encode($item->geolocation_address) : $item->geolocation_address ?? '' }}

@if (!empty($item->geolocation_json))
@php $geolocations = is_string($item->geolocation_json) ? json_decode($item->geolocation_json) : $item->geolocation_json; @endphp @foreach ($geolocations as $geok => $geov) @if (is_string($geok) && is_string($geov))

{{ $geok }}: {{ $geov }}

@endif @endforeach @endif
@endif
{{-- Doc Details in modal --}} @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
@endsection @section('script') @endsection