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

Watch data updates #39

Open
Open
@maxceem

Description

@maxceem

At the moment after we process the payment we don't update the data loaded in the table in any way. Though after payment processing it is expected that the statuses of all the payments would be updated to scheduled.

If we just reload the data for the page after payments processing the data returned by the server might be still outdated because such updates take place not immediately.

So I suggest the next solution:

  1. When we process payment for selected items or all records
  2. For all the records for which we processed the payment (if it not failed) we should show a loading indicator, we can replace the payment status label with a label which stays Loading... inside and color 5FB7EE.
  3. The same time in the background we should reload data for the current page (but don't show loading indicator on the whole page). And as soon as we see that paymentStatus which was before changed to in-progres update data for that row (not only status but other values also). This means that the payment for this record is in progress.
  4. We should get reload data with some interval, like 5 seconds (should be configurable) until we see that all success records got updated status.
  5. We should stop reloading data if:
    • we already got all the success records updated on the current page
    • 5 minutes passed (should be configurable) - in such case for all records which weren't updated, show the previous status
    • we make any action like: filter, change, change per page, change data, process another payment or go to another URL

NOTES:

  • When process payment for ALL pages, we only update the data for the current page, we don't have to check status for all the pages as it would be too hard
  • When we process payment inside one page, some payments might fail and we know it, so we don't have to wait for status update for these rows, only wait for status update for the rows which were success

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions