@extends('template.layouts.template-base') @section('title', 'Request Details') @section('content')
{{-- VIEW MODE BUTTONS --}} {{-- VIEW MODE BUTTONS --}}
@if ($tab == 'inprogress') @endif
{{-- EDIT MODE BUTTONS (hidden by default) --}}
@if ($tab == 'inprogress') @endif
{{-- Request Info --}}

#{{ $ServiceRequest->request_id }} {{ ucfirst($ServiceRequest->priority) }}

{{ $ServiceRequest->title }}

Client: {{ $ServiceRequest->client->name }} | Date: {{ $ServiceRequest->created_at->format('d/m/Y') }}

{{-- Complaint Details --}}
Complaint Details

{{ $ServiceRequest->issue_summary }}

@php $ids = explode(',', $ServiceRequest->product_id); $productsList = \App\Models\Product::whereIn('id', $ids)->get(); // dd($ids,$productsList); @endphp @forelse ($productsList as $item) {{ $item->product_name }} @empty No products found @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 @if ($isImage)
{{ $attachment->title }}
@else
@endif
{{ $attachment->title }} {{ strtoupper($extension) }} • {{ round(filesize(public_path($attachment->attachment)) / 1024, 1) }} KB
{{--
--}}
@empty
not-found

No attachments found

@endforelse
Admin Action
@csrf
{{-- ========== NEW TAB ========== --}} @if ($tab == 'new') Cancel @endif {{-- ========== IN-PROGRESS TAB ========== --}} {{-- ========== RESOLVED TAB ========== --}} @if ($tab == 'resolved') @endif {{-- ========== CLOSED TAB ========== --}} @if ($tab == 'closed') {{-- NO BUTTONS --}} @endif
@endsection @section('scripts') @endsection