Time Off Form
What this screen is for
In the panel, the form used to create a new time-off entry for a staff member or edit an existing one: the date, whether it is a full day or specific time ranges, and an optional reason.
When you would use this
The owner comes to this form from the panel once the date, hours or reason for a staff member's particular time off or partial closure is settled — to add a new one, or to correct an existing one.
Who sees it
Only the user matching the owner field on the company document can open this screen; nobody else can create or edit a time-off entry.
Where it lives
This screen exists in the panel; mobile has no direct counterpart, but two different mechanisms on the mobile side do the same job separately. Adding a new time-off entry on mobile uses a quick form opened from the staff list's action sheet: a date, a full-day switch, or a start time plus duration presets (30/60/120 minutes, or a custom end time) and an optional reason — it corresponds to the panel's free-form time-range entry, but picks a duration instead of writing the range directly, and is limited to one range. Editing an existing entry, though, uses the very same component as the panel on mobile (multiple time ranges included), because the quick form's duration presets cannot bring back an arbitrarily saved time range.
What you can do here
Pick a date
A date is entered.
In the panel the date field is a native date picker with no minimum set, so it does not block a past date; both mobile mechanisms (the quick form and the edit form) only offer today and later.
Full-day switch
While on, the time-range fields are hidden and the entry covers the whole day; while off, at least one time range must be entered.
Add/remove time ranges
While full day is off, more than one range can be added.
Reason
An optional free-text field; shown next to the date in the list.
A mismatched edit is refused
If the time-off id in the address is not in the list, a "not found" message is shown instead of turning into a blank create form.
Read-only while suspended
Every field in the form is disabled when the business is suspended.
What the server accepts and refuses
The date and range shape are validated only by the form
Whether the date is non-empty, or at least one valid, non-overlapping range is entered when the entry is not a full day, is checked only by the client's own form.
The date is a plain day stamp interpreted in the business's timezone
Time off is stored as a date in "YYYY-MM-DD" form with no time of day; when this staff member's availability for an appointment is evaluated, this date is compared against the local day computed in the business's own timezone.
While full day is on, time ranges are written cleared
While the full-day switch is on, the form saves time ranges as an empty array; any previously entered ranges are deleted along with the save.