topcoder-platform / micro-frontends-taas-admin-app

taas-admin-app for managing taas administrative activities
MIT License
0 stars 5 forks source link

[$45] Edit payments #80

Closed maxceem closed 3 years ago

maxceem commented 3 years ago

Background

At the moment we can only create new payments and cancel whole payments if we need to. But sometimes managers would like to change the amount of payment.

Task

API

sandhiyakavi commented 3 years ago

@maxceem

  1. In the modal, if we enter floating values (even though less than 100,000) with six digits, it is showing wrong error message "Amount should be greater than 0 and less than 100,000." image

  2. Can we disable Edit payment for Failed status, as it is of no use in editing it right? image

  3. Sometimes if days cannot be increased/decreased because of working days limit, can we disable update button? image

Other than that, it is working fine as expected

maxceem commented 3 years ago

Sum up:

  1. Need to fix.

  2. Let's disable "edit" button for "failed" and for "cancelled" payments. Note, that for "cancel" button should be only disabled for "cancelled" payments, but still enabled for "failed".

  3. Let's disable "update" button if we didn't change anything inside "edit payment" model (days or amount).

@MadOPcode feel free to pick up this issue as per this comment.

MadOPcode commented 3 years ago

@maxceem regarding clause 1. Since there's no point in paying amounts with less than 1 cent precision shouldn't the validation error message be changed instead of validation method? E.g. to "The amount should contain at most 2 digits after floating point and should be greater than 0 and less than 100,000."

maxceem commented 3 years ago

@MadOPcode is it hard to not allow entering more than 2 digits after point?

MadOPcode commented 3 years ago

@maxceem no, there just seems to be no meaning in this.

maxceem commented 3 years ago

@MadOPcode the idea is to make it easy to follow our requirement for the entering amount. It feels natural to not allow entering more than 2 points. Also, we would keep validation not so complex.

MadOPcode commented 3 years ago

@maxceem after re-reading your comments I think I've misunderstood you. I somehow thought that you're talking about allowing to enter more than 2 digits. Of course there's a meaning in not allowing to enter more than 2 digits.

maxceem commented 3 years ago

right, just not allow entering more than 2 digits after the point.

sandhiyakavi commented 3 years ago

Verified in Dev Env.

  1. Not able to enter more than 2 numbers after the decimal points. image

  2. Edit payment is disabled for Failed/Cancelled status. image image

  3. Update button disabled if there is no change in days. image

Below scenarios are also verified and working fine.

  1. Verify whether Action dropdown with two options Edit payment and cancel payment is available in Total paid pop up.
  2. Verify whether Edit payment option is disabled if the status is in-progress.
  3. Verify whether Edit Additional Payment for days modal opens if user tried to Edit the additional payment paid.
  4. Verify whether Edit Payment for days modal opens if user tried to Edit the normal payment for days.
  5. Verify whether amount is not enabled for Edit Payment for days modal.
  6. Verify whether design of Edit Payment for days modal is similar to the one described here (https://github.com/topcoder-platform/micro-frontends-taas-admin-app/issues/80)
  7. Verify whether minimal value of days is 1 (disable - button if the value is 1 and show tooltip saying: The payment cannot be done for less than 1 day)
  8. Verify whether '+' button is disabled if dayspaid will become more than the daysworked (https://github.com/topcoder-platform/taas-apis/blob/dev/src/services/WorkPeriodPaymentService.js#L285-L291)
  9. Verify whether user is able to edit the Additional payment made.
maxceem commented 3 years ago

Challenge https://www.topcoder.com/challenges/fc807c9d-fb26-46e9-a735-d7b13555382e has been created for this ticket.

This is an automated message for maxceem via Topcoder X

maxceem commented 3 years ago

Challenge https://www.topcoder.com/challenges/fc807c9d-fb26-46e9-a735-d7b13555382e has been assigned to madopcode.

This is an automated message for maxceem via Topcoder X

maxceem commented 3 years ago

Payment task has been updated: https://www.topcoder.com/challenges/fc807c9d-fb26-46e9-a735-d7b13555382e Payments Complete Winner: madopcode Copilot: maxceem Challenge fc807c9d-fb26-46e9-a735-d7b13555382e has been paid and closed.

This is an automated message for maxceem via Topcoder X

sandhiyakavi commented 3 years ago

Verified on Prod Env. Working as expected.

cc: @nkumar-topcoder