@extends('layouts.app')
@section('page-title', __('app.report.title'))
@section('content')
@foreach (['7' => __('app.report.last_7_days'), '30' => __('app.report.last_30_days'), '90' => __('app.report.last_90_days'), 'year' => __('app.report.this_year'), 'all' => __('app.report.all_time')] as $key => $label)
{{ $label }}
@endforeach
{{ $createdCount }}
{{ __('app.report.created_in_range') }}
{{ $closedCount }}
{{ __('app.report.closed_in_range') }}
{{ $avgResolutionHours !== null ? __('app.report.avg_resolution_hours', ['hours' => $avgResolutionHours]) : __('app.report.avg_resolution_na') }}
{{ __('app.report.avg_resolution') }}
{{ $currentOpenCount }}
{{ __('app.report.currently_open') }}
{{ __('app.report.tickets_over_time') }}
@if (empty($series) || collect($series)->sum('count') === 0)
{{ __('app.report.no_data') }}
@else
@php $max = max(1, collect($series)->max('count')); @endphp
@foreach ($series as $point)
{{ $point['label'] }}
{{ $point['count'] }}
@endforeach
@endif
{{ __('app.report.by_status') }}
@foreach ($byStatus as $status => $count)
{{ __('app.ticket.status.'.$status) }}
{{ $count }}
@endforeach
{{ __('app.report.by_priority') }}
@foreach ($byPriority as $priority => $count)
{{ __('app.ticket.priority.'.$priority) }}
{{ $count }}
@endforeach
{{ __('app.report.by_source') }}
@foreach ($bySource as $source => $count)
{{ __('app.ticket.source.'.$source) }}
{{ $count }}
@endforeach
{{ __('app.report.by_category') }}
@forelse ($byCategory as $row)
{{ $row['name'] }}
{{ $row['count'] }}
@empty
{{ __('app.report.no_data') }}
@endforelse
{{ __('app.report.by_agent') }}
@forelse ($byAgent as $row)
{{ $row['name'] }}
{{ $row['count'] }}
@empty
{{ __('app.report.no_data') }}
@endforelse
@endsection