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

Added CustomErrorComponent, RoleBasedEmployeeHome, css enhancement #1407

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

nabeelmd-eGov
Copy link
Contributor

No description provided.

@nabeelmd-eGov nabeelmd-eGov requested a review from a team as a code owner September 19, 2024 18:15
Copy link
Contributor

coderabbitai bot commented Sep 19, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

Walkthrough

The changes involve updates to CSS stylesheets and enhancements to various components within the micro-ui-internals package. Key modifications include version updates for CSS files, the introduction of new hooks for tenant configuration, and improvements in error handling and user interface components. New classes and routes have been added to enhance visual presentation and user experience, while existing functionalities have been refined to support better data management and access control.

Changes

Files Change Summary
micro-ui/web/micro-ui-internals/example/public/index.html Updated CSS stylesheet links for @egovernments/digit-ui-components-css and digit-ui-css to newer versions.
micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss Added new styles for error alerts and employee cards, including layout adjustments and standardized text alignment.
micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js Added useInitTenantConfig hook to enhance tenant configuration initialization.
micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js Introduced useInitTenantConfig hook to fetch tenant configuration data.
micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js Added export for useInitTenantConfig from the hooks module.
micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js Introduced getTenantConfig method to retrieve tenant configuration based on state code and enabled modules.
micro-ui/web/micro-ui-internals/packages/modules/core/src/App.js Added a new route for handling invalid URLs, rendering CustomErrorComponent.
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/CustomErrorComponent.js Introduced CustomErrorComponent for displaying user-friendly error messages with internationalization support.
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js Modified employee module links to include dynamic icons and replaced EmployeeModuleCard with LandingPageCard.
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/configs/UICustomizations.js Enhanced handleRedirect function to include event handling and modified URL construction to include a new module query parameter.
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/ModuleMasterTable.js Updated URL construction logic to focus on specific module context.
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/SetupMaster.js Added access control management hook and updated UI feedback for popups based on access control state.
micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/moduleMasterConfig.js Added module property to the configuration object in moduleMasterConfig.

Possibly related PRs

🐰 "In the garden of code, changes bloom bright,
With CSS updates, the styles take flight.
New hooks for tenants, and errors to mend,
A rabbit's delight, as the features extend!
Hopping through components, with joy we embrace,
Each line of code adds a magical grace!" 🐇✨


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Outside diff range and nitpick comments (4)
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (1)

91-102: Consider removing the commented code.

The commented code block contains the previous implementation of rendering the module cards using the EmployeeModuleCard component. It is generally recommended to remove commented code from the codebase to improve code readability and maintainability.

Apply this diff to remove the commented code:

-          {/* {Object.keys(configEmployeeSideBar)?.map((current, index) => {
-            const moduleData = configEmployeeSideBar?.[current];
-            const propsForModuleCard = {
-              // Icon: moduleData?.icon,
-              icon: "SupervisorAccount",
-              moduleName: t(moduleData?.label),
-              metrics: [],
-              links: moduleData.links,
-            };
-            return <LandingPageCard buttonSize={"medium"} {...propsForModuleCard} />;
-            // return <EmployeeModuleCard {...propsForModuleCard} />;
-          })} */}
micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js (3)

66-67: Remove unnecessary commented-out code

The commented-out code on lines 66-67 is no longer needed and can be removed to improve code readability.

Apply this diff:

-  // throw new Error("Invalid URL")
-  // return;

Line range hint 98-144: Refactor digitInitData to eliminate code duplication

The digitInitData function contains duplicated logic in both the inline fetchTenantConfig function and the default initData assignment. This redundancy can make the code harder to maintain and understand. Consider refactoring to consolidate the initData construction logic.

Suggested approach:

  • Merge the common parts of initData construction into a single function or block.
  • Utilize parameters to adjust values based on tenantConfigFetch without duplicating code.
  • This refactoring will improve readability and maintainability.

