@extends('provider.provider') @section('content')

{{ __('Tickets') }}

Status : {{ $data['ticketdata']->ticket_status ?? '-'}}
Ticket ID : #{{ $data['ticketdata']->ticket_id ?? '-'}}
{{ $data['ticketdata']->subject ?? '-'}}

Updated {{ \App\Helpers\TimeHelper::getRelativeTime($data['ticketdata']->updated_at) }}

@if ($data['ticketdata']->status != 4) @endif
Description

{!! $data['ticketdata']->description ?? '-' !!}

@if(count($data['tickethistory'])>0) @foreach($data['tickethistory'] as $hval)
@if (isset($hval->profile_image) && file_exists(public_path('storage/profile/' .$hval->profile_image))) User Profile Image @else Default Profile Image @endif
{{$hval['username']}}

Updated {{ \App\Helpers\TimeHelper::getRelativeTime($hval['created_at']) }}

@php $content = $hval['description']; // Summernote content $dom = new DOMDocument(); @$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')); $imageLinks = []; // Array to store download links // Extract image tags and prepare download links foreach ($dom->getElementsByTagName('img') as $img) { $src = $img->getAttribute('src'); $dataFilename = $img->getAttribute('data-filename'); // Get the data-filename attribute $imageName = $dataFilename ?: basename($src); // Use data-filename if available, else fallback to src basename // Prepare the download link HTML $imageLinks[] = " "; // Optionally, remove the image tag from content $img->parentNode->removeChild($img); } // Get the remaining content without images $modifiedContent = $dom->saveHTML(); @endphp {{-- Display the modified content --}}
{!! $modifiedContent !!}
{{-- Display the download links --}} @foreach ($imageLinks as $link) {!! $link !!} @endforeach
@endforeach @endif

Ticket Details

@if (!empty($data['ticketdata']->assignee_id))
@endif
@if (isset($data['ticketdata']->profile_image) && file_exists(public_path('storage/profile/' .$data['ticketdata']->profile_image))) User Profile Image @else @if($data['ticketdata']->user_type=='User') Default Profile Image @else Default Profile Image @endif @endif
{{ $data['ticketdata']->user_type ?? 'User'}}

{{ $data['ticketdata']->username ?? '-'}}

User Email

{{ $data['ticketdata']->email ?? '-'}}

@if($data['ticketdata']->status=='4')
Last Updated / Closed On

{{ formatDateTime($data['ticketdata']->updated_at, true) ?? '-'}}

@endif
@endsection