How to update staff leave
Change the dates, open-ended status, or reason for an existing staff leave event at the selected location while keeping the staff member fixed.
In this article
Staff leave updates keep the team calendar aligned when an absence changes after it was first recorded. Managers can reopen an existing leave from the location calendar, adjust the dates or reason, and save it back into the same calendar event.
In the Harbor Soho demo, this guide uses Olivia Hart as the staff example. The edit screen keeps the staff member read-only, saves staff leave as an all-day event, and refreshes availability after the update.
Before you start
- An existing `staff_leave` calendar event belongs to the selected location.
- The operator is in Harbor Demo Group and Harbor Soho, or another organisation and location with the same context set.
- The location role grants both `staff-leave:view` and `staff-leave:manage`.
- The app can load the event detail and staff list. For GB documentation captures, create or discover a `STAFF_LEAVE_EVENT_ID` in the documentation runtime before recording.
Instructions
- 1.
Open the existing leave
Open the leave from the staff calendar or use `/:orgId/:locationId/calendars/edit/:eventId?kind=staff_leave`. The `kind=staff_leave` query sends the user to the dedicated staff leave edit form.
- 2.
Confirm access and context
Check that the intended location is selected, such as Harbor Soho. The form appears after the event detail and staff list load, and only users who can manage staff leave can edit it.
- 3.
Review the staff member
Use the Staff member field to confirm who the leave affects, for example Olivia Hart. In the normal edit UI this field is read-only.
- 4.
Edit the leave dates
Change Starts and, when the leave has an end date, Ends. Staff leave is saved as an all-day event: the selected start date is stored at 00:00 and the selected end date at 23:59 in the location timezone.
- 5.
Choose whether the leave has no end date
Turn on No end date to keep the leave active without an Ends field. Turn it off to restore an end date; if no end was present, the UI fills the same day at 23:59.
- 6.
Update the reason
Add an optional Reason when the team needs context for the leave. Empty or whitespace-only text is saved as no reason.
- 7.
Save and review the calendar
Save becomes available only after a valid change. After saving, the app returns to the requested calendar route and refreshes calendar data and staff availability.
Validations and limits
- A missing event id, wrong location, or event that is not `staff_leave` shows the requested-event-not-found state.
- `starts_at` and `staff_id` are required; for finite leave, `ends_at` must be after `starts_at`.
- Open-ended leave is saved with `ends_at` cleared and `clear_ends_at: true`.
- `payload.reason` is optional text only; an empty reason is omitted.
- Overlapping `staff_leave` periods for the same staff member and location are rejected.
- The event type cannot be changed during this update, and recurrence is not supported for staff leave.
- Without `staff-leave:manage`, the update form cannot be used; backend detail loading also requires `staff-leave:view`.
- The Delete button belongs to the separate staff leave delete action, not to this update flow.
Expected result
The existing `calendar_events` staff leave row is updated, the staff member remains fixed in the UI, and calendars plus staff availability refresh after saving.