Update BA for already processed payments of the Work Period #81
Description
Background
Managers can process payments for Work Periods. Money for the payments comes from the Billing Account which is associated with Resource Booking:
Sometimes Managers process payments using the wrong billing account. And they would like to update the billing account for all payments which are done during the current Work Period (week).
Task
-
Add
Actions
dropdown menu to each of the row in the table with 1 option:Update BA for payments
(or add this option ifActions
is already implemented via this task [$80] Additional Payments #82)- The actions dropdown is already implemented in https://github.com/topcoder-platform/taas-app see demo page https://platform.topcoder-dev.com/taas/myteams/18102. Please, port it from there.
Or reuse it if it was already ported during another task [$45] Edit payments #80 or [$80] Additional Payments #82.
- The actions dropdown is already implemented in https://github.com/topcoder-platform/taas-app see demo page https://platform.topcoder-dev.com/taas/myteams/18102. Please, port it from there.
-
When we click
Update BA for payments
show a modal:- For modal, use the same design as for adding payment: [$80] Additional Payments #82
- Inside
Current BA used
list the billing accounts which were used for payments at the moment which would be updated
-
If we click
Cancel
orX
just close the modal. -
if we click
Update BA for payments
show a loading indicator inside the modal OR just disable the fields and all the buttons while sending request to the server.
API
- API has been implemented to support updating a billing account for multiple payments at once [$80] Update payments in bulk topcoder-platform/taas-apis#433
- We have to send a request to update Billing Account for all the payments inside the Work Period by the next request https://topcoder-platform.github.io/taas-apis/#/WorkPeriodPayments/patch_work_period_payments_bulk