@extends('layouts.app') @section('title', 'Dashboard - EKINPAY') @section('page-title', 'Dashboard Overview') @section('content')
@if($subscriptionData)
Subscription Expiring Soon!

Your subscription will expire in {{ $subscriptionData['days'] }} days, {{ $subscriptionData['hours'] }} hours, {{ $subscriptionData['minutes'] }} minutes

Expiry Date: {{ $subscriptionData['expiry_date'] }}

@endif
{{--
Welcome back {{ auth()->user()->name }}!

{{ $currencySymbol }}{{ number_format($stats['todayRevenue'] ?? 0) }}

Today's Sales

{{ $stats['incomePercentageChange'] ?? 0 }}%

Performance

--}} {{-- --}}
Client Statistics
Updated: {{ now()->format('H:i:s') }}
{{ $stats['totalCustomers'] ?? 0 }}
Total Users
{{ $stats['activeCustomers'] ?? 0 }}
Active Users
{{ $stats['expiredCustomers'] ?? 0 }}
Expired Users
{{ $stats['onlineCustomers'] ?? 0 }}
Total Online
{{ $stats['onlinePPPoE'] ?? 0 }}
Online PPPoE
{{ $stats['onlineHotspot'] ?? 0 }}
Online Hotspot
{{ $stats['onlineDHCP'] ?? 0 }}
Online DHCP
{{ $stats['onlineStatic'] ?? 0 }}
Online Static
Site Statistics
{{ $stats['totalSites'] ?? 0 }}
Total
0
Inactive
{{ $stats['onlineSites'] ?? 0 }}
Online
{{ $stats['offlineSites'] ?? 0 }}
Offline
Daily Entries

{{ $stats['todayEntries'] ?? 0 }} Entries

@php $entriesChange = $stats['percentageChangeEntries'] ?? 0; @endphp @if ($entriesChange <= 0) {{ $entriesChange }}% @else +{{ $entriesChange }}% @endif
Daily Income

Last 7 days

Monthly Earnings

{{ $currencySymbol }}{{ number_format($stats['thisMonthIncome'] ?? 0) }}

@php $monthlyChange = $stats['monthlyPercentageChange'] ?? 0; @endphp @if ($monthlyChange <= 0) {{ $monthlyChange }}% @else +{{ $monthlyChange }}% @endif
Yearly Report

{{ $currencySymbol }}{{ number_format(array_sum($monthlyRevenue ?? [])) }}

Recent Transactions

Latest Payment Activities

@forelse(($recentTransactions ?? [])->take(4) as $index => $transaction) @php $colors = ['red', 'blue', 'green', 'yellow', 'purple']; $color = $colors[$index % count($colors)]; @endphp
{{ $transaction->mpesa_code ?? 'MP' . rand(100000, 999999) }}
{{ $transaction->description ?? 'PPPoE Service' }}
{{ $currencySymbol }}{{ number_format($transaction->amount, 0) }}
{{ $transaction->created_at->format('M d Y H:i:s') }}
@empty
No recent transactions
@endforelse
Package Subscriptions

Revenue by Package Type

@forelse($packageStats ?? [] as $package) @empty @endforelse
Package Service Type Subscription Revenue
{{ $package['package_name'] ?? 'N/A' }}
{{ $package['service_type'] ?? 'N/A' }}
{{ $package['total'] ?? 0 }}
{{ $currencySymbol }}{{ number_format($package['revenue'] ?? 0) }}
No package data available
Top Data Users

Highest Bandwidth Usage

@forelse($topDataUsers ?? [] as $user) @empty @endforelse
Account Usage
{{ $user->account }}
{{ number_format($user->download_gb) }} GB/{{ number_format($user->upload_gb) }} GB
No usage data available
@push('scripts') @endpush @endsection