@extends('layouts.admin') @section('title', 'Appointments') @section('lede', 'The public scan page books these hours. Letters go out through the SMTP account in Global settings.') @section('content') @php $tab = $tab ?? 'calendar'; $days = array_map('intval', explode(',', (string) ($values['booking_days'] ?? '1,2,3,4,5'))); $zones = array_values(array_unique(array_merge(['Asia/Karachi', 'UTC'], timezone_identifiers_list(\DateTimeZone::ASIA)))); sort($zones); $letters = app(\App\Services\BookingMail::class); @endphp
@foreach(['calendar' => 'Calendar', 'hours' => 'Hours', 'mail' => 'Letters'] as $key => $label) {{ $label }} @endforeach
@if($tab === 'calendar') @if($newCount)

{{ $newCount }} new {{ $newCount === 1 ? 'booking needs' : 'bookings need' }} a reply. The same notice is emailed when SMTP is set.

@endif @unless($smtpReady)

SMTP is not set. Bookings still land here, but nobody receives an email until the host and from address are saved under Global settings.

@endunless

{{ $board['label'] }}

@foreach($board['cells'] as $cell) @if(!$cell) @else {{ $cell['day'] }} @if($cell['count']){{ $cell['count'] }}@endif @endif @endforeach

Times in {{ $board['timezone'] }}. A number is a held booking. Cancel a booking to free the time.

{{ $day ? \Illuminate\Support\Carbon::parse($day)->format('l j F') : 'This month' }}

    @forelse($shown as $lead)
  1. {{ $lead->school }}

    {{ $lead->name }} · {{ $lead->role }} · {{ $lead->phone }} · {{ $lead->email }}

    {{ $lead->pain }}@if($lead->message) — {{ $lead->message }}@endif

    Google Calendar
    @csrf @method('PUT')
  2. @empty
  3. No bookings on this view.
  4. @endforelse
@elseif($tab === 'hours')
@csrf

Open hours

These are the only times an owner can choose on Book a Scan.

@if($errors->any())

{{ $errors->first() }}

@endif

Days

@foreach([1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat', 7 => 'Sun'] as $num => $name) @endforeach
@else
@csrf

Letters

The owner letter must keep [[google_url]]. That is the Add to Google Calendar button. Placeholders: [[name]] [[school]] [[date]] [[time]] [[end]] [[timezone]] [[phone]] [[email]] [[role]] [[city]] [[pain]] [[offer]] [[message]] [[google_url]] [[admin_url]]

@if($errors->any())

{{ $errors->first() }}

@endif

@csrf
@endif @endsection