@extends('layouts.app') @section('title', 'Mes Enchères') @section('content')
{{-- En-tête --}}

🏆 Mes Enchères

Gérez vos enchères et suivez vos offres

{{-- Statistiques rapides --}}

Enchères actives

{{ $activeBids ?? 0 }}

Gagnées

{{ $wonBids ?? 0 }}

En attente

{{ $pendingBids ?? 0 }}

Total économisé

{{ number_format($totalSaved ?? 0, 2) }} €

{{-- Liste des enchères --}}

Mes offres

@if(isset($bids) && $bids->count() > 0)
@foreach($bids as $bid)

{{ $bid->service->title ?? 'Service' }}

@php $statusClasses = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'accepted' => 'bg-green-100 text-green-800', 'rejected' => 'bg-red-100 text-red-800', 'expired' => 'bg-gray-100 text-gray-800', ]; $statusLabels = [ 'pending' => 'En attente', 'accepted' => 'Acceptée', 'rejected' => 'Refusée', 'expired' => 'Expirée', ]; @endphp {{ $statusLabels[$bid->status] ?? $bid->status }}

Prestataire: {{ $bid->service->prestataire->user->name ?? 'N/A' }}

📅 {{ $bid->created_at->format('d/m/Y H:i') }} 💰 Mon offre: {{ number_format($bid->amount, 2) }} € @if($bid->service->price) 📌 Prix initial: {{ number_format($bid->service->price, 2) }} € @endif
@if($bid->status === 'pending')
@csrf @method('DELETE')
@endif @if($bid->status === 'accepted') Réserver maintenant @endif
@endforeach
@if($bids->hasPages())
{{ $bids->links() }}
@endif @else

Aucune enchère

Vous n'avez pas encore placé d'enchère.

Découvrir les services
@endif
@endsection