{{-- resources/views/support/show.blade.php --}} @extends('layouts.app') @section('title', $ticket->reference) @section('page_title', $ticket->subject) @section('page_subtitle', $ticket->reference) @section('content') @php $statusConfig = [ 'open' => ['bg'=>'#fef3c7','color'=>'#92400e'], 'in_progress' => ['bg'=>'#dbeafe','color'=>'#1e40af'], 'resolved' => ['bg'=>'#d1fae5','color'=>'#065f46'], 'closed' => ['bg'=>'#f1f5f9','color'=>'#64748b'], ]; $sc = $statusConfig[$ticket->status] ?? $statusConfig['open']; $priorityConfig = [ 'low' => ['bg'=>'#f1f5f9','color'=>'#64748b'], 'medium' => ['bg'=>'#fef3c7','color'=>'#92400e'], 'high' => ['bg'=>'#fee2e2','color'=>'#991b1b'], 'urgent' => ['bg'=>'#fee2e2','color'=>'#7f1d1d'], ]; $pc = $priorityConfig[$ticket->priority] ?? $priorityConfig['medium']; @endphp
← Tickets {{ strtoupper(str_replace('_', ' ', $ticket->status)) }} {{ strtoupper($ticket->priority) }} @if(!in_array($ticket->status, ['resolved','closed']))
@csrf
@endif
{{-- Conversation --}}
{{-- Messages --}}
Conversation
@foreach($ticket->messages as $message) @php $isProperty = $message->author_type === \App\Models\User::class || $message->author_type === 'App\Models\User'; @endphp
{{-- Avatar --}}
@if($isProperty) @else @endif
{{-- Author + time --}}
@if($isProperty) {{ $message->author?->name ?? 'Property' }} @else Kubhuka Support @endif @if(!$isProperty) SUPPORT @endif {{ $message->created_at->format('d M Y H:i') }} ({{ $message->created_at->diffForHumans() }})
{{-- Body --}}
{{ $message->body }}
{{-- Attachments --}} @if($message->attachments->count() > 0) @endif
@endforeach
{{-- Reply Box --}} @if(!in_array($ticket->status, ['closed']))
Reply
@csrf
@error('body')
{{ $message }}
@enderror
@if($ticket->status === 'resolved') Replying will reopen this ticket @endif
@else

Ticket closed

This ticket is closed. Open a new ticket if you need further help.

Open New Ticket
@endif
{{-- Right sidebar --}}
{{-- Ticket Info --}}
Ticket Info
Reference {{ $ticket->reference }}
Status {{ ucfirst(str_replace('_', ' ', $ticket->status)) }}
Priority {{ ucfirst($ticket->priority) }}
Category {{ ucfirst(str_replace('_', ' ', $ticket->category)) }}
Opened By {{ $ticket->user?->name }}
Created {{ $ticket->created_at->format('d M Y H:i') }}
Last Updated {{ $ticket->updated_at->diffForHumans() }}
@if($ticket->admin)
Assigned Agent
{{ $ticket->admin->name }}
Kubhuka Support
@endif @if($ticket->first_response_at)
First Response {{ $ticket->first_response_at->diffForHumans($ticket->created_at) }}
@endif @if($ticket->resolved_at)
Resolved {{ $ticket->resolved_at->format('d M Y') }}
@endif
{{-- Direct contact --}}
Other Ways to Reach Us
Email
support@kubhuka.com
WhatsApp
+263 77 700 0000
Support Hours:
Mon – Fri: 8:00 AM – 6:00 PM
Sat: 9:00 AM – 1:00 PM
Sun & Public Holidays: Closed
@endsection