Add staff users and staff roles pages to ui-staff user management section#257
Open
ttrang-nguyen wants to merge 154 commits into
Open
Add staff users and staff roles pages to ui-staff user management section#257ttrang-nguyen wants to merge 154 commits into
ttrang-nguyen wants to merge 154 commits into
Conversation
…ify ADR entry in readme
… into rohit-r-kumar/issue212
…signment functionality
…cellixjs into rohit-r-kumar/issue250
Contributor
|
@copilot review |
Contributor
Reviewed the branch at |
- Introduced ActivityLogEntry interface and updated StaffUserDetail to display activity logs. - Enhanced StaffUserDetailContainer to manage and pass activity log data. - Updated GraphQL schema to include activityByStaffUserDisplayName. - Refactored tests to cover new activity log functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to staff user authentication, authorization, and theming in the UI. The main changes include the addition of a robust permissions hook for staff users, refactoring of staff route logic to use these permissions for access control and default routing, and enhancements to theme management via a shared utility. There are also updates to code generation and testing configurations.
Staff authentication and permissions:
useStaffPermissionshook that fetches the current staff user's roles and permissions from the backend, normalizes them, and exposes them for use throughout the app. This ensures consistent and centralized permission checks.App.tsxto use the new permissions hook, providing permission-based routing and default route selection for staff users. The newStaffRoutesandStaffSectioncomponents dynamically render routes based on permissions and show a loading spinner while permissions are loading. [1] [2] [3]AuthLandingcomponent to use the new permissions hook, redirecting users to the appropriate landing page based on their permissions or to/unauthorizedif access is denied.Theme management improvements:
theme-storage.tsmodule to@cellix/ui-corethat providesloadStoredThemeandsaveStoredThemeutilities for consistent theme persistence. [1] [2]ui-communityandui-staffapps to use these new utilities, improving type safety and code reuse. Theme type is now strictly typed and stored/retrieved via the shared utility. [1] [2] [3] [4] [5] [6]Code generation and testing configuration:
codegen.ymlto include staff user types and generate hooks for shared staff components, supporting improved type safety and developer experience. [1] [2]vitest.config.tsto exclude e2e tests from the test suite, improving test performance and accuracy.Other improvements:
clearscript tocleanfor consistency.These changes collectively improve the maintainability, security, and user experience of the staff-facing UI.