Leave and permission: two buttons, one flow
Annual leave and two hours off are the same request in different units. The type carries that difference, not a second table.
Annual leave is measured in days, a couple of hours for a doctor’s appointment in hours. Everything else is identical: who asks, who approves, how it lands on the timesheet.
The type carries the difference, not a separate table
Every type has a unit — day, hour or minute. The panel shows two buttons, but behind them is one list and one flow. Two tables would have meant writing the approval logic twice and keeping both correct.
- Whether a type consumes the balance is a property of the type
- A business trip does not consume leave, but still counts as worked
- A company can add its own type — "bank errand", for instance
An approved request reaches attendance too: no absence and no penalty is created for that day, and for an hourly permission only that window is adjusted.