[$80] Additional Payments #82
Description
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
-
Add
Actions
dropdown menu to each of the row in the table with 1 option:Additional Payment
- 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.
-
When we click
Additional Payment
show a modal: -
If we click
Cancel
orX
just close the modal. -
if we click
Process Payment
show a loading indicator inside the modal or disable the field and all the buttons while sending request to the server. -
we don't have a design for this modal, please use styles of the existent modal, it can be seen like shown on this screenshot https://monosnap.com/file/vtLasCWUEocTs3CVPg4typTRYbfjVU.
-
for the field use styles like in https://github.com/topcoder-platform/taas-app, see example page with such a field https://platform.topcoder-dev.com/taas/myteams/18102/rb/ac7e4dae-8a0b-468c-bb53-1b93f13cd825/edit
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 }