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: CE-1296 add Inspector and Province-wide roles #857

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

mikevespi
Copy link
Contributor

@mikevespi mikevespi commented Jan 9, 2025

Added the "Inspector" and "Province-wide" roles.

Description

Two new roles were added to the system in preparation for new users being onboarded. The Province-wide role has the default filter of "Open" and in the case of COS, will hide the "Zone at a glance" page. The Inspector role gets the default filters of "Open" and their assigned region. The "Zone at a glance" page is available to them.

Fixes # (issue)

How Has This Been Tested?

With a clear cache, I assigned the following roles to myself and verified that the appropriate default filters were applied on initial login, as well as when changing complaint types for COS. Zone at a glance being present or not was also verified, along with that the page shows the correct zone when present.

  • COS Officer (Open, zone)
  • COS Officer + Inspector (Open, region)
  • COS Officer + Province-wide (Open, no ZaaG)
  • CEEB (Open, Officer assigned, no ZaaG)
  • CEEB + CEEB Compliance Officer (Open, no ZaaG)
  • CEEB + Province-wide (Open, , no ZaaG)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Further comments

This PR also fixed what appeared to be a bug of CEEB users not getting the officer assigned as a default filter.


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@@ -32,7 +32,7 @@ let initialState: ComplaintFilters = {
outcomeAnimalEndDate: undefined,
};

const mapFilters = (complaintFilters: Partial<ComplaintFilters>) => {
const convertFilterNames = (complaintFilters: Partial<ComplaintFilters>) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not that I oppose the change, but why?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm guessing because it neither calls the map function nor has anything to do with the map in the application.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

^ It was me who named it map in the first place I think, but when I got in there this time it felt wrong. This feels like a more accurate name.

@@ -32,7 +32,7 @@ let initialState: ComplaintFilters = {
outcomeAnimalEndDate: undefined,
};

const mapFilters = (complaintFilters: Partial<ComplaintFilters>) => {
const convertFilterNames = (complaintFilters: Partial<ComplaintFilters>) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm guessing because it neither calls the map function nor has anything to do with the map in the application.

Copy link

sonarqubecloud bot commented Jan 9, 2025

@afwilcox afwilcox merged commit 801ece5 into release/0.6.12 Jan 10, 2025
17 checks passed
@afwilcox afwilcox deleted the CE-1296-new-roles branch January 10, 2025 00:28
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.

3 participants