Default action if UI tries to load data while offline

Description

If a user tries to load data while offline, there should be an alert notifying the user they are offline.

Overall the experience is that if a user takes an action that starts a HTTP request to a OpenLMIS Server URL (or external URL) while they are offline, an Alert modal will open that reads "This action can't be completed while offline." with a button that says "OK".

The HTTP requests will be cancelled/rejected/failed if the user is offline, and there will be no attempt to re-try the action.

Since some actions might run multiple http requests at the same time, there should be some code to make sure only a single Alert is shown to the user.

This is an experiment to see if this can be an acceptable fallback experience, so a quick first draft is ideal.

Acceptance Criteria

  • A logged in user is on a administration page, they go offline after the administration page has loaded, then click the save/submit button on the administration page — an alert modal is shown, telling the user that their action can't be completed offline.

  • Only one offline alert modal is shown to the user at a time.

Attachments

2

QAlity Plus - Test Management

Checklists

Activity

Paulina BorowaFebruary 28, 2017 at 10:15 AM

Now all looks fine

Mateusz KwiatkowskiFebruary 27, 2017 at 2:54 PM

The problem was with trying to retrieve requisition which isn't stored offline. I've added redirecting user to 404 page to match online behavior.

Paulina BorowaFebruary 27, 2017 at 1:56 PM

last thing I hope! when I am on requisition view screen or on approve view and have list of requisitions I to click on the "View Requisition" button (while offline) and there is no reaction, there should be also modal with properly information for user.

Mateusz KwiatkowskiFebruary 27, 2017 at 12:21 PM
Edited

It turned out that there was reject missing in some method and it wasn't related to my changes, but I've fixed that . Should be working now. I'm moving it to QA.

Paulina BorowaFebruary 24, 2017 at 12:24 PM

When I am on Manage POD screen while I am offline I select facility and program and click search button, appears modal with information and loading icon which not disappears at all even when I'm back online.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

1d 5h 30m logged

Components

Sprint

Fix versions

Priority

Time Assistant

Created November 22, 2016 at 7:08 PM
Updated March 1, 2017 at 12:32 PM
Resolved February 28, 2017 at 10:15 AM