Account for user journey when calculating days booked per week #633
+116
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the Vacation Management page shows Days Booked per Week and includes partial leaves (days where the number of of hours is less than a user journey), but doesn't account for a user booking more vacation hours than their workday hours (journey). This is normally not something to worry about too much since most users will probably use the Vacation Management page to book vacation and that interface takes care of handling the right amount of hours based on journey. However, if the user manually books vacation time via the Tasks page, there could be some days on which the user has more hours booked for vacation than they should. When this happens (more hours booked than should be allowed for a day), the Days Booked per Week does not take the user journey into account and will simply show 1 day booked on a week when it should perhaps show 1.25 days.
This PR adds accounting for user journey in the calculation of Days Booked per Week and also adds highlighting to days on which a user has booked more vacation hours than their journey.