175-178: Add braces to if statement for clarity

It's recommended to use braces {} around the code block following an if statement, especially when it spans multiple lines, to enhance readability and prevent potential errors.

Apply this diff:

-if (typeof moduleCode !== "string")
-  moduleCode.forEach((code) => {
-    moduleCodes.push(modulePrefix ? `${modulePrefix}-${code.toLowerCase()}` : `${code.toLowerCase()}`);
-  });
+if (typeof moduleCode !== "string") {
+  moduleCode.forEach((code) => {
+    moduleCodes.push(modulePrefix ? `${modulePrefix}-${code.toLowerCase()}` : `${code.toLowerCase()}`);
+  });
+}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bf1faa4 and ac32647.

Files ignored due to path filters (7)
  • micro-ui/web/micro-ui-internals/example/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/css/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/core/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/sandbox/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json is excluded by !**/*.json
Files selected for processing (14)
  • micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js (2 hunks)
  • micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js (4 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/core/src/App.js (2 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/core/src/components/CustomErrorComponent.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (3 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/configs/UICustomizations.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/ModuleMasterTable.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/SetupMaster.js (3 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/moduleMasterConfig.js (1 hunks)
  • micro-ui/web/public/index.html (1 hunks)
Files skipped from review due to trivial changes (2)
  • micro-ui/web/micro-ui-internals/example/public/index.html
  • micro-ui/web/public/index.html
Additional context used
Path-based instructions (11)
micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/core/src/App.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/core/src/components/CustomErrorComponent.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/configs/UICustomizations.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/ModuleMasterTable.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/SetupMaster.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/moduleMasterConfig.js (1)

Pattern **/*.js: check

Biome
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js

[error] 85-85: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/configs/UICustomizations.js

[error] 240-261: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Unsafe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

Additional comments not posted (23)
micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js (2)

1-1: LGTM!

The import statement is syntactically correct and the import path is valid. The addition of useInitTenantConfig is consistent with the list of alterations provided.


3-3: LGTM!

The export statement is syntactically correct. The addition of useInitTenantConfig to the exports is consistent with the import statement and the list of alterations provided.

micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js (1)

21-31: LGTM! The new useInitTenantConfig hook is a valuable addition.

The introduction of the useInitTenantConfig hook enhances the modularity and reusability of the codebase by allowing tenant-specific configurations to be easily initialized and accessed. The hook is well-structured, follows best practices, and integrates seamlessly with the existing code patterns.

Some key benefits of this hook include:

  • Efficient data fetching and caching using useQuery with a unique key.
  • Prevention of unnecessary data refetching with an infinite stale time configuration.
  • Conditional enabling based on the multi-root tenant feature, ensuring appropriate usage.
  • Providing loading, error, and data states for consuming components to handle appropriately.

Overall, this is a great addition to the codebase!

micro-ui/web/micro-ui-internals/packages/modules/core/src/components/CustomErrorComponent.js (1)

8-47: LGTM!

The CustomErrorComponent is well-structured and follows best practices for React functional components. The use of useTranslation hook for internationalization and the useLocation hook for retrieving the current location's state are good practices. The component uses a configuration object to define the error's visual elements, which is a good practice for maintainability. The use of Background wrapper and Card component for layout ensures consistent and appealing presentation of error messages.

Overall, the component enhances the application's error handling by providing a structured and localized way to inform users of issues, along with a clear action to take in response.

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/ModuleMasterTable.js (1)

30-30: Verify the handling of the new module parameter.

The change in the URL construction logic to include the module parameter looks good. It potentially enhances the specificity of the data being accessed or displayed based on the module context.

Please ensure that the receiving component or route handler is updated to handle the new module parameter correctly. You can use the following script to search for the usage of the module parameter:

Verification successful

Verification successful: module parameter is handled consistently

