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

[$100] UI to cancel payments #56

Closed
maxceem opened this issue Jul 1, 2021 · 5 comments
Closed

[$100] UI to cancel payments #56

maxceem opened this issue Jul 1, 2021 · 5 comments
Labels

Comments

@maxceem
Copy link
Contributor

maxceem commented Jul 1, 2021

We would like to be able to cancel payments if we need to.

image

  • Inside Payments Popup add button one more column with no title. And in that column add red button Cancel.

    • Cancel button should be disabled for the payments in status in-progres - other statuses we can cancel.
  • When we click it, show Confirmation Modal window which should look like this:

    image

    • use styles and common code to show modal windows from TaaS App (you can see this modal here https://platform.topcoder-dev.com/taas/myteams/17975/access if you click "x" to remove member)

    • if we click cancel cencelling then just hide confirmation window

    • if we click mark as cancelled then show loading indicator and title "Marking as cancelled...", same as in TaaS App

      image

      • if request failed, then keep showing confirmation window, hide loading indicator inside it, and show text and buttons again so user can try to click mark as cancelled again, the same time show red toastr with error message from the server
      • after canceling payment the WP paymentStatus may change. So after the payment is cancelled reload data for the WP. It may happen that data on the server is not yet updated. So add a configured artifical delay after the success request to cancel payment, so it would be like this:
      • if the request is successful, then:
        • update payment data in the Payment Popup using server response
        • add an artificial delay of 3 seconds (configurable) and show loading indicator for 3 seconds more
        • after that, keep showing loading indicator and send request to reload one row of WP, and update data for the WP row in table
        • hide confirmation window and show green toastr which says Payment ${amount} for ${userHandle} was marked as "cancelled"
@maxceem maxceem added the CF Issues for Community Fixes label Jul 1, 2021
@maxceem maxceem changed the title UI to cancel payments [$100] UI to cancel payments Jul 1, 2021
@sandhiyakavi
Copy link
Collaborator

@maxceem For cancel payments, the 'cancel' button is not active for 'scheduled' status and active for 'in-progress' status but it should be active for 'scheduled' and inactive for 'in-progress'

scheduled cannot cancel

Screenshot_3

cancel error

maxceem added a commit that referenced this issue Jul 6, 2021
@maxceem
Copy link
Contributor Author

maxceem commented Jul 6, 2021

@sandhiyakavi fixed.

@sandhiyakavi
Copy link
Collaborator

Verified on Dev Env. Able to cancel payments for all status other than 'in-progress'
image

image
image

image

@maxceem
Copy link
Contributor Author

maxceem commented Jul 7, 2021

@maxceem maxceem added the PAID label Jul 7, 2021
@sandhiyakavi
Copy link
Collaborator

Verified on Prod Env with @nkumar-topcoder

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

No branches or pull requests

2 participants