@extends('template.layouts.template-base') @section('title', 'Request Details') @section('content')
@if ($tab == 'sent') Edit Request @elseif ($tab == 'inprogress') @elseif ($tab == 'resolved') {{-- Read-only view, no action buttons --}} @endif
@forelse (explode(',', $ServiceRequest->product_id) as $pid) @php $product = $products->firstWhere('id', $pid); @endphp @if ($product) {{ $product->product_name }} @endif @empty No products selected @endforelse
@forelse($ServiceRequest->attachments as $attachment) @php $extension = pathinfo($attachment->attachment, PATHINFO_EXTENSION); $isImage = in_array(strtolower($extension), [ 'jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', ]); $fileUrl = asset($attachment->attachment); @endphp @empty

No attachments found

@endforelse
{{-- Admin Action Card (Only for In-Progress / Resolved) --}} @if ($tab != 'sent')
Admin Action
@csrf
@else {{-- Hidden form for Sent tab transition --}}
@csrf
@endif
@endsection @section('scripts') @endsection