@extends('layouts.client') @php $storageUrl = function($path) { return storage_asset_url($path, 'images/placeholder.svg'); }; @endphp @section('title', $tender->title) @push('styles') @endpush @section('content')
{{-- Breadcrumb --}} {{-- En-tête --}}
{{ $tender->status_label }} @if($tender->urgency !== 'normal') @if($tender->urgency === 'urgent') Urgent @elseif($tender->urgency === 'high') Prioritaire @else Pas pressé @endif @endif
@if(in_array($tender->status, ['published', 'in_progress']))
@endif

{{ $tender->title }}

{{ $tender->city }}
{{ $tender->start_date ? $tender->start_date->format('d/m/Y') : 'Date flexible' }}
{{ $tender->budget_display }}
Expire {{ $tender->expires_at ? $tender->expires_at->diffForHumans() : 'jamais' }}
@foreach($tender->categories as $category) {{ $category->name }} @endforeach
{{-- Colonne principale --}}
{{-- Description --}}

Description

{!! nl2br(e($tender->description)) !!}
{{-- Médias --}} @php $photos = $tender->photos; if (is_string($photos)) { $photos = json_decode($photos, true) ?? []; } $photos = $photos ?? []; $videos = $tender->videos; if (is_string($videos)) { $videos = json_decode($videos, true) ?? []; } $videos = $videos ?? []; @endphp @if(count($photos) > 0 || count($videos) > 0 || count($tender->documents ?? []) > 0)

Médias et documents

@if(count($photos) > 0) @endif @if(count($videos) > 0) @endif @if(count($tender->documents ?? []) > 0)
@foreach($tender->documents as $doc) {{ basename($doc) }} @endforeach
@endif
@endif {{-- Propositions reçues --}}

Propositions reçues {{ $tender->responses->count() }}

@if($tender->responses->count() > 0)
@foreach($tender->responses->sortByDesc('match_score') as $response)
@if($response->prestataire->user->avatar) {{ $response->prestataire->user->name ?? 'Prestataire' }} @else @endif

{{ $response->prestataire->user->name }}

@if($response->prestataire->is_verified) Vérifié @endif @if($response->prestataire->average_rating > 0) {{ number_format($response->prestataire->average_rating, 1) }} @endif
{{ $response->match_score }}% Match
{{ number_format($response->proposed_price, 2) }} € @switch($response->price_type) @case('fixed') Prix fixe @break @case('hourly') /heure @break @case('daily') /jour @break @default Négociable @break @endswitch

{{ Str::limit($response->message, 200) }}

@if(strlen($response->message) > 200) @endif
Disponible à partir du {{ $response->availability_start ? $response->availability_start->format('d/m/Y') : 'Non spécifié' }} @if($response->estimated_duration) • Durée estimée : {{ $response->estimated_duration }} @endif
@if($response->status === 'pending')
Nouveau
@endif
@endforeach
@else

Aucune proposition pour le moment

Les prestataires correspondant à votre demande seront notifiés et pourront vous soumettre des propositions.

@endif
{{-- Sidebar --}}
{{-- Prestataire attribué --}} @if($tender->awardedPrestataire) @endif {{-- Statistiques --}} {{-- Informations --}}
{{-- Modal Annulation --}} {{-- Modal Refus --}}
@endsection @section('scripts') @endsection