-
Notifications
You must be signed in to change notification settings - Fork 19
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
Tenant info screen #1388
Tenant info screen #1388
Conversation
WalkthroughWalkthroughThe changes introduce enhancements to the tenant management functionality within the application. A new Changes
Possibly related PRs
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/setupMasterConfig.js (1)
79-129
: LGTM! The new configuration section for tenant management looks good.The added configuration section follows the same structure as other sections in the file and enhances the application's capability to manage tenant-related operations. The metadata properties provide relevant information, and the action arrays define the necessary operations for creating, viewing, and editing organizations.
To further improve the code, consider adding type definitions for the configuration object. This will enhance type safety and make the code more maintainable. For example:
interface SetupMasterConfig { tenantId: string; moduleName: string; SetupMaster: { header: string; subHeader?: string; module: string; active: boolean; description: string; masterDescription: string; actionText: string; features?: { id: number; name: string; }[]; add_organization?: { id: number; name: string; }[]; view_organization?: { id: number; name: string; }[]; edit_organization?: { id: number; name: string; }[]; }[]; } export const setupMasterConfig: SetupMasterConfig = { // ... };
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/components/SandboxCard.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/setupMasterConfig.js (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/index.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/tenantMgmt/TenantInfoCard.js (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/tenantMgmt/config/tenantInfoConfig.js (1 hunks)
Additional context used
Path-based instructions (5)
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/components/SandboxCard.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/tenantMgmt/config/tenantInfoConfig.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/index.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/setupMasterConfig.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/tenantMgmt/TenantInfoCard.js (1)
Pattern
**/*.js
: check
Additional comments not posted (7)
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/components/SandboxCard.js (3)
17-25
: LGTM!The
propsForSandbox
array is correctly defined with the necessary properties for each sandbox link. Theroles
property is appropriately set toROLES.SUPERUSER
to restrict access to users with the "SUPERUSER" role.
25-25
: LGTM!The filtering of the
propsForSandbox
array based on user roles is implemented correctly. TheDigit.Utils.didEmployeeHasAtleastOneRole
method is used appropriately to check if the user has at least one of the required roles for each link. Links without any specified roles are included by default.
47-47
: LGTM!The spreading of the filtered
propsForSandbox
array into thepropsForModuleCard.links
array is a clean and concise way to integrate the sandbox links into the existing module card structure.micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/tenantMgmt/config/tenantInfoConfig.js (1)
1-80
: LGTM! The configuration object is well-structured and organized.The
tenantInfoConfig
object follows a consistent and organized structure for defining modules and their associated features. This approach offers several benefits:
- It facilitates easy management and configuration of tenant-related functionalities.
- It allows for the setup and activation of various modules within the application.
- It provides a clear and organized representation of the available modules and their associated features.
The use of the
SetupMaster
array and the structured module objects within it enhances the maintainability and extensibility of the configuration.Great job on creating a well-designed configuration object!
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/index.js (2)
14-14
: LGTM!The import statement for the
TenantInfocard
component is correctly added.
58-58
: The new route for the tenant info page looks good!
- The route path
${path}/tenant-management/info
follows the existing pattern and is consistent with other routes.- The
PrivateRoute
component is correctly used to restrict access to authenticated users.- The
TenantInfocard
component is correctly rendered for this route.This new route enhances the tenant management functionality by providing a dedicated page for tenant information, aligning with the PR objective.
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/tenantMgmt/TenantInfoCard.js (1)
1-73
: LGTM!The
TenantInfocard
component is well-structured, follows best practices, and enhances the user experience by providing a clear and organized presentation of tenant management options. The code is clean, readable, and promotes reusability and maintainability.Some key observations:
- Effective utilization of React hooks and integration with external libraries for state management and internationalization.
- Retrieval of necessary data from the URL's search parameters and the current tenant ID.
- Clean and readable rendering logic with conditional rendering based on the presence of data in the configuration object.
- Correct implementation of the button click handler to navigate the user to the desired route for creating a new tenant management entry.
Overall, the component integrates well with the existing application architecture and follows best practices for React development.
…ages/employee/tenantMgmt/config/tenantInfoConfig.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mithunhegde-egov can u share the screenshot of this screen ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
info screens should be reusable, but here config is not that generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tenant info screen added. on click of setup from info page routes to create tenant screen.