@extends('layouts.app') @section('style') @endsection @section('wrapper')
{{ $ticket->subject }}
{{ $ticket->ticket_number }} • {{__('Created')}} {{ $ticket->created_at->format('d.m.Y H:i') }}
{{ $ticket->status_text }}
{{ $ticket->priority_text }}
{{__('Category')}}
{{ $ticket->category_text }}
{{__('Last Activity')}}
{{ $ticket->last_activity_at->diffForHumans() }}
@if($ticket->assignedTo)
{{__('Assigned To')}}
{{ $ticket->assignedTo->account_holder ?? $ticket->assignedTo->name }}
@endif
{{__('Messages')}} ({{ $ticket->messages->count() }})
@foreach($ticket->messages as $message) @if(!$message->is_internal || auth()->user()->user_type == 1)
{{ substr($message->user->account_holder ?? $message->user->name, 0, 1) }}
{{ $message->user->account_holder ?? $message->user->name }} @if($message->user->user_type == 1) {{__('Admin')}} @endif @if($message->is_internal) {{__('Internal Note')}} @endif
{{ $message->created_at->format('d.m.Y H:i') }}
{!! $message->formatted_message !!} @if($message->hasAttachments())
{{__('Attachments')}} ({{ $message->getAttachmentCount() }})
@foreach($message->attachments as $attachment)
{{ $attachment['name'] }} ({{ $attachment['size'] < 1024 ? $attachment['size'] . ' B' : ($attachment['size'] < 1048576 ? number_format($attachment['size'] / 1024, 2) . ' KB' : number_format($attachment['size'] / 1048576, 2) . ' MB') }})
@endforeach
@endif
@endif @endforeach
@if(in_array($ticket->status, ['open', 'in_progress', 'waiting_user', 'waiting_admin']))
{{__('Send Reply')}}
@csrf
{{__('Remaining characters')}}: 5000
{{__('Max file size: 10MB')}} | {{__('Allowed formats: JPG, PNG, PDF, DOC, TXT')}}
@if(auth()->user()->user_type == 1)
@endif
@else
{{__('Ticket is Closed')}}

{{__('This ticket has been closed and no longer accepts replies.')}}

@if($ticket->status == 'resolved' && auth()->user()->user_type != 1) @endif
@endif
@if(auth()->user()->user_type == 1)
{{__('Admin Actions')}}
@endif
{{__('Ticket Information')}}
{{__('Ticket Number')}}
{{ $ticket->ticket_number }}
{{__('Created By')}}
{{ $ticket->user->account_holder ?? $ticket->user->name }}
{{__('Created Date')}}
{{ $ticket->created_at->format('d.m.Y H:i') }}
{{__('Last Activity')}}
{{ $ticket->last_activity_at->format('d.m.Y H:i') }}
@if($ticket->resolved_at)
{{__('Resolved Date')}}
{{ $ticket->resolved_at->format('d.m.Y H:i') }}
@endif @if($ticket->closed_at)
{{__('Closed Date')}}
{{ $ticket->closed_at->format('d.m.Y H:i') }}
@endif
@section('script') @endsection @endsection