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(#6543): add back breadcrumbs for users with many facilities #9093

Open
wants to merge 12 commits into
base: 6543-multi-facility
Choose a base branch
from

Conversation

latin-panda
Copy link
Contributor

@latin-panda latin-panda commented May 3, 2024

Description

  • The scope of this work is breadcrumbs in Reports, Message and Tasks pages.
  • This PR implements the support for when a user has many facility IDs assigned. The rules are:
    • If the user is online, leave breadcrumbs as they are.
    • If the user is offline but has multiple facilities, leave breadcrumbs as they are.
    • If the user is offline but only 1 facility is assigned, remove the last piece of the breadcrumb if the name is the same as the user's facility.
  • To assign more than one facility to a user:
    • Go to couchdb, find the _users database, find the offline user org.couchdb:<username>
    • Make facility_id an array and add the IDs: "facility_id: [ "id-1", "id-2" ]
      • the facility should be at the same level in the hierarchy.
    • Go find the medic database, find the offline user org.couchdb:<username>
    • Make facility_id an array and add the IDs: "facility_id: [ "id-1", "id-2" ]. It should match with the one in _users db.

Videos:

#6543

Code review checklist

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

Compose URLs

If Build CI hasn't passed, these may 404:

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@latin-panda
Copy link
Contributor Author

@Benmuiruri @ralfudx can you please review? Thanks!

@latin-panda latin-panda marked this pull request as ready for review May 6, 2024 14:43
@latin-panda latin-panda requested review from lorerod and removed request for ralfudx May 6, 2024 15:04
@latin-panda
Copy link
Contributor Author

I had a quick chat with @lorerod, she will have a look instead of @ralfudx.
Thanks @lorerod!!

@latin-panda
Copy link
Contributor Author

BTW @lorerod the contacts page is still not working - @Benmuiruri is fixing that in this other PR.

This job is only about breadcrumbs in Reports, Message and tasks pages. [I have updated the PR decription]

Copy link
Contributor

@Benmuiruri Benmuiruri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@lorerod lorerod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

… into breadcrumbs-multi-facility

# Conflicts:
#	webapp/src/ts/modules/reports/reports.component.ts
#	webapp/src/ts/modules/tasks/tasks.component.ts
#	webapp/tests/karma/ts/modules/tasks/tasks.component.spec.ts
@latin-panda
Copy link
Contributor Author

@Benmuiruri, Same here. This has been rebased, and the tests are working. It's ready. Just waiting for 6543-multi-facility.

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

Successfully merging this pull request may close these issues.

Update Breadcrumbs to accommodate users with multiple facility_ids
4 participants