@php $currentUser = auth()->user(); $currentCompany = $currentUser?->company; $canSeeInternalNotes = (bool) ($currentCompany?->is_system_company ?? false) || \Illuminate\Support\Str::lower((string) ($currentCompany?->slug ?? '')) === 'mpba-limited' || \Illuminate\Support\Str::contains(\Illuminate\Support\Str::lower((string) ($currentCompany?->name ?? '')), 'mpba'); $visibleCommentCount = $ticket->comments->count(); @endphp
{{ $ticket->reference }} {{ $ticket->status->name }} {{ $ticket->priority->name }}

{{ $ticket->subject }}

Raised by {{ $ticket->owner?->name ?? 'Unknown user' }} · Assigned to {{ $ticket->agent?->name ?? 'Unassigned' }}

Back @can('update', $ticket) Edit @endcan

Ticket document

Request details

Original request content recorded against this helpdesk ticket.

{{ $ticket->reference }}
{!! $ticket->body !!}

Ticket attachments

Supporting files

Attach multiple screenshots, documents, logs and evidence directly to this existing ticket.

{{ $ticket->attachments->count() }} file{{ $ticket->attachments->count() === 1 ? '' : 's' }}
@if (session('ticket-supporting-files-added'))
{{ session('ticket-supporting-files-added') }}
@endif @can('comment', $ticket)
Attach supporting evidence {{ count($supportingFiles) === 0 ? 'No files selected' : count($supportingFiles).' file'.(count($supportingFiles) === 1 ? '' : 's').' selected' }}
Preparing selected files…
@if (count($supportingFiles) > 0)

Ready to attach

    @foreach ($supportingFiles as $file)
  • {{ $file->getClientOriginalName() }} {{ Number::fileSize((int) $file->getSize()) }}
  • @endforeach
@endif @error('supportingFiles')
{{ $message }}
@enderror @error('supportingFiles.*')
{{ $message }}
@enderror
@endcan @if ($ticket->attachments->isEmpty())
No supporting files have been attached yet.
@else @endif

Conversation

Document responses

Lotus Notes-style document responses and replies.

{{ $visibleCommentCount }} item{{ $visibleCommentCount === 1 ? '' : 's' }}
@if ($ticket->comments->isNotEmpty()) @include('helpdesk::partials.comment-thread', ['comments' => $ticket->comments, 'level' => 0, 'ticket' => $ticket, 'canSeeInternalNotes' => $canSeeInternalNotes]) @else
No responses yet.
@endif
@csrf

Response document

Add reply

Create a response, internal MPBA note or threaded document reply.

@if (session('ticket-comment-added'))
{{ session('ticket-comment-added') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif @php $cannedResponseBodies = $cannedResponses->mapWithKeys(function ($response) use ($ticket, $currentUser) { $body = (string) $response->body; $body = strtr($body, [ '{{ ticket.reference }}' => e((string) ($ticket->reference ?? '')), '{{ ticket.subject }}' => e((string) ($ticket->subject ?? '')), '{{ ticket.status }}' => e((string) ($ticket->status?->name ?? '')), '{{ ticket.priority }}' => e((string) ($ticket->priority?->name ?? '')), '{{ ticket.category }}' => e((string) ($ticket->category?->name ?? '')), '{{ ticket.project }}' => e((string) ($ticket->project?->title ?? '')), '{{ ticket.team }}' => e((string) ($ticket->team?->name ?? '')), '{{ requester.name }}' => e((string) ($ticket->owner?->name ?? $ticket->user?->name ?? '')), '{{ agent.name }}' => e((string) ($ticket->agent?->name ?? $currentUser?->name ?? '')), '{{ actor.name }}' => e((string) ($currentUser?->name ?? '')), '{{ ticket.url }}' => e(route('helpdesk.tickets.show', ['ticket' => $ticket->getKey()])), ]); $body = html_entity_decode($body, ENT_QUOTES | ENT_HTML5, 'UTF-8'); $body = preg_replace('/<\s*(script|style)[^>]*>.*?<\s*\/\s*\1\s*>/is', '', $body) ?: ''; $body = preg_replace('/\s+on[a-z]+\s*=\s*("[^"]*"|\'[^\']*\'|[^\s>]+)/i', '', $body) ?: ''; $body = preg_replace('/javascript\s*:/i', '', $body) ?: ''; $body = strip_tags($body, '