Reactive document center updates

UI Loading bar

API call /api/background-extraction/status

repeat every once in a timeout

Fill the loading bar

Using documents to extract list, show only specific documents after 'View Documents' button is clicked (View documents can have a separate API call to retrieve the list)

Get list of 'documentsToExtract' and 'doneExtracting' and compare lengths. (as an option do calculation on backend and only return the %)

Trigger background processing of unknowns

If current table page contains a being processed(jquery check) send ajax request and refresh the table page every once in a timeout (1second)

if current page doesn't have any processed(e.g. processing documents are at page 2) no ajax calls or refreshes being executed

Done extracting triggers the message to user

Add new status/flag - being processed

Testing

Cypress e2e test

Integration level tests

PART 1: Given that Ella and Activity import are released, consolidate use of them to first upload all as unknowns, then configure all allocations using bulk

Assert That mapping of one document queues the background job

PART 2: Using data mapping model map first document

PART 3: Assert redirect to Document center and click view documents

PART 4: Without refreshing the page assert that eventually all documents turned green and there's a specific communication to the user

Assert Document Center sends calls and updates the table if there's a "being processed" document