@extends('layouts.client') @section('title', 'Mes Appels d\'Offres') @section('content')
{{-- Header --}}

Mes Appels d'Offres

Gérez vos demandes et propositions

Nouvel appel d'offre
{{-- Statistiques --}}
{{ $stats['total'] }}
Total
{{ $stats['published'] }}
Publiés
{{ $stats['in_progress'] }}
En cours
{{ $stats['completed'] }}
Terminés
{{-- Filtres de recherche --}}
{{-- Barre de recherche --}}
{{-- Filtres en ligne --}}
{{-- Filtre par statut --}} {{-- Filtre par urgence --}} {{-- Bouton rechercher --}} {{-- Bouton reset --}} @if(request()->hasAny(['search', 'status', 'urgency'])) Réinitialiser @endif
{{-- Résultats de recherche --}} @if(request()->hasAny(['search', 'status', 'urgency']) && (request('status') !== 'all' || request('urgency') !== 'all' || request('search')))
{{ $tenders->total() }} résultat{{ $tenders->total() > 1 ? 's' : '' }} trouvé{{ $tenders->total() > 1 ? 's' : '' }} @if(request('search')) pour "{{ request('search') }}" @endif
@endif {{-- Liste des appels d'offres --}} @if($tenders->count() > 0)
@foreach($tenders as $tender)
{{-- Header avec statut --}}
@php $statusColors = [ 'draft' => 'background: #f1f5f9; color: #64748b;', 'published' => 'background: #dcfce7; color: #16a34a;', 'in_progress' => 'background: #fef3c7; color: #d97706;', 'completed' => 'background: #e0e7ff; color: #7c3aed;', 'cancelled' => 'background: #fee2e2; color: #dc2626;', 'expired' => 'background: #f1f5f9; color: #64748b;', ]; $statusStyle = $statusColors[$tender->status] ?? 'background: #f1f5f9; color: #64748b;'; @endphp {{ $tender->status_label }} @if($tender->urgency === 'urgent') Urgent @elseif($tender->urgency === 'high') Prioritaire @endif
{{ $tender->created_at->diffForHumans() }}
{{-- Titre --}}

{{ $tender->title }}

{{-- Description --}}

{{ Str::limit($tender->description, 120) }}

{{-- Méta infos --}}
{{ $tender->city }}
{{ $tender->start_date ? $tender->start_date->format('d/m/Y') : 'Non définie' }}
{{ $tender->budget_display }}
{{-- Catégories --}} @if($tender->categories->count() > 0)
@foreach($tender->categories->take(3) as $category) {{ $category->name }} @endforeach @if($tender->categories->count() > 3) +{{ $tender->categories->count() - 3 }} @endif
@endif {{-- Footer avec propositions --}}
{{ $tender->responses->count() }} proposition{{ $tender->responses->count() > 1 ? 's' : '' }}
@if($tender->responses->where('status', 'shortlisted')->count() > 0)
{{ $tender->responses->where('status', 'shortlisted')->count() }} présélection{{ $tender->responses->where('status', 'shortlisted')->count() > 1 ? 's' : '' }}
@endif
{{-- Actions --}}
@if($tender->status === 'draft') Continuer @else Voir détails @endif {{-- Bouton Annuler - seulement pour published ou in_progress --}} @if(in_array($tender->status, ['published', 'in_progress', 'draft'])) @endif {{-- Bouton Supprimer --}}
{{-- Badge expiré --}} @if($tender->is_expired)
Expiré
@endif
@endforeach
{{-- Pagination --}} @if($tenders->hasPages())
@if($tenders->onFirstPage()) @else @endif {{ $tenders->currentPage() }} / {{ $tenders->lastPage() }} @if($tenders->hasMorePages()) @else @endif
@endif @else {{-- État vide --}}

Aucun appel d'offre

Créez votre premier appel d'offre pour recevoir des propositions de prestataires qualifiés

Créer un appel d'offre
@endif
{{-- Modal de confirmation d'annulation --}} {{-- Modal de confirmation de suppression --}} @endsection