@extends('layouts.app') @section('title', 'Average Forwarded Time') @section('content')
View forwarded time statistics
Total Forwarded
Average Forwarded Time
| Ticket # | Reseller | Subject | Category | Forwarded At | Next Assigned At | Forwarded Time | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $ticket->ticket_number }} | @if($ticket->user) @if($ticket->user->reseller && $ticket->user->reseller->name) {{ $ticket->user->reseller->name }} @elseif($ticket->user->company_name) {{ $ticket->user->company_name }} @else {{ $ticket->user->name ?? 'N/A' }} @endif @else N/A @endif | {{ Str::limit($ticket->subject ?? $ticket->description, 50) }} | {{ $ticket->category->name ?? 'N/A' }} |
@if($forwardedAssignment && $forwardedAssignment->assigned_at)
@php
$forwardedAt = \Carbon\Carbon::parse($forwardedAssignment->assigned_at);
$nextAssignedAt = $nextAssignment ? \Carbon\Carbon::parse($nextAssignment->assigned_at) : null;
if ($nextAssignedAt) {
$duration = $forwardedAt->diff($nextAssignedAt);
$days = $duration->days;
$hours = $duration->h;
$minutes = $duration->i;
$seconds = $duration->s;
$durationText = sprintf('%dd:%02dh:%02dm:%02ds', $days, $hours, $minutes, $seconds);
} else {
$durationText = 'N/A';
}
@endphp
@if($nextAssignedAt)
{{ $durationText }}
@endif
{{ $forwardedAt->format('Y-m-d H:i') }} @else N/A @endif |
@if($nextAssignment && $nextAssignment->assigned_at)
@php
$nextAssignedAt = \Carbon\Carbon::parse($nextAssignment->assigned_at);
$forwardedAt = $forwardedAssignment ? \Carbon\Carbon::parse($forwardedAssignment->assigned_at) : null;
if ($forwardedAt) {
$duration = $forwardedAt->diff($nextAssignedAt);
$days = $duration->days;
$hours = $duration->h;
$minutes = $duration->i;
$seconds = $duration->s;
$durationText = sprintf('%dd:%02dh:%02dm:%02ds', $days, $hours, $minutes, $seconds);
} else {
$durationText = 'N/A';
}
@endphp
@if($forwardedAt)
{{ $durationText }}
@endif
{{ $nextAssignedAt->format('Y-m-d H:i') }} @else N/A @endif |
@if($forwardedTime !== null) @php $days = floor($forwardedTime / (24 * 60)); $hours = floor(($forwardedTime % (24 * 60)) / 60); $mins = $forwardedTime % 60; $durationText = sprintf('%dd:%02dh:%02dm:00s', $days, $hours, $mins); @endphp {{ $durationText }} @else N/A @endif | @php $statusLabel = ucfirst(str_replace('_', ' ', $ticket->status)); @endphp {{ $statusLabel }} | View |
| No forwarded tickets found | ||||||||