@extends('layouts.header') @section('content')

Tickets Closure Report (Default: Today's Tickets)

Overall Summary

Total Tickets
{{ $summary['total_tickets'] ?? 0 }}
New Tickets
{{ $summary['total_new_tickets'] ?? 0 }}
Reopened Tickets
{{ $summary['total_reopened_tickets'] ?? 0 }}
Total Reopens
{{ $summary['total_reopens'] ?? 0 }}
Total Closures
{{ $summary['total_closures'] ?? 0 }}
New Tickets Closures
{{ $summary['new_tickets_closures'] ?? 0 }}
Reopened Tickets Closures
{{ $summary['reopened_tickets_closures'] ?? 0 }}
@if(!empty($summary['agent_wise_ticket_count']))
Agent-wise Ticket Count
@foreach($summary['agent_wise_ticket_count'] as $agentStat)
{{ $agentStat['agent_name'] }}
Total: {{ $agentStat['total_tickets'] }} New: {{ $agentStat['new_tickets'] }} Reopened: {{ $agentStat['reopened_tickets'] }}
Closed: {{ $agentStat['closed_tickets'] }} Open: {{ $agentStat['open_tickets'] }}
@endforeach
@endif @if(!empty($summary['users_closure_summary']))
Overall Closures by Users
@foreach($summary['users_closure_summary'] as $userSummary)
{{ $userSummary['user_name'] ?? 'Unknown User' }}
Total: {{ $userSummary['total_closures'] }} New: {{ $userSummary['new_tickets_closures'] ?? 0 }} Reopened: {{ $userSummary['reopened_tickets_closures'] ?? 0 }}
Tickets Closed: {{ count($userSummary['tickets_closed']) }}
@endforeach
@endif
(Exports all {{ count($tickets) > 0 ? $tickets->total() : 0 }} records with current filters)
@php $startIndex = ($tickets->currentPage() - 1) * $tickets->perPage(); @endphp @forelse($tickets as $index => $ticket) @empty @endforelse
SL No Ticket Type Ticket Number Ticket Name Created Date Assigned To Responded By Times Reopened Closed By Closure Details Closure Status Closure Date
{{ $startIndex + $index + 1 }} @if($ticket['ticket_type'] == 'New') New @else Reopened @endif {{ $ticket['ticket_number'] ?? 'N/A' }} {{ $ticket['ticket_name'] ?? 'N/A' }} {{ $ticket['created_date'] ? \Carbon\Carbon::parse($ticket['created_date'])->format('d-m-Y H:i') : 'N/A' }} @if(!empty($ticket['assigned_to'])) @foreach($ticket['assigned_to'] as $agent) {{ $agent }}
@endforeach @else Not Assigned @endif
@if(!empty($ticket['responded_by'])) @foreach($ticket['responded_by'] as $responder) {{ $responder }}
@endforeach @else No Response @endif
@if($ticket['reopen_count'] > 0) {{ $ticket['reopen_count'] }} @else 0 @endif @if($ticket['closed_by']) {{ $ticket['closed_by'] }} @else Not Closed @endif @if(!empty($ticket['closed_by_users'])) @foreach($ticket['closed_by_users'] as $userName => $count)
{{ $userName }}: {{ $count }} time(s)
@endforeach @else N/A @endif
@if($ticket['closure_status'] == 'Closed') Closed @else {{ $ticket['closure_status'] }} @endif {{ $ticket['closure_date'] ? \Carbon\Carbon::parse($ticket['closure_date'])->format('d-m-Y H:i') : 'N/A' }}
No tickets found
{{ $tickets->links('pagination.custom') }}
@endsection