@extends('layouts.admin-modern') @section('content')

Profil du client

{{ substr($client->user->name, 0, 1) }}

{{ $client->user->name }}

{{ $client->user->email }}

@if($client->user->blocked_at) Bloqué depuis le {{ $client->user->blocked_at->format('d/m/Y à H:i') }} @else Actif @endif
@if(auth()->id() != $client->user_id)
@csrf @method('PATCH')
@csrf @method('DELETE')
@endif
Date d'inscription

{{ $client->created_at->format('d/m/Y à H:i') }}

Dernière mise à jour

{{ $client->updated_at->format('d/m/Y à H:i') }}

Statistiques
{{ $client->bookings->count() }}

Réservations

{{ $client->reviews->count() }}

Avis publiés

{{ $client->follows->count() }}

Prestataires suivis

Dernières réservations

@if($client->bookings->count() > 0)
@foreach($client->bookings->sortByDesc('created_at')->take(5) as $booking)
{{ $booking->service->title }} {{ $booking->created_at->format('d/m/Y') }}
{{ $booking->status == 'pending' ? 'En attente' : ($booking->status == 'completed' ? 'Terminée' : 'En cours') }}
@endforeach
@else

Aucune réservation

@endif

Derniers avis

@if($client->reviews->count() > 0)
@foreach($client->reviews->sortByDesc('created_at')->take(5) as $review)
@for($i = 1; $i <= 5; $i++) @endfor
{{ $review->created_at->format('d/m/Y') }} {{ Str::limit($review->comment, 100) }}
@endforeach
@else

Aucun avis publié

@endif

Prestataires suivis

@if($client->follows->count() > 0)
@foreach($client->follows as $prestataire)
{{ $prestataire->user->name }} {{ $prestataire->sector }}
@endforeach
@else

Aucun prestataire suivi

@endif
@endsection