@extends('layouts.public-layout') @section('title', $event->title . ' - Événements - MMPV') @section('content')
@php // Utiliser la méthode getAutoStatus() qui tient compte des heures $status = $event->getAutoStatus(); $eventDate = \Carbon\Carbon::parse($event->event_date); $endDate = $event->end_date ? \Carbon\Carbon::parse($event->end_date) : null; // Définir les couleurs et textes selon le statut if ($status === 'ongoing') { $statusColor = 'green'; $statusIcon = 'play-circle'; $statusText = 'En cours'; } elseif ($status === 'upcoming') { $statusColor = 'blue'; $statusIcon = 'clock'; $statusText = 'À venir'; } else { $statusColor = 'gray'; $statusIcon = 'check-circle'; $statusText = 'Terminé'; } @endphp
{{ $statusText }}

{{ $event->title }}

{{ $eventDate->translatedFormat('l j F Y') }}
@if($event->event_time)
{{ \Carbon\Carbon::parse($event->event_time)->format('H:i') }} @if($event->end_time) - {{ \Carbon\Carbon::parse($event->end_time)->format('H:i') }} @endif
@endif @if($event->is_recurring)
{{ $event->getRecurrenceDescription() }}
@endif @if($endDate && !$eventDate->isSameDay($endDate))
{{ $endDate->translatedFormat('l j F Y') }}
@endif
@if($status === 'upcoming')
Dans {{ $eventDate->diffForHumans() }}
@elseif($status === 'ongoing')
Événement en cours
@endif
@if($event->description)

À propos de l'événement

{{ $event->description }}
@endif

Informations pratiques

Date

{{ $eventDate->translatedFormat('l j F Y') }}

@if($endDate && !$eventDate->isSameDay($endDate))

{{ $endDate->translatedFormat('j F Y') }}

@endif
@if($event->event_time)

Heure

{{ \Carbon\Carbon::parse($event->event_time)->format('H:i') }} @if($event->end_time) - {{ \Carbon\Carbon::parse($event->end_time)->format('H:i') }} @endif

@endif @if($event->is_recurring)

{{ $event->getRecurrenceDescription() }}

@endif @if($event->location)

Lieu

{{ $event->location }}

@endif

Statut

{{ $statusText }}

Organisé par

{{ $event->church->name }}

{{ $event->church->city }}, {{ $event->church->country }}
@if($event->church->phone) @endif @if($event->church->email) @endif @if($event->church->pastor)
Responsable {{ $event->church->pastor }}
@endif
@if($event->church->events->where('status', 'upcoming')->where('id', '!=', $event->id)->count() > 0)

Autres événements

@foreach($event->church->events->where('status', 'upcoming')->where('id', '!=', $event->id)->take(3) as $otherEvent) @php $otherEventDate = \Carbon\Carbon::parse($otherEvent->event_date); @endphp

{{ $otherEvent->title }}

{{ $otherEventDate->translatedFormat('d M Y') }}

@endforeach
@endif

Ne manquez aucun événement

Contactez votre église locale pour recevoir les notifications sur les prochains événements

@endsection