The codebase appears to be properly set up to handle the new module parameter. Multiple components, including SetupMaster.js and ModuleMasterTable.js, are using this parameter in their routing logic. The module context is being maintained across different views and passed to various routes, which aligns with the change we initially reviewed.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for the usage of the `module` parameter in the codebase.

# Test: Search for the `module` parameter usage in the route handlers and components.
# Expect: Occurrences of the `module` parameter being accessed and used correctly.
rg --type js $'module=\$\{module\}' -A 10

Length of output: 7156

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/config/moduleMasterConfig.js (1)

107-107: LGTM! The addition of the module property to the actions column configuration object is a useful enhancement.

This change allows the actions column to access the module value directly from the configuration object, which may facilitate better handling or customization of actions associated with different modules in the application management context.

micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (3)

2-2: LGTM!

The import statement for the LandingPageCard component is correct.


51-60: LGTM!

The logic for setting the link and icon properties based on the linkUrl is implemented correctly. The selected icons are appropriate for the corresponding keywords in the linkUrl.


76-86: LGTM!

The logic for creating the children variable by mapping over the configEmployeeSideBar object is implemented correctly. The LandingPageCard component is used appropriately to render each module card with the necessary properties defined in the propsForModuleCard object.

Tools
Biome

[error] 85-85: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

micro-ui/web/micro-ui-internals/packages/modules/core/src/App.js (2)

8-8: LGTM!

The import statement for CustomErrorComponent is syntactically correct and aligns with the PR objective of handling invalid URLs.


102-104: Great work on adding the route for handling invalid URLs!

The new route is defined correctly and aligns perfectly with the PR objective. It enhances the application's routing capabilities and improves the user experience by providing a dedicated error component for invalid URLs.

The route integrates seamlessly into the existing routing structure, making it a valuable addition to the codebase.

micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js (2)

7-7: LGTM!

The import statement for the newly added useInitTenantConfig hook is syntactically correct. This hook will now be available for consumption by other modules that import from this file.


170-170: Verify the implementation and test the newly exported hook.

The export statement for the newly added useInitTenantConfig hook is syntactically correct. This hook will now be available for consumption by other modules that import the Hooks object.

However, it's crucial to ensure that the useInitTenantConfig hook is implemented correctly in the ./store module and thoroughly tested before consuming it in other modules to avoid any potential issues.

micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss (6)

341-352: LGTM!

The styles for error alerts look good. Using a red color for the alert heading effectively distinguishes error messages from regular alerts and aligns with common UI conventions.


354-356: Verify the fixed width in the context of the overall design.

Setting a fixed width for error cards is a good approach to ensure consistent sizing and layout. The chosen width of 35rem seems reasonable, but please verify that it aligns well with the overall design and layout of the application.


357-359: LGTM!

Centering the button horizontally using margin: auto is a simple and effective approach for error messages or alerts. The styles look good.


360-363: LGTM!

Using flexbox with a column direction is a good approach for vertically stacking elements within the employee card on the landing page. It allows for easy alignment and spacing of the card's content. The styles look good.


364-366: LGTM!

Centering the text within the card header using text-align: center is a good approach to improve readability and visual balance. The styles look good.


367-369: LGTM!

Centering the text within the card using text-align: center is a good approach to improve readability and visual consistency. The styles look good.

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/applicationMgmt/SetupMaster.js (3)

14-14: LGTM!

The useAccessControl hook is a great addition to manage user permissions dynamically. The refetch function can be used to ensure that the latest access control state is always reflected in the UI.


67-67: LGTM!

Calling refetch() in the onSuccess callback is a good practice to ensure that the access control data is refreshed after a successful operation. This improves the responsiveness of the application to user actions.


167-167: LGTM!

The conditional class assignment for the PopUp component based on the showPopUp state is a nice touch. It allows for more nuanced styling of the popup and enhances the user experience by visually distinguishing between different types of messages.

micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/configs/UICustomizations.js (1)

240-261: LGTM!

