Salut, {{ Auth::user()->name }}

Session {{ Auth::user()->role }} active

@if(Auth::user()->hasPermission('edit_team')) Nouveau Membre @endif @if(Auth::user()->hasPermission('add_events')) + Ajouter Date @endif
@if(Auth::user()->role !== 'technicien')

Agenda Global

{{ \App\Models\Event::count() }}

Staff IbizaNight

{{ \App\Models\User::count() }}

Notes Collaboratives

{{ \App\Models\Note::count() }}

Prochain Show

{{ \App\Models\Event::where('date_debut', '>=', now())->orderBy('date_debut')->first()?->titre ?? 'Aucun show prévu' }}

@endif
@if(Auth::user()->role === 'technicien')

Mes Missions Assignées

@forelse(Auth::user()->events()->where('date_debut', '>=', now())->orderBy('date_debut')->get() as $event)
{{ $event->date_debut->format('d/m/Y - H:i') }} Action requise

{{ $event->titre }}

{{ $event->lieu }}

Briefing Logistique :

{{ $event->description ?? 'Pas d\'instructions spécifiques.' }}

@empty

Aucune mission ne vous est assignée pour le moment.

@endforelse
@else

Agenda des Prestations

Voir tout l'historique →
@foreach(\App\Models\Event::with('technicians')->where('date_debut', '>=', now())->orderBy('date_debut')->take(6)->get() as $event)
{{ $event->date_debut->format('d') }} {{ $event->date_debut->format('M') }}
{{ $event->titre }}
{{ $event->lieu }} @if($event->technicians->count() > 0)
@foreach($event->technicians as $tech) {{ explode(' ', $tech->name)[0] }} @endforeach
@endif
{{ $event->statut }}
@endforeach
@endif

Bloc-Note

@if(Auth::user()->hasPermission('add_notes'))
@csrf
@endif
@foreach(\App\Models\Note::with('user')->orderBy('created_at', 'desc')->get() as $note)
{{ $note->user->name }} • {{ $note->created_at->diffForHumans() }} @if(Auth::user()->role === 'admin' || Auth::id() === $note->user_id)
@csrf @method('DELETE')
@endif

{{ $note->content }}

@endforeach
@if(Auth::user()->role !== 'technicien')

Membres Actifs

@if(Auth::user()->hasPermission('edit_team')) Gérer @endif
@foreach(\App\Models\User::orderBy('role')->take(5)->get() as $user)
{{ substr($user->name, 0, 1) }}

{{ $user->name }}

{{ $user->role }}

@endforeach
@endif