@extends('layouts.app') @section('title', 'Tickets - ' . $currentSite->name . ' - TicketHub Central') @section('content')

{{ $currentSite->name }}

{{ $currentSite->code }}

{{ $currentSite->is_active ? 'Connected' : 'Offline' }}

Tickets

Showing {{ $tickets->total() }} tickets for {{ $currentSite->name }}

@if(request()->hasAny(['search', 'closed', 'category', 'type'])) Clear @endif
@if($tickets->isEmpty())

No tickets found

Try adjusting your filters or search query

@else
{{-- --}} @foreach($tickets as $ticket) @endforeach
ID User Latest Comment CategoryPriorityStatus Created Actions
#{{ $ticket->id }}

{{ $ticket->user?->name ?? $ticket->username }}

{{ $ticket->username }}

@if($ticket->latestComment)
@if($ticket->latestComment->support_reply) Support @else Customer @endif {{ $ticket->latestComment->created?->diffForHumans() }}

{{ Str::limit(strip_tags(html_entity_decode($ticket->latestComment->content, ENT_QUOTES, 'UTF-8')), 100) }}

@else {{-- No comments yet--}}
Customer {{ $ticket->updated?->diffForHumans() }}

{{ Str::limit(strip_tags(html_entity_decode($ticket->content, ENT_QUOTES, 'UTF-8')), 100) }}

@endif
{{ $ticket->category ?? '—' }} @if($ticket->closed) Closed @else Open @endif {{ $ticket->created?->format('M d, Y') ?? '—' }}
@if(!$ticket->closed) @endif

Showing {{ $tickets->firstItem() }} to {{ $tickets->lastItem() }} of {{ $tickets->total() }} tickets

@if($tickets->onFirstPage()) Previous @else Previous @endif Page {{ $tickets->currentPage() }} of {{ $tickets->lastPage() }} @if($tickets->hasMorePages()) Next @else Next @endif
@endif

Close Ticket

Are you sure you want to close ticket ? This action marks the ticket as closed by support.

@csrf @method('PATCH')
@endsection