How to Delete Staff Leave
Remove an existing staff leave calendar event for Harbor Soho from the editable leave form. The action is permanent and requires staff leave management permission.
In this article
Staff leave records are part of the location calendar, so managers remove them from the same calendar event flow used to review the absence. In the GB demo context, the example record belongs to Harbor Demo Group / Harbor Soho and can be prepared for Olivia Hart.
This guide covers deletion only. It does not change the employee, dates, or reason; those fields are reviewed before the manager opens the confirmation and permanently removes the leave event.
Before you start
- The operator is signed in with Harbor Demo Group and Harbor Soho selected.
- A `staff_leave` event already exists for Harbor Soho and can be opened from the vacations calendar or with `calendars/edit/:eventId?kind=staff_leave`.
- The operator has `staff-leave:view` to open the record and `staff-leave:manage` to delete it.
- For documentation captures, the runtime must create a temporary Olivia Hart leave event and expose it as `STAFF_LEAVE_EVENT_ID` before opening the edit route.
Instructions
- 1.
Open the leave event
Open the existing staff leave record from the vacations calendar, or use the direct edit route with `kind=staff_leave`. When the operator can manage staff leave, Antylogic opens the editable leave form instead of a read-only detail view.
- 2.
Review the record
Check the employee, start date, optional end date, and reason before deleting. In edit mode the employee field is not editable, so this review is the safeguard against removing the wrong leave record.
- 3.
Open the confirmation
Select `Delete` in the form footer. Antylogic opens the delete confirmation modal with `Cancel` and `Delete`; cancelling or closing the modal leaves the event unchanged.
- 4.
Confirm deletion
Select `Delete` in the modal. The app deletes the event through `calendar-events`, refreshes calendar data, clears the deleted event detail, shows the success message, and returns to the configured vacations calendar route.
Validations and limits
- The edit form needs the selected organisation, selected location, edit mode, and a valid event id.
- The specialised form only accepts events whose kind is `staff_leave`; other kinds are treated as not found in this flow.
- `staff-leave:view` is required to load the event and `staff-leave:manage` is required to delete it.
- The self-service delete exception for vacation requests does not apply to `staff_leave`.
- The delete action is not available in creation mode, without an event id, or from a read-only detail page.
- The event must belong to the current location context.
- The request is `DELETE /api/app/{orgId}/{locationId}/calendar-events/{eventId}` and sends no request body.
- A successful delete returns `204 No Content`; if deletion fails, the edit screen stays open and shows an error.
- Deletion is physical: the `calendar_events` row is removed. There is no archive state, partial occurrence delete, or split flow for staff leave.
Expected result
The staff leave record is permanently removed from `calendar_events`, related calendar data is refreshed, and the manager lands back on the vacations calendar with the deleted detail cleared.