Source-port status: Post-V2 reconstruction from Leave — system flows (6 Oct 2026: web 8ff381cc4, backend 78e0e76bd, read-only dev SQL/logs). This port does not newly verify production or fix recorded defects. Leaves and Leave V2 are historical comparisons, not replacements for that newer snapshot.
Policy → member item → targeted people → per-person policy balance. EmployeeLeaveBalanceLog preserves typed movements. Original leave is request type 1; post-V2 children link using ParentEmployeeRequestId and EmployeeRequestKindId. Do not substitute the August proposed RequestActionTypeId encoding.
| October kind ID | Meaning | Balance effect at child approval |
|---|---|---|
| 1 | Original | Submission commits its days. |
| 2 | Cancellation | Return unused days; original Cancelled. |
| 3 | Modification | Apply difference; API-only in inspected UI. |
| 4 | Extension | Take extra days only. |
Statuses: Approved=1, Declined=2, New=3, Cancelled=4, Returned=5, Withdrawn=6. Returned is defined but unreachable; Declined API edit is defective. No status ID greater than Approved should be treated as a universal editable-state rule.
Accrual=1; Roll-over=2; Roll-over expiry=3; Request deleted=4; Manual adjustment=5; Submitted=6; Declined=7; Updated=8; Cancelled=9; Withdrawn=10; Extended=11; Reconciliation=12. This differs from August's proposed Opening/Consumed/Released enum. Validate current stored definitions before using these IDs in integration or repair.
Whole-day requests are the product contract despite decimal balance storage. Planning has its own Draft/Submitted/RevisionRequested/Coordinated/Converted/Withdrawn states; they are not leave request status IDs. Conversion links a booking; release restores the prior planning state.
| Action | Route evidence | Contract / limitation |
|---|---|---|
| Create/edit | POST /admin/requests/Add_LeaveRequest and /employee/requests/Add_LeaveRequest; id denotes edit |
Form data; server validates count/balance/notice/waiting/own overlap. Exact complete DTO not reproduced. |
| Review | POST /admin/requests/Review |
Current step, actionType, overlap override reason when permitted. |
| Batch review | POST /admin/requests/Batch_Review |
Recorded V2 bypass defects; not equivalent to individual review. |
| Delete | POST /admin/requests/Delete_LeaveRequest |
Current snapshot route; pending-child/payroll guards apply. July/August unroutable claim is historical. |
| Lifecycle | withdraw_leaverequest, cancel_leaverequest, extend_leaverequest, modify_leaverequest in admin/employee request family |
Verify exact verb/body signatures in controllers; do not infer them from naming. Modify has no screen; no return-for-correction route exists. |
| Changes | GET /admin/requests/selectleavecancellations |
Lists lifecycle children, including extensions despite legacy name. |
| Chain/overlap | view/approvalchain, view/leaveoverlap, view/leaveoverlapsettings, save_leaveoverlapsettings |
Read reviewer context and staffing limit; verify current request parameters/verbs. |
| Planning | /admin/requests/leaveplanning/*, /employee/requests/leaveplanning/* |
Families only, not an invented exact endpoint catalogue. |
| Calendar/reports | view/leavecalendar, view/pendingleavereport, view/leave*report, save_leavereportview |
Server scope and saved report access still apply. |
POST admin/requests/add_leavepolicy or update_leavepolicy?id=<leave_policy_id> takes an array of member items with starting_balances: [{ person_id, starting_balance, leave_perk_id? }]. Changed rows overwrite; untouched rows round-trip current balances. Step-3 form key working_days maps to starting balance, not Step-2 annual entitlement.
POST admin/employees/getleavepolicyitememployees supplies current balance/perk balances. Its source request-body row is truncated: recover the exact DTO rather than guessing the group-list shape. GET admin/employees/selectleavebalances?person_id=<id> reads profile balances. Earlier POST admin/requests/update_leavebalance uses [{ employee_leave_balance_id, current_balance }]; verify against October service/controller naming before coding.
Live form balance check uses getLeaveBalance?person_id=&leave_policy_id=. Missing entitlement and zero balance are currently ambiguous; HTTP success is not an entitlement guarantee. Report navigation /dashboard/report/leave-balances is not an API.
Review/delete/accrual depend on spReviewEmployeeRequest, spDeleteEmployeeRequest, spUpdateEmployeeLeaveBalance; policy creation references spCreateLeavePolicyItem. Exact current definitions and versioned migration history must be inspected before any change. Advance-leave floor, fractional accrual rounding, concurrency/replay, idempotency, integration authentication and post-payroll repair are not fully verified contracts. Browser/API access must enforce tenant/person/capability—not just hide controls.