Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Allow up to 10 "Working Days" #79

Closed
maxceem opened this issue Jul 27, 2021 · 2 comments
Closed

Allow up to 10 "Working Days" #79

maxceem opened this issue Jul 27, 2021 · 2 comments

Comments

@maxceem
Copy link
Contributor

maxceem commented Jul 27, 2021

Background

In TaaS we have members (ResourceBookings) who are assigned to the customer's Jobs for some period of time. This time is divided into weeks (WorkPeriods) and payments to the ResourceBookings (members) is processed weekly per WorkPeriod. For each WorkPeriod we can enter how many days user worked per that week (0 till 5) and process payments for the working days. If ResourceBooking's ends in middle of the week (let's say Wednesday), than during that week we cannot enter more working days than actually fit the week (maximum 3 working days can fit week until Wednesday). This is already implemented, but sometimes ResourceBooking can work like double shift or even on the weekends, so we would like to allow managers to enter up to 10 working days per Work Period even there are no so many real working days in that WorkPeriod.

image

Task

  • Allow setting "Working Days" to maximum 10.

  • When there is already 10 working days selected, the + button has to be disabled, the same like when - is disabled if we choose 0 days.

  • As soon as we increase the "Working Days" to more than this week can fit we have to show a confirmation modal window:

    image

    • for example if we increase from 5 to 6, we show this modal

    • or if this week can fit only 3 days, then if we increase form 3 to 4, we also show this modal (see this issue to learn how to know the maximum value [$50] We should not allow increasing Working Days more than fit Resource Booking #37 - the code is already implemented to calculate this value and can be reused)

    • but the current value is already more than maximum of this week, we don't show this confirmation anymore, so if we increase from 6 to 7, no more confirmation

    • if inside confirmation we click yes then value should stay increased

    • if inside confirmation we click no, then value should be reverted back to the previous one

  • We already have a modal implemented in the Admin App. It can be seen like shown on this screenshot https://monosnap.com/file/vtLasCWUEocTs3CVPg4typTRYbfjVU.

    • Please, reuse the code for confirmation modal.

API

@sandhiyakavi
Copy link
Collaborator

Verified on Dev Env.

Below scenarios are verified,

  1. Verify Working days can be set up to max of 10 and '+' button is disabled if value is 10.
  2. Verify Working days set more than 5/RB dates then a modal window opens and the contents are correct.
  3. Verify if the current value is already more than maximum of this week, no confirmation modal shown
  4. Verify whether Yes clicked value increased and if No clicked value not increased.
  5. Verify whether dayswrked changed, if the RB date altered has datesset > dayspaid (RB.startdate as well as RB.Enddate)
  6. Verify whether dayswrked not changed, if the RB date altered has datesset < dayspaid (RB.startdate as well as RB.Enddate)

@sandhiyakavi
Copy link
Collaborator

Verified on Prod Env. Working as expected.

cc: @nkumar-topcoder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants