@extends('layouts.app') @section('title', 'Weekly Rota') @section('content')

Weekly Rota — {{ $weekStart->format('d M Y') }} to {{ $weekStart->copy()->endOfWeek()->format('d M Y') }}

← Prev Week Next Week → Shift Templates @if ($hasDraft)
@csrf
@endif
@if ($hasDraft)
This week has unpublished draft shifts — staff won't see them until you hit Publish.
@endif
@foreach ($days as $day) @endforeach @foreach ($staff as $person) @foreach ($days as $day) @php $key = $person->id . '-' . $day->toDateString(); $existing = $schedules->get($key)?->first(); @endphp @endforeach @endforeach
Staff{{ $day->format('D d M') }}
{{ $person->name }}
@csrf @if ($existing && ! $existing->is_published) Draft @endif
@endsection