@extends('layouts.app') @section('title', 'Inactive & Deleted Clients') @section('page-title', 'Inactive, Suspended & Deleted Clients') @section('styles') @endsection @section('content')
Inactive, Suspended & Deleted Clients
{{ $stats['total_inactive'] }}
Total Clients
{{ $stats['by_branch']->sum() }}
By Branch
{{ $stats['by_client_type']->sum() }}
By Type
{{ $stats['by_billing_status']->sum() }}
By Billing
Filter & Search Clients
@forelse($inactiveClients as $client) @empty @endforelse
ID Full Name Mobile Email Branch Client Type Billing Status Username/IP Package Monthly Bill Joining Date Expire Date MikroTik Status Actions
{{ $client->id }} {{ $client->full_name }} @if($client->is_vip_client) VIP @endif {{ $client->mobile_number }} {{ $client->email_address ?: 'N/A' }} @if($client->branch) {{ $client->branch->name }} @else N/A @endif @if($client->client_type) {{ $client->client_type }} @else N/A @endif @if($client->billing_status) {{ $client->billing_status }} @else N/A @endif {{ $client->username_ip ?: 'N/A' }} {{ $client->package ?: 'N/A' }} @if($client->monthly_bill) BDT{{ number_format($client->monthly_bill, 2) }} @else N/A @endif @if($client->joining_date) {{ $client->joining_date->format('d/m/Y') }} @else N/A @endif @if($client->expire_date) {{ $client->expire_date->format('d/m/Y') }} @else N/A @endif @php $mikrotikStatus = $client->mikrotik_status ?? 'Deleted'; @endphp @if($mikrotikStatus === 'Enable') Enable @elseif($mikrotikStatus === 'Disable') Disable @elseif($mikrotikStatus === 'Deleted') Deleted @if($client->deleted_from_mikrotik_at) {{ $client->deleted_from_mikrotik_at->format('d/m/Y H:i') }} @endif @else {{ $mikrotikStatus }} @endif
@csrf
@php // Check if client exists in Mikrotik based on database field $clientInMikrotik = !empty($client->username_ip) && !$client->is_deleted_from_mikrotik; @endphp {{-- Always show delete icon if client is in Mikrotik --}} @if($clientInMikrotik)
@csrf @method('DELETE')
@endif {{-- Always show restore icon if client is not in Mikrotik --}} @if(!$clientInMikrotik)
@csrf
@endif
No inactive clients found

There are no inactive clients matching your criteria.

@if($inactiveClients->hasPages())
Showing {{ $inactiveClients->firstItem() }} to {{ $inactiveClients->lastItem() }} of {{ $inactiveClients->total() }} results
{{ $inactiveClients->appends(request()->query())->links() }}
@endif
@endsection