@extends('layouts.dashboard') @section('title', 'Client Management') @section('content')
Manage your company clients and their information
Total Clients
{{ $clients->total() }}
Active Clients
{{ \App\Models\Client::where('status', 'active')->count() }}
With GPS Data
{{ \App\Models\Client::whereNotNull('latitude')->whereNotNull('longitude')->count() }}
Total Visits
{{ \App\Models\Visit::count() }}
|
CLIENT
|
LOCATION
|
CONTACT
|
VISITS
|
STATUS
|
ACTIONS
|
|---|---|---|---|---|---|
|
{{ $client->name }}
{{ $client->contact_person ?? 'No contact person' }}
{{ $client->email ?? 'No email' }}
|
{{ $client->area }}, {{ $client->city->name }}
{{ $client->governorate->name }}
@if($client->latitude && $client->longitude)
GPS Enabled
@endif
|
{{ $client->phone }}
{{ $client->address ?? 'No address' }}
|
{{ $client->visits->count() }} visits
Last: {{ $client->visits->first() ? $client->visits->first()->created_at->diffForHumans() : 'No visits' }}
|
{{ ucfirst($client->status) }} |