@extends('FrontUser.layouts.app') @section('title', 'User Dashboard') @section('content')

Dashboard

Welcome back, {{ Auth::user()->name }}!

Wallet Balance
₹ {{ number_format($walletBalance ?? 0, 2) }}
Recharge Wallet
Total Calls
{{ $totalCalls ?? 0 }}
Total Duration
{{ sprintf('%02d:%02d', floor(($totalDurationSeconds ?? 0)/60), ($totalDurationSeconds ?? 0)%60) }}
Money Used
₹ {{ number_format($totalMoney ?? 0, 2) }}
Calls & Duration (Last 7 days)
Spend (Last 7 days)
Recent Calls
View All Calls
@forelse(($recentCalls ?? []) as $call) @php($dt = data_get($call, 'date_time')) @php($dur = (int) (data_get($call, 'duration') ?? 0)) @php($cost = (float) (data_get($call, 'cost') ?? 0)) @php($status = data_get($call, 'status', 'active')) @empty @endforelse
Call ID Contact Name Contact No. Date/Time Duration Cost Status Actions
{{ data_get($call, 'call_id') ?? data_get($call, 'id') }} {{ data_get($call, 'contact_name') ?? '—' }} {{ data_get($call, 'phone_number') ?? '—' }}{{ $dt ? \Illuminate\Support\Carbon::parse($dt)->format('M d, Y h:i A') : '—' }}{{ sprintf('%02d:%02d', floor($dur/60), $dur%60) }}₹ {{ number_format($cost, 2) }} {{ ucfirst($status) }}
No recent calls.
Scheduled Calls
Schedule New Call
@forelse(($scheduledCalls ?? []) as $call) @php($sdt = data_get($call, 'date_time')) @empty @endforelse
Call ID Contact Scheduled Date/Time Purpose Status Actions
{{ data_get($call, 'call_id') ?? data_get($call, 'id') }} {{ data_get($call, 'contact_name') ?? '—' }}{{ $sdt ? \Illuminate\Support\Carbon::parse($sdt)->format('M d, Y h:i A') : '—' }} {{ data_get($call, 'purpose') ?? '—' }} Pending
No scheduled calls.
@endsection @section('scripts') @endsection