@extends('layouts.admin') @section('title', $ticket->ticket_number) @section('content')
Support / {{ $ticket->ticket_number }}
@php $sc=['open'=>'b-blue','in_progress'=>'b-yellow','resolved'=>'b-green','closed'=>'b-gray']; $pc=['urgent'=>'b-red','high'=>'b-orange','medium'=>'b-yellow','low'=>'b-gray']; $isOpen = !in_array($ticket->status, ['resolved','closed']); @endphp
{{-- Conversation --}}
{{-- Ticket header --}}

{{ $ticket->subject }}

{{ ucwords(str_replace('_',' ',$ticket->status)) }} {{ ucfirst($ticket->priority) }}
{{ $ticket->ticket_number }} {{ ucfirst($ticket->category) }} @if($ticket->product){{ $ticket->product->name }}@endif {{ $ticket->created_at->format('M d, Y H:i') }}
{{-- Opening message --}}
{{ strtoupper(substr($ticket->user->name??'U',0,1)) }}
{{ $ticket->user->name }}
{{ $ticket->created_at->format('M d, Y H:i') }}
{{ $ticket->description }}
{{-- Replies --}} @foreach($ticket->replies as $reply) @php $isAdmin = $reply->is_admin_reply; @endphp
{{ strtoupper(substr($reply->user->name??'A',0,1)) }}
{{ $reply->user->name }} @if($isAdmin) Support @endif
{{ $reply->created_at->format('M d, Y H:i') }}
{{ $reply->content }}
@endforeach {{-- Admin reply form --}}
@csrf
Admin Reply
{{-- Sidebar --}}
{{-- Status --}}
Update Status
@csrf @method('PATCH')
{{-- Assign --}}
Assign To
@csrf @method('PATCH')
{{-- Details --}}
Details
@foreach([ ['Customer', $ticket->user->name??'-'], ['Email', $ticket->user->email??'-'], ['Category', ucfirst($ticket->category)], ['Priority', ucfirst($ticket->priority)], ['Product', $ticket->product?->name??'None'], ['Replies', $ticket->replies->count()], ['Opened', $ticket->created_at->format('M d, Y')], ['Assigned', $ticket->assignee?->name??'Unassigned'], ] as [$k,$v])
{{ $k }} {{ $v }}
@endforeach
@endsection