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

[$80] Additional Payments #82

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

[$80] Additional Payments #82

maxceem opened this issue Jul 27, 2021 · 11 comments

Comments

@maxceem
Copy link
Contributor

maxceem commented Jul 27, 2021

Background

At the moment we can only process payments to the resource bookings for some amount of days worked via UI https://monosnap.com/file/HOmkcBnEVYmz3j0n32CcQ25TFQmQT5.

Sometimes managers would like to process additional payments which would not be counted for days. For this purpose we would like to introduce another way to process additional payments.

Task

API

  • we've updated API to support additional payments [$30] Additional Payments topcoder-platform/taas-apis#430
  • to create additional payment use endpoint POST ​/work-period-payments passing in the body:
    {
     "workPeriodId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", // work period id
     "days": 0, // we should ALWAYS pass 0 to indicate that this is an additional payment, not for days
     "amount": 200 // amount entered in the form
    }
@sandhiyakavi
Copy link
Collaborator

@maxceem Below are the issues found,

  1. We are able to process Additional payment for the future weeks.
  2. If we process additional payment for WP that has status 'pending', it is changing into 'partially-completed' status whereas the other status are not getting changed (No Days).

pending_status_change

3. Similarly when the additional payment is in scheduled/in progress status, the Status of WP is getting changed to 'in-progress' for all status except 'NO DAYS' status, it is still displaying the same. So there is no way for the user to know whether the additional payment is triggered or not.

nodays_status change

4. 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."

erro for number

@sandhiyakavi
Copy link
Collaborator

@maxceem some more issues,

  1. In the modal, the default value is getting displayed as 0 which is not allowed (should be greater than 0).Can we make the textbox empty instead of displaying 0?
    image
  2. If the RB BA is not assigned, we are able to process additional payment and then read toaster message is displayed with code, is it possible to disable Additional payment option if BA not assigned as the red toastr message is not visible if the resources per page is more and the modal also is still opened which is causing confusion.
    image
  3. In the modal, text is missing 'the' in it . "Additional payment for Resource Booking "tester1234" for the week "08/08 - 08/14""
    image

@maxceem
Copy link
Contributor Author

maxceem commented Aug 12, 2021

Sum up:

  1. Disable "Additional Payment" option for future work periods and show tooltip when we put mouse on it: Not allowed processing payments for the future weeks.

  2. will be fixed server-side by [DEV] fix WP status when only have additional payments topcoder-platform/taas-apis#491

  3. will be fixed server-side by [DEV] fix WP status when only have additional payments topcoder-platform/taas-apis#491

  4. Need to fix validation.

  5. Can we make the default value empty instead of 0?

  6. let's disable the "additional payment" option if there is no BA assigned to the corresponding Resource Booking and when we put mouse on it show tooltip: Billing Account is not set for the Resource Booking.

    The second part would be handled as a separate issue [$40] Make toastr messages always visible #95

    the red toastr message is not visible if the resources per page is more and the modal also is still opened which is causing confusion.

  7. Need to fix.

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

@maxceem maxceem changed the title Additional Payments [$80] Additional Payments Aug 12, 2021
@maxceem maxceem added the CF Issues for Community Fixes label Aug 12, 2021
MadOPcode added a commit to MadOPcode/micro-frontends-taas-admin-app that referenced this issue Aug 14, 2021
…opcoder-archive#94, topcoder-archive#95.

- Adds fixes for adding and editing payments (topcoder-archive#80, topcoder-archive#82)
- Adds working period data reloading after adding and editing payments (topcoder-archive#94)
- Makes toastr messages always stay withing the viewport (topcoder-archive#95)
@sandhiyakavi
Copy link
Collaborator

Issue points 2 and 3 are not yet fixed.

Other issues are fixed and working fine.

  1. Not able to process Additional payments for future week.
    image

  2. Able to enter only two digits after the decimal point.
    image

  3. Textbox is now empty.
    image

  4. Additional payment option disabled if no BA assigned and tooltip is displayed.
    image

  5. Text displayed correctly in the modal.
    image

@maxceem
Copy link
Contributor Author

maxceem commented Aug 17, 2021

@sandhiyakavi Issue points 2 and 3 should be fixed now.

@sandhiyakavi
Copy link
Collaborator

@maxceem If we do Additional payment for the WP which is in 'pending' status, it is still changing into 'partially completed' status.
image

If 'No days' status and we process Additional payment, the status changing correctly into 'in progress' status.
image

@maxceem
Copy link
Contributor Author

maxceem commented Aug 17, 2021

@sandhiyakavi this WP has 1 working days, but 0 working days were paid. As some payment was done (additional one), we indicate it as partially completed status.

image

@maxceem
Copy link
Contributor Author

maxceem commented Aug 17, 2021

Challenge https://www.topcoder.com/challenges/add1a560-96ce-4330-933d-20f0b50fd46d has been created for this ticket.

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor Author

maxceem commented Aug 17, 2021

Challenge https://www.topcoder.com/challenges/add1a560-96ce-4330-933d-20f0b50fd46d has been assigned to madopcode.

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor Author

maxceem commented Aug 17, 2021

Payment task has been updated: https://www.topcoder.com/challenges/add1a560-96ce-4330-933d-20f0b50fd46d
Payments Complete
Winner: madopcode
Copilot: maxceem
Challenge add1a560-96ce-4330-933d-20f0b50fd46d has been paid and closed.

This is an automated message for maxceem via Topcoder X

@maxceem maxceem reopened this Aug 17, 2021
@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

3 participants