@extends('layouts.app', ['title' => $calendar->exists ? 'Edit calendar' : 'New calendar']) @section('content')

{{ $calendar->exists ? $calendar->name : 'New booking calendar' }}

@if ($errors->any())
Please fix the highlighted fields.
@endif
@csrf @if ($calendar->exists) @method('PUT') @endif
Details
Google Meet and Zoom links are created automatically when those apps are connected under Integrations.
Weekly hours
@php($hours = old('hours') ? null : ($calendar->availability ?? [])) @foreach (\App\Models\Calendar::DAYS as $d => $dayName) @php($ranges = $hours !== null ? array_map(fn ($r) => ['from' => $r[0], 'to' => $r[1]], $hours[(string) $d] ?? []) : (old("hours.$d") ?? []))
{{ $dayName }}
@for ($r = 0; $r < 2; $r++)
to
@endfor
@endforeach
Leave a day empty to close it. The second column is for a split day, e.g. 10:00–13:00 and 15:00–19:00.
Date overrides
@php($overrides = collect(old('overrides', collect($calendar->overrides ?? [])->map(fn ($w, $date) => ['date' => $date, 'closed' => empty($w), 'from' => $w[0][0] ?? '', 'to' => $w[0][1] ?? ''])->values()->all()))) @foreach ($overrides as $i => $o)
to
@endforeach

Holidays or special hours for a single date.

Questions for the guest

Name, email and phone are always asked.

@foreach (old('questions', $calendar->questions ?? []) as $i => $q)
@endforeach
Timing
Guests see times in their own time zone.
Team (round robin)
@php($selected = collect(old('users', $calendar->users?->pluck('id')->all() ?? []))->map(fn ($v) => (int) $v)) @foreach ($members as $m)
contains($m->id))>
@endforeach
A slot is offered when at least one of them is free. Bookings rotate between them, and nobody is booked twice at once across calendars.
@endsection @push('scripts') @endpush