@extends('layouts.app') @section('title', 'PPPoE MAC Reseller Dashboard - ISP ERP System') @section('page-title', 'PPPoE MAC Reseller Dashboard') @push('styles') @endpush @section('content')
@if(session('success')) @endif @if(session('error')) @endif @if(session('warning')) @endif @if(session('info')) @endif

PPPoE MAC Reseller Management

Manage reseller accounts and their access
{{ $totalResellers }}
Total Resellers
{{ $activeResellers }}
Active Resellers
{{ $inactiveResellers }}
Inactive Resellers
{{ $newResellersMonthly }}
New MAC Resellers This Month
{{ \App\Models\ClientInfo::whereNotNull('mac_reseller_id')->count() }}
Total PPPoE Clients
{{ \App\Models\ClientInfo::whereNotNull('mac_reseller_id')->whereHas('client', function($q) { $q->where('status', 'active'); })->count() }}
Active Clients
{{ \App\Models\ClientInfo::whereNotNull('mac_reseller_id')->whereHas('client', function($q) { $q->where('status', 'inactive'); })->count() }}
Inactive Clients
{{ \App\Models\ClientInfo::whereNotNull('mac_reseller_id')->whereHas('client', function($q) { $q->where('is_online', true); })->count() }}
Online Clients
Search PPPoE MAC Resellers
@if(request('search')) Clear @endif
PPPoE MAC Resellers List
All reseller accounts in the system
{{ $resellers->total() }} Total
@forelse($resellers as $index => $reseller) @empty @endforelse
# User Company Email Password Phone Assign Role Status Last Login Created Actions
{{ $resellers->firstItem() + $index }}
{{ $reseller->name }}
ID: {{ $reseller->id }}
{{ $reseller->company_name ?? '-' }}
{{ $reseller->email }} Hidden @if($reseller->phone) {{ $reseller->phone }} @else - @endif @php $assignedBranches = $reseller->assignedBranches ?? collect(); $assignedServers = $reseller->assignedServers ?? collect(); @endphp @if($assignedBranches->count() > 0 || $assignedServers->count() > 0)
@if($assignedBranches->count() > 0)
@foreach($assignedBranches->take(2) as $branch) {{ $branch->name }} @endforeach @if($assignedBranches->count() > 2) +{{ $assignedBranches->count() - 2 }} more @endif
@endif @if($assignedServers->count() > 0)
@foreach($assignedServers->take(2) as $server) {{ $server->name }} @endforeach @if($assignedServers->count() > 2) +{{ $assignedServers->count() - 2 }} more @endif
@endif
@else No assignments @endif
{{ ucfirst($reseller->role) }} @php $statusClass = match($reseller->status) { 'active' => 'success', 'inactive' => 'secondary', 'suspended' => 'warning', 'expired' => 'danger', default => 'secondary' }; @endphp {{ ucfirst($reseller->status) }} @if($reseller->last_login)
{{ \Carbon\Carbon::parse($reseller->last_login)->format('M d, Y') }}
{{ \Carbon\Carbon::parse($reseller->last_login)->format('h:i A') }}
@else Never @endif
{{ \Carbon\Carbon::parse($reseller->created_at)->format('M d, Y') }}
{{ \Carbon\Carbon::parse($reseller->created_at)->format('h:i A') }}
@csrf @method('DELETE')
No Resellers Found

No reseller accounts match your search criteria.

Add First Reseller
@if($resellers->hasPages())
Showing {{ $resellers->firstItem() }} to {{ $resellers->lastItem() }} of {{ $resellers->total() }} results
{{ $resellers->links() }}
@endif
@endsection @push('scripts') @endpush