@extends('layouts.bootstrap') @section('title', 'Agent Dashboard') @section('content')

Agent Dashboard

Welcome back, {{ Auth::user()->name }}! Here's your performance overview.

{{ $performanceSummary->total_tickets_resolved ?? 0 }}

Tickets Resolved

Last 30 days

{{ number_format($performanceSummary->avg_customer_satisfaction ?? 0, 1) }}

Avg Satisfaction

Out of 5.0

{{ number_format(($performanceSummary->avg_resolution_time ?? 0) / 60, 1) }}h

Avg Resolution Time

Last 30 days

{{ number_format($performanceSummary->avg_performance_score ?? 0, 0) }}%

Performance Score

Overall rating
Today's Performance

{{ $todayPerformance->total_tickets_resolved ?? 0 }}

Tickets Resolved Today

{{ $todayPerformance->total_comments_added ?? 0 }}

Comments Added

{{ $todayPerformance->avg_resolution_time ?? 0 }}m

Avg Resolution Time

{{ number_format($todayPerformance->avg_performance_score ?? 0, 0) }}%

Today's Score

Your Assigned Tickets
View All
@if($assignedTickets->count() > 0)
@foreach($assignedTickets as $ticket) @endforeach
Ticket ID Title Priority Status Created Actions
#{{ $ticket->id }}
{{ Str::limit($ticket->title, 40) }}
by {{ $ticket->user->name }}
{{ ucfirst($ticket->priority) }} {{ ucfirst($ticket->status) }} {{ $ticket->created_at->diffForHumans() }} View
@else
No Assigned Tickets

You don't have any tickets assigned to you at the moment.

@endif
Recent Activity
@if($recentActivity->count() > 0)
@foreach($recentActivity as $activity)
{{ $activity->activity_type }}

{{ $activity->activity_description }}

{{ \Carbon\Carbon::parse($activity->activity_time)->diffForHumans() }}
@endforeach
@else

No recent activity

@endif
Performance Trend
@endsection