@extends("client.layouts.app") @section("title", "#". $ticket->tid ." - ". $ticket->title) @section("content") {{ __('client.tickets.back_to_tickets') }}

#{{ $ticket->tid }} — {{ $ticket->title }}

{{ $ticket->department->name ?? __('client.tickets.general_dept') }}  ·  {{ __('client.tickets.opened') }} {{ $ticket->created_at->timezone(display_tz())->format(datetime_fmt()) }} @if($ticket->last_reply)  ·  {{ __('client.tickets.last_reply') }} {{ $ticket->last_reply->diffForHumans() }} @endif

status)) }}" style="font-size:12.5px;padding:4px 12px">{{ __('client.status.' . strtolower(str_replace(' ', '-', $ticket->status))) }} {{ __('client.status.' . strtolower($ticket->priority ?? 'medium')) }}
{{-- Original message --}}
{{ $ticket->name ?? auth()->user()->full_name }} {{ $ticket->created_at->timezone(display_tz())->format(datetime_fmt()) }}
{{ $ticket->message }}
@if($ticket->attachment)
{{ __('client.tickets.download_attachment') }}
@endif
{{-- Replies --}} @foreach($ticket->replies as $reply)
@if($reply->admin) {{ __('client.tickets.support_staff') }}: {{ $reply->admin }} @else {{ auth()->user()->full_name }} @endif {{ $reply->created_at->timezone(display_tz())->format(datetime_fmt()) }}
{{ $reply->message }}
@if($reply->attachment)
id]) }}" style="color:#405189;font-size:12px;text-decoration:none;display:inline-flex;align-items:center;gap:4px"> {{ __('client.tickets.download_attachment') }}
@endif
@endforeach {{-- Closed: how did we do? One rating per ticket. --}} @if(strtolower($ticket->status) === 'closed')
{{ __('client.tickets.feedback_title') }}
@if($ticket->feedback)

{{ __('client.tickets.feedback_given', ['rating' => $ticket->feedback->rating]) }}

@if($ticket->feedback->comments)

{{ $ticket->feedback->comments }}

@endif @else
@csrf
{{ __('client.tickets.feedback_question') }}
@foreach([1, 2, 3, 4, 5] as $score) @endforeach
@endif
@endif {{-- Reply form --}} @if(strtolower($ticket->status) !== 'closed')
{{ __('client.tickets.post_reply') }}
@csrf @if($errors->any())
{{ $errors->first() }}
@endif
{{ __('client.tickets.back_to_tickets') }}
{{-- A separate form: the reply form cannot hold a second action. --}}
@csrf
@else
{{ __('client.tickets.ticket_closed') }} {{ __('client.tickets.open_new_ticket') }} {{ __('client.tickets.need_further_assistance') }}
@endif @endsection