Time Off Request Sequence Diagram
Closed this issue · 6 comments
Create a timeoff API sequence diagram to show how the timeoff works in the application. The sequence diagram should have the following.
-
How the different entities communicate
-
How are requests sent
-
The reasons for timeoff/ accrual policy
-
Maximum amount of time off that can be accrued.
-
Number of days time off is allowed in a year
-
What are the rules for carrying over unused time off to the next period? (carryover policy)
-
Track accrued, used and remaining time offs
Also, a few questions on top of my head:
- What are the accrual policies? Define how time off is earned (e.g., per pay period, monthly, annually).
- Accrual Cap: Maximum amount of time off that can be accrued.
- What are the rules for carrying over unused time off to the next period? (carryover policy)
- What is the carryover cap?
- Time an employee must work before becoming eligible for certain types of leave.
- For now we can have 1 approval level but in the future the system should allow multiple approval levels
- What are system notifications for employees and managers regarding request status?
- How do we track accrued, used and remaining time offs?
In the future, we can also think about the following:
- We can allow employees to take time off with a negative balance
- Forced time offs - mandatory time off during certain periods (e.g., company-wide holidays).
Do we set a carryover cap or do we put a fixed number of timeoff days in a year?
Do we set a carryover cap or do we put a fixed number of timeoff days in a year?
Let's build in versions, eg version 1, version 2 etc.
In the first version we don't have to implement carryover or carry over cap. This would be v1.
In v2 we would implement carryover login.
You can also make a list of those features and implement the most important in v1, making sure features in v2 will be easily implemented afterwards and that v1 features do not become a barrier for v2 features.
Ok got it!
Let me list the things to consider in version 1.
- There is only one type of time off policy, which is allotment type.
- An admin can create, edit or delete policies.
- While creating a policy, admin needs to specify the followings:
- Policy name
- Time off amount can be used (either a number of days or unlimited)
-
The balance assigned to the policy will be given their full amount of time off on January 01. The amount is valid for the calendar year (Jan. 01 – Dec. 31) and immediately available for use by the employee added. As time off is used, the allotment balance decreases. When employee is added during a year (not Jan 1), then the amount is calculated for the specific employee for the rest of the year, like the following:
( number of days left to next year / 365 ) x the allotment balance (rounding down to integer when it's float) -
By default, there are 3 time offs defined. Their names and amounts are:
- Vacation - 14 days
- Sick - unlimited
- Bereavement - Unlimited
-
When an employee requests a time off, their manager needs to approve. When an employee has no manager, then the admin needs to approve. The admin needs to approve his/her own time off requests as well.
-
Time off duration are based on hours. 1 days is equal to 8 hours.
-
Time off request can be simply done by selecting the time off policy, the start date, the end date and . A user can specify each day if it's full day (8 hours) or half day (4 hours) to be used.
-
No carryover. After Dec 31, all balances are reset.
The above points are for version 1. The other features like accrual type policies will be considered in version 2.
In case of confusion, there is a simple product documentation above each Figma screens. Along with the Figma designs itself, it may help answer some simple questions. And, I'd be glad to answer any further questions, for sure. :)