@extends('admin.layout') @section('title', 'Planning des plannings') @section('content')

Planning mensuel

{{-- ACTIONS --}} @canany(['plannings.createChantier', 'plannings.createIntervention'])
@can('plannings.createChantier') Ajouter un chantier @endcan @can('plannings.createIntervention') Ajouter une intervention @endcan
@endcanany {{-- MESSAGES --}} @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- NAV SEMAINES --}}
@php $query = request()->query(); @endphp ⬅️ Mois précédent {{ $monthLabel }} Mois suivant ➡️
{{-- PLANNING --}}
Filtrer par type : @php // valeurs envoyées à l’API (slugs ASCII) $allTypes = [ 'pose' => 'Pose', 'maconnerie' => 'Maçonnerie', 'intervention' => 'Intervention', 'absence' => 'Absence', ]; $currentTypes = request()->input('types', array_keys($allTypes)); // ✅ si user sélectionné → tout coché if (request('user_id')) { $currentTypes = array_keys($allTypes); } @endphp @foreach ($allTypes as $value => $label) @endforeach
Filtrer par utilisateur : Réinitialiser
{{-- COLONNE JOURS --}}
Jour
@foreach ($jours as $jour)
{{ $jour['label'] }} {{ $jour['carbon']->format('d/m') }}
@endforeach
{{-- COLONNES EQUIPES --}} @foreach ($planning as $equipe)
{{-- HEADER --}}
{{ $equipe['nom'] }}
{{-- GRID --}}
{{-- FOND --}} @for ($i = 1; $i <= count($jours) * 2; $i++)
@endfor {{-- CHANTIERS --}} @foreach ($equipe['plannings'] as $planning) @include('admin.plannings._card', [ 'cell' => $planning, ]) @endforeach
@endforeach
{{-- MODAL --}}
{{-- CSRF --}} {{-- JS --}} @can('plannings.move') @endcan {{-- CSS --}} @endsection