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

Add /user_details path to router and remove sub-menu items and adjust breadcrumbs #1542

Open
3 tasks done
MCatherine1994 opened this issue Aug 16, 2024 · 4 comments · Fixed by #1589
Open
3 tasks done
Assignees

Comments

@MCatherine1994
Copy link
Contributor

MCatherine1994 commented Aug 16, 2024

Describe the task

Action Button w/ Icon

For each row on the user table, under the Action column, add a button with "Rewind" icon, when a user clicks on the button, it navigates the users to the path described below.

Path

Add the /user-details/users/{userId}/applications/{applicationId} route to frontend with a placeholder View component.
The path is named with consideration that the page will eventually display User roles and User history
Image

## Sub-menu item removal
Remove any sub menu items that shows up dynamically, such as Add application admin, if a user is under the add application admin page, the Manage permission menu item should be active (highlighted). We could considering changing the route path too, for example, at the moment we have https://fam.nrs.gov.bc.ca/grant-app-admin, there are 2 improvements we can make, 1) match the page name with /add-application-admin, 2) specify layers with manage-permissions/add-application-admin

Image

Adjust breadcrumbs

Our current breadcrumbs display an inactive crumb for the current page, which is redundant and does not align with the FDS design system. Remove current page's "crumb" on all pages
Image

Remove any sub-menu items and adjust breadcrumbs to now show the current page

Acceptance Criteria

  • Action button added for each row
  • Path added to route the new component
  • [ ] All sub-menu items should be removed, the parent menu item will be active (highlighted) instead
  • Adjust breadcrumbs so the current page is not shown

Additional context

@ianliuwk1019 ianliuwk1019 self-assigned this Sep 9, 2024
@craigyu craigyu changed the title Add side navigation and icon link to user access history page Add /user_details path to router and remove sub-menu items and adjust breadcrumbs Sep 9, 2024
@ianliuwk1019
Copy link
Collaborator

The change of the requirement from previous with "Path" to be /user-details/users/{userId}/applications/{applicationId} does introduce some complexity.
To be fair, It is a good intention. I also had that thought in the past for frontend but didn't get to do frontend much so didn't discover issue facing below. However, currently our frontend does not have this kind of way of path for navigation.

When I tried to implement it as /user-details/users/{userId}/applications/{applicationId} for example, when clicking the history button to navigate to the page with browser address bar as: /user-details/users/9/applications/2, it works.
But with this, we will need to deal with user manually enter different path or ids. Even when right in the history page and hit browser refresh, the whole "routing" is broken and page is lost.

I also tried to implement routing as query param (instead of path param) /user-details?userId={userId}&applications={applicationId}, this can be routed to the history page, but the query parameter disappear after routing. This seems to be a bug within Vue Router itself.

Both problem currently I didn't find a way to resolve them yet. I think maybe we like to discuss this tomorrow to see which way to go and can create issue ticket to separately deal with it if we think it is complicated.
@craigyu @OlgaLiber2

@OlgaLiber2
Copy link
Collaborator

OlgaLiber2 commented Sep 10, 2024

page title, user summary and history table with simplified data for the version with are working on @ianliuwk1019 @craigyu
Image

@ianliuwk1019
Copy link
Collaborator

Bug issue #1588 created due to a bug seen from this ticket.
@craigyu @OlgaLiber2

@ianliuwk1019
Copy link
Collaborator

As discussed with Craig, the highlight for SideNav on parent item when in the new user details page might need a bit of work and refactoring.
Will leave this requirement out from this ticket and move into either building new history page ticket #1540 or separate itself into individual ticket to deal with.

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

Successfully merging a pull request may close this issue.

3 participants