@extends('layouts.app') @php // Helper pour générer les URLs des fichiers storage $storageUrl = function($path) { if (!$path) return asset('/images/placeholder.png'); $cleanPath = str_replace(['\\', '//'], '/', trim($path, '/\\')); return request()->getSchemeAndHttpHost() . '/storage.php?file=' . urlencode($cleanPath); }; @endphp @push('styles') @endpush @section('title', $urgentSale->title . ' - Vente urgente - TaPrestation') @section('content')
@if(session('success')) @endif @if(session('error')) @endif

{{ $urgentSale->title }}

{{ number_format($urgentSale->price, 2) }}€
@if($urgentSale->photos && count($urgentSale->photos ?? []) > 0)
{{ $urgentSale->title }} @if(count($urgentSale->photos ?? []) > 1) @endif @if(count($urgentSale->photos ?? []) > 1) @endif @if(count($urgentSale->photos ?? []) > 1)
1 / {{ count($urgentSale->photos ?? []) }}
@endif
État: {{ $urgentSale->condition_label }}
@else

Aucune photo disponible

@endif

Description de l'article

{!! nl2br(e($urgentSale->description)) !!}
@if($urgentSale->reason)
Raison de la vente urgente

{{ $urgentSale->reason }}

@endif

Vendeur

@if($urgentSale->prestataire->photo) {{ $urgentSale->prestataire->user->name }} @elseif($urgentSale->prestataire->user->avatar) {{ $urgentSale->prestataire->user->name }} @else
@endif
{{ $urgentSale->prestataire->user->name }} @if($urgentSale->prestataire->company_name) {{ $urgentSale->prestataire->company_name }} @endif
@php $averageRating = $urgentSale->prestataire->reviews()->avg('rating') ?? 0; $reviewCount = $urgentSale->prestataire->reviews()->count(); @endphp @if($reviewCount > 0)
@for($i = 1; $i <= 5; $i++) @endfor
{{ number_format($averageRating, 1) }} ({{ $reviewCount }})
@else
Aucun avis
@endif
Voir le profil
@if ($urgentSale->latitude && $urgentSale->longitude)

Carte

@endif

Détails

Quantité disponible
{{ $urgentSale->quantity }}
@auth @if(auth()->user()->id !== $urgentSale->prestataire->user_id)
@if(function_exists('feature_enabled') && feature_enabled('cart_enabled') && ($urgentSale->payment_requirement ?? 'none') === 'full') @if(method_exists(auth()->user(), 'hasRole') && auth()->user()->hasRole('client') && \Illuminate\Support\Facades\Route::has('client.cart.add.urgent-sale'))
@csrf
@endif @elseif(($urgentSale->payment_requirement ?? 'none') !== 'full')
Paiement hors plateforme - Contactez le vendeur
@endif
@else
Votre annonce
@endif @else Se connecter @endauth
@if($similarSales && $similarSales->count() > 0) @endif
@auth @if(auth()->user()->id !== $urgentSale->prestataire->user_id) @endif @endauth @push('scripts') @if ($urgentSale->latitude && $urgentSale->longitude) @endif @endpush @endsection @push('scripts') @endpush @push('styles') @endpush