@extends('FrontUser.layouts.app') @section('title', 'Call Management') @section('content')
Total Calls
{{ number_format($totalCalls) }}
This month: {{ number_format($thisMonthCalls) }}
Total Duration
{{ number_format($totalDuration / 60, 1) }}h
Average: {{ number_format($totalDuration / max($totalCalls, 1), 1) }}min
Total Cost
₹{{ number_format($totalCost, 2) }}
Average: ₹{{ number_format($totalCost / max($totalCalls, 1), 2) }}
Success Rate
{{ $totalCalls > 0 ? number_format(($totalCalls / max($totalCalls, 1)) * 100, 1) : 0 }}%
Completed calls
Quick Actions
Schedule Call

Book a new call

View Analytics

Call insights & reports

Call Packages

View available plans

Call History

View all past calls

Recent Calls
@if($calls->count() > 0)
@foreach($calls as $call)
{{ $call->phone_number }}
{{ ucfirst($call->package) }} Plan {{ $call->date_time->format('M d, Y h:i A') }}
{{ ucfirst(str_replace('_', ' ', $call->status)) }}
₹{{ number_format($call->cost, 2) }}
@if($call->status === 'scheduled') @elseif($call->status === 'in_progress') @elseif($call->status === 'completed') @if($call->recording_url) @endif @endif
@endforeach
{{ $calls->links() }}
@else
No calls found

Your call history will appear here

Schedule Your First Call
@endif
Call Insights
Most Used Package
{{ ucfirst($calls->groupBy('package')->sortByDesc(function($group) { return $group->count(); })->keys()->first() ?? 'Basic') }}
Average Call Duration
{{ number_format($totalDuration / max($totalCalls, 1), 1) }} minutes
Total Cost This Month
₹{{ number_format($totalCost, 2) }}
Call Success Rate
{{ $totalCalls > 0 ? number_format(($totalCalls / max($totalCalls, 1)) * 100, 1) : 0 }}%
@endsection @section('scripts') @endsection