@extends('master.app') @section('title', 'Customers') @section('pageCSS') @endsection @section('body')
{{-- Header --}}

Customers

Manage customers, search & filter quickly
@can('customer_reporting') Report @endcan Reset Add Customer
{{-- Alerts --}} @if (session('msg'))
{{ session('msg') }}
@endif {{-- KPI Cards --}}
Total Customers
{{ $stats['total'] ?? 0 }}
Active
{{ $stats['active'] ?? 0 }}
Type C
{{ $stats['c'] ?? 0 }}
Type S
{{ $stats['s'] ?? 0 }}
{{-- Filter Bar --}}
Clear
{{-- Table --}}
@forelse($customers as $row) @empty @endforelse
# Name Phone Address Province Type Status Actions
{{ $loop->iteration + ($customers->currentPage() - 1) * $customers->perPage() }} {{ $row->name ?? '—' }} @if ($row->email)
{{ $row->email }}
@endif
{{ $row->phone ?? '—' }} {{ $row->address ?? '—' }} {{ $row->province->title_ps ?? ($row->province->title_ps ?? '—') }} @if ($row->type_id == 1) C @else S @endif @if ($row->status == 1) Active @else Inactive @endif
No customers found.
{{-- Pagination --}}
{{ $customers->links('pagination::bootstrap-4') }}
@endsection @section('pageJs') @endsection