Timetables


Add timetable

get_all_maintainer_emails(); $existing_emails_json = json_encode($existing_emails); ?>
text('name', 'Name', 'Name of the timetable that can be reserved.', true) ->number('block_size', 'Block length (minutes)', 'Duration of one reservable time block in minutes.', true, '', 1) ->email('maintainer_email', 'Maintainer Email', 'Email address to notify when a reservation requires confirmation.', false, '', 'maintainer_email_suggestions') ->submit('Add Timetable') ->render(); ?>
date('date', 'First Date', 'Od kterého datumu platí tato kapacita.', true, new DateTime()->format('Y-m-d')); $form->group('Availability Range', fn($g) => $g ->time('start_time', 'Start') ->time('end_time', 'End') ); $form->number('capacity', 'Capacity', 'How many reservations can overlap on the same time.', true, 1, 1); $form->number('min_lead_time_minutes', 'Minimum lead time (minutes)', 'How many minutes in advance must be the reservation created. This is useful if it takes some time to prepare the reservation.', true); $form->checkbox('requires_confirmation', 'Requires Confirmation?', 'If checked, all the reservations that overlap this capacity will require confirmation from maintainer. The maintainer will receive an email asking for the confirmation.', true); $form->custom('Is Repeating Event', function() { return '

If the capacity is available repeatingly. For example: repeat each monday every week.

'; }); $form->number('repeat_period_in_days', 'Repeat Period (days)', 'How many days between each repetition.', true); $form->custom('Apply to Days', function() { return '
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
'; }); $form->submit('Create Capacity', 'button-primary', 'submit'); ?>
output(); ?>
get($id); $gcal_service = new RsvGoogleCalendarService(); $gcal_connected = $gcal_service->is_google_connected(); $current_calendar_id = $timetable->google_calendar_id ?? null; $existing_emails = $timetable_service->get_all_maintainer_emails(); ?>

Settings

text('name', 'Name', 'Name of the timetable that can be reserved.', true, $timetable->name) ->number('block_size', 'Block length (minutes)', 'Duration of one reservable time block in minutes.', true, $timetable->block_size, 1) ->email('maintainer_email', 'Maintainer Email', 'Email address to notify when a reservation requires confirmation.', false, $timetable->maintainer_email ?? '', 'maintainer_email_suggestions') ->custom('Google Calendar', function() use ($gcal_connected) { if (!$gcal_connected) { return'

Not connected to Google Calendar. Connect in settings →

'; } else { return '

Sync reservations to this calendar.

'; } }) ->submit('Save Settings', 'button-primary', 'submit') ->output(); ?>

Capacity

Define capacities for timetable.

get($id); if ($timetable === null) { echo '

Timetable not found.

'; return; } ?>

name) ?>

← Back to Timetables
maintainer_email): ?>
Namename) ?>
Block sizeblock_size) ?> minutes
Maintainer emailmaintainer_email) ?>

Reservations