The changes to the handleRedirect function improve the functionality and robustness of the redirect logic. The addition of the module query parameter provides more context to the redirected page. The changes do not introduce any new issues or bugs.

The static analysis hint about wrapping the function declaration in a block is a false positive because the function is already wrapped in a block (the additionalCustomizations function). The function is not accessible outside the switch clause.

Also applies to: 264-264

Tools
Biome

[error] 240-261: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Unsafe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

Comment on lines +15 to +25
const ModuleBasedErrorConfig = {
sandbox: {
imgUrl: `https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png`,
infoHeader: "WRONG_TENANT_SIGN_UP",
infoMessage: "WRONG_TENANT_SIGN_UP_MESSAGE",
buttonInfo: "WRONG_TENANT_SIGN_UP_BUTTON",
action: () => {
history.push(`/${window.globalPath}/`);
},
},
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider making the error handling more generic to improve reusability.

The error handling in the CustomErrorComponent is specific to a "sandbox" module, which might limit its reusability in other parts of the application. Consider making the error handling more generic by allowing the configuration object to be passed as a prop to the component. This way, the component can be reused for different types of errors across the application.

return <LandingPageCard buttonSize={"medium"} {...propsForModuleCard} />;
// return <EmployeeModuleCard {...propsForModuleCard} />;
})} */}
{React.Children.map(children, (child) => React.cloneElement(child))}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a key property to the elements in the iterable.

When rendering elements in an iterable using React.Children.map, it is recommended to provide a unique key property to each element. The key helps React efficiently update and reorder the list if needed.

Apply this diff to add a key property to the elements:

-{React.Children.map(children, (child) => React.cloneElement(child))}
+{React.Children.map(children, (child, index) => React.cloneElement(child, { key: index }))}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{React.Children.map(children, (child) => React.cloneElement(child))}
{React.Children.map(children, (child, index) => React.cloneElement(child, { key: index }))}

Comment on lines +180 to +185
modules:
typeof moduleCode == "string"
? modulePrefix
? [`${modulePrefix}-${moduleCode.toLowerCase()}`]
: [`${moduleCode.toLowerCase()}`]
: moduleCodes,
Copy link
Contributor

Choose a reason for hiding this comment

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

Simplify nested ternary operators for better readability

The nested ternary operators in lines 181-185 make the code difficult to read and maintain. Consider refactoring the logic using clearer conditional statements.

Refactored code:

let modulesList;
if (typeof moduleCode === "string") {
  if (modulePrefix) {
    modulesList = [`${modulePrefix}-${moduleCode.toLowerCase()}`];
  } else {
    modulesList = [`${moduleCode.toLowerCase()}`];
  }
} else {
  modulesList = moduleCodes;
}
const LocalePromise = LocalizationService.getLocale({
  modules: modulesList,
  locale: language,
  tenantId: stateCode,
});

This approach improves readability and makes future maintenance easier.

Comment on lines +98 to +100
if (tenantConfigFetch) {
const tenantConfig = await StoreService.getTenantConfig(stateCode, enabledModules); // Await the async call
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove redundant call to StoreService.getTenantConfig

The call to StoreService.getTenantConfig on line 99 is redundant because its result is not utilized. Additionally, getTenantConfig is called again inside fetchTenantConfig(), leading to an unnecessary API call.

Apply this diff to remove the redundant call:

-if (tenantConfigFetch) {
-  const tenantConfig = await StoreService.getTenantConfig(stateCode, enabledModules); // Await the async call
-}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (tenantConfigFetch) {
const tenantConfig = await StoreService.getTenantConfig(stateCode, enabledModules); // Await the async call
}

@jagankumar-egov jagankumar-egov merged commit ff2e006 into develop Sep 20, 2024
2 checks passed
@jagankumar-egov jagankumar-egov deleted the sandbox-enhancement branch September 20, 2024 05:23
This was referenced Sep 20, 2024
@coderabbitai coderabbitai bot mentioned this pull request Sep 27, 2024
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