Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Support offline in forms dashboard #1437

Merged
merged 8 commits into from
Nov 9, 2023

Conversation

icrc-jofrancisco
Copy link
Contributor

@icrc-jofrancisco icrc-jofrancisco commented Oct 27, 2023

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This pull request addresses several issues related to offline application support and enhances the rendering of sections within forms dashboard. The changes ensure a smoother user experience, particularly when users are offline.

  1. Starting Visits:
  • When initiating a visit for a patient, the behavior now differs based on the user's online status:
    • When online, the application loads the available visit types from the server as usual.
    • When offline, only the "Offline" visit type is available, eliminating unnecessary options.
      Additionally (shen offline), selecting a location when starting a visit will have the authenticated user's location. This change prevents errors when attempting to select other locations.
  1. Forms Dashboard:
  • The forms dashboard has been updated to improve offline usability.
    • When online, the application continues to load all available forms from the server as before.
    • When offline, only forms previously marked as available for offline use are displayed, streamlining form access.
  1. Enhanced Section Rendering:
  • Previously, if a user had no access to any forms, sections were still rendered, accompanied by a warning message. This PR addresses this issue by removing the redundant warning message. eg:
image
  • If a user doesn't have access to any forms, the warning will be displayed, simplifying the interface:

image

Screenshots

Related Issue

Other

Thanks,
CC: @ibacher

@ibacher
Copy link
Member

ibacher commented Nov 9, 2023

Could you look into fixing the failing test or moving it as appropriate?

@ibacher ibacher changed the title (chore) Support offline in forms dashboard (feat) Support offline in forms dashboard Nov 9, 2023
@ibacher ibacher merged commit 881258a into openmrs:main Nov 9, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants