Register Staff Exit
Close the currently open attendance shift for Olivia Hart at Harbor Soho. The operator chooses Exit, confirms the time, and Antylogic records the exit on the most recent open staff shift.
In this article
Use this guide when a staff member has already recorded Entry and needs to clock out at the end of a shift. In the GB demo, Harbor Soho records Olivia Hart from the Clock in/out screen.
Antylogic does not create a separate shift for Exit. It finds the newest open staff_shift calendar event, resolves the exit time in the location time zone, and closes that existing attendance record.
Before you start
- You are signed in to Harbor Demo Group with Harbor Soho as the active location.
- Olivia Hart exists in Harbor Soho and is available through ${STAFF_ID}.
- For the normal flow, Olivia Hart has an open shift: Entry recorded and no Exit recorded.
- A manager needs `staff-shifts:notify` for Harbor Soho. `staff-shifts:manage` alone does not submit Exit.
- For self-service, the signed-in user is linked to the same staff record they are clocking out.
Instructions
- 1.
Open Clock in/out
Open `attendance?staff=${STAFF_ID}` with Harbor Soho active. The page loads Olivia Hart and her attendance shifts, then treats the newest shift without `exit_at` as the open shift.
- 2.
Choose Exit
On the attendance card for Olivia Hart, choose Exit. The app prepares `action=exit` and opens Confirm exit so the operator can review the action before saving.
- 3.
Confirm the time
Confirm the exit time. If no time is entered, the app uses the current local time in `HH:mm`; when the exit time is earlier than the entry time, it can save the exit on the next local day.
- 4.
Save the exit
The app sends a StaffShiftNotification with `action: exit`, `exit_time` and `exit_day_offset` through the manager endpoint or the self-service endpoint for the linked staff record.
- 5.
Check the result
After the save succeeds, the modal closes, attendance data refreshes, and Shift updated appears. The shift for Olivia Hart now has both entry and exit times.
- 6.
Handle no open shift
If Exit is selected without an open shift, the app shows Time correction needed and asks for Entry time. Saving creates the missing entry correction first, then records the exit for review.
Validations and limits
- A selected staff member is required before Exit can be submitted.
- The selected staff member must belong to Harbor Soho.
- A direct Exit requires an open staff shift; if several are open, the newest by entry time is closed.
- Managers need `staff-shifts:notify`; `staff-shifts:manage` is for correction review and does not replace notify permission.
- Self-service can only clock out a staff record linked to the signed-in user.
- The submitted action must be `exit`, with `exit_time` in `HH:mm` and `exit_day_offset` set to `0` or `1`.
- The resolved exit time must be after the entry time and cannot be in the future.
- If the open shift already had an exit correction requested, that status is kept instead of being changed to normal.
- `attendance/corrections` is for correction review, not the normal clock-out action.
Expected result
The open staff_shift calendar event is closed with `EndsAt` and `exit_at`, the updated StaffShift is returned, staff and shift data refresh, and the Clock in/out page shows the updated state.