@extends('layouts.app') @section('title', 'Active Clients - ISP ERP System') @section('styles') @endsection @section('page-title', 'Active Clients Management') @section('content')

Active Clients Management

Manage active client information and details

@if(auth()->user()->role !== 'collector') Add New Active Client @endif Client Login @if(auth()->user()->role !== 'collector') @endif
{{ $metrics['totalClients'] }}
Total Clients
{{ $metrics['activeClients'] }}
Active Clients
{{ $metrics['suspendedClients'] }}
Suspended Clients
{{ $metrics['assignedServers'] }}
Assigned Servers
Filter & Search Clients
Clear
All Active Clients
@if(\App\Helpers\PermissionHelper::isSuperUser(auth()->id())) Showing all active clients (Super User) @else @php $userBranchId = auth()->user()->branch_id; $hasSubBranches = $userBranchId ? \App\Models\Branch::where('parent_branch_id', $userBranchId)->exists() : false; @endphp @if($hasSubBranches) Showing active clients from your main branch and all sub branches (ISP User) @else Showing active clients from your branch only (Sub Branch User) @endif @endif
@if(session('success')) @endif @if(session('error')) @endif @if($clientInfos->count() > 0)
@if(auth()->user()->role !== 'collector') @endif @foreach($clientInfos as $clientInfo) @if(auth()->user()->role !== 'collector') @endif @endforeach
ID Login ID Client Name Mobile Branch Mikrotik Server Package Monthly Bill Status Online Status MAC Address Created Expire Date Actions
#{{ $clientInfo->id }}
@if($clientInfo->client_login_id) {{ $clientInfo->client_login_id }} @else - @endif @if(!$clientInfo->client_login_id || !$clientInfo->client_login_password) @endif
{{ $clientInfo->full_name }}
@if($clientInfo->client) {{ $clientInfo->client->username }} @endif
{{ $clientInfo->mobile_number }} @if($clientInfo->branch && $clientInfo->branch->parent_branch_id) {{ $clientInfo->branch->name }} @else - @endif @if($clientInfo->client && $clientInfo->client->mikrotikServer)
{{ $clientInfo->client->mikrotikServer->name }} @if($clientInfo->client->mikrotikServer->ip_address) {{ $clientInfo->client->mikrotikServer->ip_address }} @endif
@else - @endif
@if($clientInfo->client && $clientInfo->client->package_name) {{ $clientInfo->client->package_name }} @else - @endif @if($clientInfo->monthly_bill_amount) ৳{{ number_format($clientInfo->monthly_bill_amount, 2) }} @else - @endif @if($clientInfo->client) @if($clientInfo->client->status === 'active') Active @elseif($clientInfo->client->status === 'suspended') Suspended @elseif($clientInfo->client->status === 'inactive') Inactive @elseif($clientInfo->client->status === 'expired') Expired @else {{ ucfirst($clientInfo->client->status) }} @endif @else No Client Data @endif @if($clientInfo->client) @if($clientInfo->client->is_online) Online @else Offline @endif @else Unknown @endif @if($clientInfo->client) {{ $clientInfo->client->mac_address_display ?? ($clientInfo->client->mac_address ?? 'N/A') }} @else N/A @endif {{ $clientInfo->created_at->format('M d, Y') }} @if($clientInfo->expire_date) {{ \Carbon\Carbon::parse($clientInfo->expire_date)->format('M d, Y') }} @else N/A @endif
@if(auth()->user()->role !== 'collector') @if($clientInfo->client && $clientInfo->client->status === 'active') @else @endif @else View Only @endif
@else
No Active Clients Found

There are no active clients to display at the moment.

@if(auth()->user()->role !== 'collector') Add First Active Client @endif
@endif
@endsection @section('scripts') @endsection