This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
[$50] We should not allow increasing Working Days more than fit Resource Booking #37
Closed
Description
To implement this we have to create a reusable method which would return maximum allowed daysWorked
for the WorkPeriod inside Resource Booking.
- The logic how we calculate
daysWorked
is described here https://github.com/topcoder-platform/taas-apis/wiki/Work-Periods-(WP)-Automation-and-Constraints#resourcebooking-is-created - Also, we implemented a similar logic sever-side which may be used for reference https://github.com/topcoder-platform/taas-apis/blob/dev/src/common/helper.js#L1776-L1810 (note, that on server this method calculates all work periods for the ResourceBookings, but we need just to get the maximum allowed daysWorked for one Work Period)
- After having this method we should not allow to increase the Working Days more than possible value for each Work Period.
Tooltips:
- we already cannot decrease the number of working days to be less than daysPaid
- we have to explain to the user why they cannot decrease or increase the working days number by showing the reason in Tooltip
- to do so we have to show tooltip with the reason when the user hover mouse on the
-
or+
buttons (only when they cannot press them):Cannot decrease "Working Days" to less than day already paid: ${daysPaid}
Cannot increase "Working Days" because the end date of the Resource Booking is ${RB.endDate}