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

User Role being displayed in Pop, Plan and Fac #1854

Merged
merged 39 commits into from
Nov 21, 2024
Merged

Conversation

abishekTa-egov
Copy link
Contributor

@abishekTa-egov abishekTa-egov commented Nov 18, 2024

User Role being displayed in Pop, Plan and Fac and dropdown localizations

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced user role visibility in the UI for various components, including FacilityCatchmentMapping and PlanInbox.
    • Improved dropdown options and formula management in the MicroplanSearch component.
    • Added new CSS styles for better UI presentation, including new classes for specific use cases.
    • Introduced localization for action labels and dropdown options in user configurations.
    • Implemented a confirmation popup for unassigning users in the UserAccess and RoleTableComposer components.
    • Added functionality to manage facility assignment and unassignment with confirmation prompts.
    • Enhanced handling of user roles and mobile number validation in UserManagementConfig.
    • Updated tooltip placement flexibility in the VillageHierarchyTooltipWrapper component.
    • Enhanced user experience with clearer options for formula management in FormulaConfiguration.
    • Streamlined rendering and handling of formulas in the FormulaConfiguration component.
    • Improved clarity and functionality of the FacilityPopup component for KPI display.
    • Updated header display in MicroplanSearch to include a "SEARCH_" prefix.
  • Bug Fixes

    • Updated validation for mobile numbers in UserManagementConfig to ensure proper formatting.
    • Ensured consistent category naming in FormulaConfiguration.
  • Chores

    • Updated CSS stylesheet version to incorporate new styles and fixes.

@abishekTa-egov abishekTa-egov requested a review from a team as a code owner November 18, 2024 12:31
Copy link
Contributor

coderabbitai bot commented Nov 18, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request involve updates across multiple files in the health micro UI project. Key modifications include an updated CSS stylesheet version, enhancements to localization and validation logic in the UICustomizations object, and the introduction of user role displays in various components. Additionally, new styles have been added to the CSS, and the rendering logic in several components has been refined to improve user experience and interface clarity.

Changes

File Change Summary
health/micro-ui/web/micro-ui-internals/example/public/index.html Updated CSS link from version 0.1.36 to 0.1.38.
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js Updated action names to use internationalization keys; added mobile number validation; enhanced preProcess method.
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss Added new classes with specific styles; corrected syntax in .activity-grid.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js Prefixed category prop with "FORMULA_" in FormulaConfiguration.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js Updated rendering logic for formulas; refined dropdown options; enhanced deletion and addition processes.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js Updated action options to use constants; added getFacilitySearchRequest method; improved role handling.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js Added user role display; modified summary sub-heading; adjusted layout for new role information.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MicroplanSearch.js Updated header rendering to prepend "SEARCH_" to the translated label.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js Added user role display under campaign name; updated layout for new information.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js Restructured fetchStatusCount function; updated header to include user name and role; improved JSX readability.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js Added confirmation popup for unassigning users; refined state management for popup visibility.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/RoleTableComposer.js Added confirmation popup for unassigning employees; enhanced state management and user interface clarity.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js Enhanced facility assignment logic; added confirmation popup for unassignment; refactored assignment logic.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/VillageHierarchyTooltipWrapper.js Added placement prop for tooltip positioning; improved flexibility in rendering.

Possibly related PRs

Poem

🐰 In the garden of code, changes bloom bright,
Styles and roles dance in the soft moonlight.
With each little tweak, the UI takes flight,
A hop and a skip, all feels just right!
So here’s to the updates, let’s cheer with delight,
For a healthier app, shining ever so bright! 🌼✨


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: 14

🧹 Outside diff range comments (6)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (2)

Line range hint 441-452: Optimize role display using array methods

The current implementation for displaying roles can be simplified using array methods.

Consider this optimization:

  if (key === "Role") {
    return (
      <div>
-       {value.map((item, index) => (
-         <span key={index} className="dm-code">
-           {t(`MP_ROLE_${item.code}`)}
-           {index < value.length - 1 && ", "}
-         </span>
-       ))}
+       <span className="dm-code">
+         {value.map(item => t(`MP_ROLE_${item.code}`)).join(", ")}
+       </span>
      </div>
    );
  }
🧰 Tools
🪛 Biome

[error] 86-86: 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)


Line range hint 535-548: Standardize button styling

The button component uses empty strings for some props and inconsistent style objects. Consider standardizing the button props across the application.

Apply these improvements:

  <ButtonNew
-   className=""
    icon="ArrowForward"
-   iconFill=""
    isSuffix
    label={t(key)}
    onClick={() => console.log("temp action")}
-   options={[]}
-   optionsKey=""
    size="medium"
-   style={{}}
-   title=""
    variation="secondary"
  />
🧰 Tools
🪛 Biome

[error] 86-86: 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)

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js (1)

Line range hint 516-520: Consider enhancing error handling and state management

The Stepper implementation correctly uses the FORMULA_ prefix, but consider these improvements:

  1. Add error boundaries to handle rendering failures
  2. Implement loading states for category transitions
  3. Add proper cleanup in useEffect hooks for state management

Consider implementing these architectural improvements:

  1. Extract the formula prefix logic into a utility function for consistency
  2. Add error boundaries around the Stepper component
  3. Implement proper cleanup in useEffect hooks to prevent memory leaks
🧰 Tools
🪛 Biome

[error] 503-503: Unsafe usage of optional chaining.

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

(lint/correctness/noUnsafeOptionalChaining)

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)

Line range hint 728-732: Add key prop to ActionBar button

React requires a key prop for elements in an array to help with efficient rendering and updates.

          actionFields={[
-            <Button label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {
+            <Button key="back-button" label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {
              history.push(`/${window.contextPath}/employee/microplan/select-activity?microplanId=${url?.microplanId}&campaignId=${url?.campaignId}`);
            }} type="button" variation="primary" />,
          ]}
🧰 Tools
🪛 Biome

[error] 728-730: 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)

health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (2)

Line range hint 797-833: Improve the Actions dropdown implementation.

A few suggestions to enhance the code:

  1. Remove the hardcoded dummy file ID and handle the missing file ID case gracefully.
  2. Consider using React Router's useNavigate hook for navigation instead of directly manipulating window.history.
  3. Extract the options array outside the render function to prevent recreation on each render.
- const dummyFile = "c22a7676-d5d7-49b6-bcdb-83e9519f58df"
- const microplanFileId = row?.campaignDetails?.additionalDetails?.microplanFileId || dummyFile;
+ const microplanFileId = row?.campaignDetails?.additionalDetails?.microplanFileId;

+ const editOption = [{ code: "1", name: "MP_ACTIONS_EDIT_SETUP" }];
+ const viewOption = [{ code: "1", name: "MP_ACTIONS_VIEW_SUMMARY" }];
- let options = [];
- if (row?.status == "DRAFT") {
-   options = [{ code: "1", name: "MP_ACTIONS_EDIT_SETUP" }];
- } else {
-   options = [{ code: "1", name: "MP_ACTIONS_VIEW_SUMMARY" }];
- }
+ const options = row?.status === "DRAFT" ? editOption : viewOption;
🧰 Tools
🪛 Biome

[error] 803-803: 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)


Line range hint 863-896: Use template literals for localization keys.

Replace string concatenations with template literals for better readability and maintainability.

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_STATUS_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_STATUS_${value}`))}</p>;

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISEASE_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_DISEASE_${value}`))}</p>;

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_TYPE_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_TYPE_${value}`))}</p>;

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISTRIBUTION_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_DISTRIBUTION_${value}`))}</p>;
🧰 Tools
🪛 Biome

[error] 874-874: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between acec032 and bf6034f.

⛔ Files ignored due to path filters (1)
  • health/micro-ui/web/micro-ui-internals/packages/css/package.json is excluded by !**/*.json
📒 Files selected for processing (11)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (7 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MicroplanSearch.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (9 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js (1)

Pattern **/*.js: check

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

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MicroplanSearch.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.024Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.370Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
🪛 Biome
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js

[error] 863-863: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


[error] 874-874: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


[error] 885-885: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


[error] 896-896: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 602-602: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 728-730: 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)

🔇 Additional comments (9)
health/micro-ui/web/micro-ui-internals/example/public/index.html (1)

15-15: Verify the new CSS version availability and changes

The CSS version update from 0.1.36 to 0.1.37 should be verified to ensure it's published and accessible.

Additionally, please ensure that:

  1. The changes in version 0.1.37 have been tested with the user role display features
  2. There's a changelog or documentation for what changed between versions 0.1.36 and 0.1.37
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MicroplanSearch.js (1)

Line range hint 1-47: Verify implementation of user role display

The PR objective mentions displaying user roles in Pop, Plan, and Fac components, but this file doesn't implement that functionality.

Let's verify if the user role display is implemented elsewhere:

health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (1)

350-350: LGTM! Fixed missing closing brace.

The syntax fix for .activity-grid class properly closes the rule block.

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

Line range hint 519-534: Verify the commented-out popup functionality

The popup functionality is commented out and replaced with a console.log. This appears to be a temporary fix that needs to be properly addressed.

🧰 Tools
🪛 Biome

[error] 86-86: 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)

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js (1)

502-502: 🧹 Nitpick (assertive)

Verify consistent usage of FORMULA_ prefix across the codebase

While the prefix addition aligns with the PR objectives, we should ensure:

  1. The receiving component (FormulaConfiguration) properly handles the prefixed category
  2. Translation keys are updated to match the new prefixed format
  3. Proper null checking is implemented for undefined categories

Consider adding null checking:

-              category={`FORMULA_${ruleConfigurationCategories[formulaInternalKey - 1]?.category}`}
+              category={ruleConfigurationCategories[formulaInternalKey - 1]?.category ? 
+                `FORMULA_${ruleConfigurationCategories[formulaInternalKey - 1].category}` : 
+                ''}
✅ Verification successful

Let me gather more information about how the FORMULA_ prefix is used in the related files to verify consistency.


Based on the gathered information, I can now provide the final response:

The FORMULA_ prefix usage is consistent and correctly implemented

The code analysis shows that:

  1. The FORMULA_ prefix is consistently used across the microplan module for categories and translations
  2. The FormulaConfiguration component properly handles the prefixed categories in its rendering logic
  3. The prefix is used systematically in state management (FORMULA_CONFIGURATION)
  4. Translation keys are properly structured with the FORMULA_ prefix (e.g., FORMULA_VEHICLE_DESCRIPTION, FORMULA_CONFIGURATION_DESCRIPTION)

The optional chaining operator (?.) in the current implementation already provides sufficient null checking for undefined categories, making the previously suggested refactoring unnecessary.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent usage of FORMULA_ prefix and related translations

# Check for FORMULA_ prefix usage in components
echo "Checking for FORMULA_ prefix usage in components:"
rg -l "FORMULA_" --type js

# Check for translation keys with FORMULA_ prefix
echo "\nChecking for translation keys with FORMULA_ prefix:"
rg -l "FORMULA_.*:" public/localization/

# Check for potential undefined category handling
echo "\nChecking for category null checks:"
ast-grep --pattern 'category={`FORMULA_${$_}`}'

Length of output: 1430


Script:

#!/bin/bash
# Check how FORMULA_ prefix is used in FormulaConfiguration component
echo "FormulaConfiguration.js usage:"
rg "FORMULA_" -B 2 -A 2 health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js

echo "\nOther FORMULA_ usages in microplan module:"
rg "FORMULA_" -B 2 -A 2 health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/

# Check if there are any translation related files in the module
echo "\nChecking for localization files in microplan module:"
fd -e json -e js "local|i18n" health/micro-ui/web/micro-ui-internals/packages/modules/microplan/

Length of output: 15867

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)

87-87: LGTM: Consistent jurisdiction parameter handling

The mutation call now correctly includes the jurisdiction parameter for non-root approvers, maintaining data access control.


444-453: LGTM: Clear and efficient status condition check

The isStatusConditionMet function is well-structured with proper null checks and clear logic for validating status conditions.

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (2)

Line range hint 32-38: LGTM! Workflow implementation is robust

The workflow handling logic is well-implemented with proper:

  • Error handling
  • State management
  • User role-based action controls
  • Notification system

Also applies to: 560-586


578-586: LGTM! UI implementation is comprehensive

The UI components are well-structured with:

  • Proper data presentation
  • Clear user feedback mechanisms
  • Consistent styling
  • Intuitive user interactions

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: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between bf6034f and 1b6d691.

📒 Files selected for processing (3)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (11 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.024Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.370Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 602-602: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 728-730: 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)

🔇 Additional comments (6)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (6)

444-453: LGTM: Status condition check is well implemented

The isStatusConditionMet function effectively validates the status count conditions with proper null checks and logical evaluation.


541-551: LGTM: Header and role display implementation

The header section effectively displays the microplan name and user role information with proper translations.


562-570: Fix self-closing JSX element

The InboxFilterWrapper component should be self-closing as it doesn't have any children.

🧰 Tools
🪛 Biome

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


Line range hint 572-698: LGTM: Table and workflow components are well structured

The implementation of the table wrapper with conditional rendering of tabs, action buttons, and workflow popups is well organized and follows React best practices.


Line range hint 750-756: LGTM: Success navigation handling

The success navigation logic is well implemented with proper state management and translation support.


87-87: 🛠️ Refactor suggestion

Consider adding error handling for jurisdiction parameter

The jurisdiction parameter is conditionally included based on the user role, but there's no validation to ensure it's not undefined when required.

-                  : { jurisdiction: jurisdiction }),
+                  : { jurisdiction: jurisdiction?.length ? jurisdiction : [] }),

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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 1b6d691 and 19b744a.

📒 Files selected for processing (3)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (11 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.024Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.370Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 602-602: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 728-730: 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)

🔇 Additional comments (10)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (2)

174-183: Previous accessibility review comment is still valid

The role display UI needs accessibility improvements as mentioned in the previous review comment.

Let's verify the existence of required translation keys:

#!/bin/bash
# Description: Check if all required translation keys exist in the localization files

# Search for translation keys in localization files
echo "Searching for required translation keys..."
rg -l "LOGGED_IN_AS|NO_NAME_AVAILABLE|HCM_MICROPLAN_MICROPLAN_NAME_LABEL" -g "*.json"

155-168: ⚠️ Potential issue

Previous review comment is still valid with additional concerns

The role extraction logic needs improvement. In addition to the issues mentioned in the previous review comment, there are concerns about null safety when accessing user info.

Add null checks when accessing user info:

- const roles=Digit.UserService.getUser().info.roles;
- const userName=Digit.UserService.getUser().info.userName;
+ const roles = Digit.UserService.getUser()?.info?.roles ?? [];
+ const userName = Digit.UserService.getUser()?.info?.userName ?? 'Unknown User';
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (6)

87-87: LGTM: Proper jurisdiction handling based on user role

The conditional inclusion of jurisdiction parameter ensures root approvers have access to all data while other users are restricted to their jurisdiction.


111-124: Skip: Comment already exists

A previous review comment already addresses the need to remove or uncomment this code block.


524-536: Skip: Comment already exists

A previous review comment already suggests simplifying the role extraction logic using array methods.


541-551: LGTM: Well-structured header with proper i18n support

The header implementation properly displays user context and follows internationalization best practices.


728-730: 🛠️ Refactor suggestion

Add missing key prop to Button component in ActionBar

React requires a unique key prop for elements in an array to optimize rendering and reconciliation.

-            <Button label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {
+            <Button key="back-button" label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome

[error] 728-730: 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)


562-570: 🧹 Nitpick (assertive)

Fix self-closing JSX elements

The InboxFilterWrapper component should be self-closing as it doesn't have any children.

-        <InboxFilterWrapper
-          options={activeFilter}
-          onApplyFilters={onFilter}
-          clearFilters={clearFilters}
-          defaultValue={
-            selectedFilter === Object.entries(activeFilter)?.[0]?.[0] ? { [Object.entries(activeFilter)?.[0]?.[0]]: Object.entries(activeFilter)?.[0]?.[1] } : null
-          }
-        ></InboxFilterWrapper>
+        <InboxFilterWrapper
+          options={activeFilter}
+          onApplyFilters={onFilter}
+          clearFilters={clearFilters}
+          defaultValue={
+            selectedFilter === Object.entries(activeFilter)?.[0]?.[0] ? { [Object.entries(activeFilter)?.[0]?.[0]]: Object.entries(activeFilter)?.[0]?.[1] } : null
+          }
+        />

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (2)

563-573: ⚠️ Potential issue

Fix syntax error and handle edge case

  1. The closing bracket of the forEach is misaligned
  2. The logic doesn't handle the case when neither role is present

Apply this fix while also considering the previous review comment about simplifying the role determination logic:

-  roles.forEach(role => {
-    if (role.code === "ROOT_PLAN_ESTIMATION_APPROVER") {
-      userRole = "ROOT_PLAN_ESTIMATION_APPROVER";
-    } else if (userRole!== "ROOT_PLAN_ESTIMATION_APPROVER" && role.code === "PLAN_ESTIMATION_APPROVER") {
-      userRole = "PLAN_ESTIMATION_APPROVER";
-    
-  }});
+  const userRole = roles.some(role => role.code === "ROOT_PLAN_ESTIMATION_APPROVER") 
+    ? "ROOT_PLAN_ESTIMATION_APPROVER"
+    : roles.some(role => role.code === "PLAN_ESTIMATION_APPROVER")
+      ? "PLAN_ESTIMATION_APPROVER"
+      : "NO_ROLE";

578-586: 🧹 Nitpick (assertive)

Improve string template formatting

The template literals need proper spacing to improve readability. Also, consider using semantic HTML elements for better structure.

Apply this improvement while also considering the previous review comment about accessibility:

       <div className="role-summary-sub-heading">
           <div>
-          {`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName  || t("NO_NAME_AVAILABLE")}`}
+          {`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName || t("NO_NAME_AVAILABLE")}`}
           </div>
           <div>
-          {`${t("LOGGED_IN_AS")} ${t(userName)} - ${t(userRole)}`}
+          {`${t("LOGGED_IN_AS")} ${t(userName)} - ${t(userRole || "NO_ROLE")}`}
           </div>
         </div>

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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 19b744a and 8ef6e83.

📒 Files selected for processing (3)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (11 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/FacilityCatchmentMapping.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.024Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.370Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 602-602: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 728-730: 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)

🔇 Additional comments (7)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (5)

541-550: LGTM! User role display implementation

The implementation properly displays the user role and username in the header, with appropriate translations and structure.


652-698: LGTM! Workflow handling implementation

The workflow comment handling implementation is robust with proper error handling, success callbacks, and state management.


563-570: 🧹 Nitpick (assertive)

Use self-closing tag for InboxFilterWrapper

Since the component doesn't have any children, it should use a self-closing tag.

-        <InboxFilterWrapper
-          options={activeFilter}
-          onApplyFilters={onFilter}
-          clearFilters={clearFilters}
-          defaultValue={
-            selectedFilter === Object.entries(activeFilter)?.[0]?.[0] ? { [Object.entries(activeFilter)?.[0]?.[0]]: Object.entries(activeFilter)?.[0]?.[1] } : null
-          }
-        ></InboxFilterWrapper>
+        <InboxFilterWrapper
+          options={activeFilter}
+          onApplyFilters={onFilter}
+          clearFilters={clearFilters}
+          defaultValue={
+            selectedFilter === Object.entries(activeFilter)?.[0]?.[0] ? { [Object.entries(activeFilter)?.[0]?.[0]]: Object.entries(activeFilter)?.[0]?.[1] } : null
+          }
+        />

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome

[error] 563-570: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


728-730: 🛠️ Refactor suggestion

Add missing key prop to Button component in ActionBar

React requires a unique key prop for elements in an array to optimize rendering and reconciliation.

-            <Button label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {
+            <Button key="back-button" label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome

[error] 728-730: 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)


524-536: 🧹 Nitpick (assertive)

Simplify user role extraction logic

The current role extraction logic can be simplified using array methods for better readability and maintainability.

-  roles.forEach(role => {
-    if (role.code === "ROOT_POPULATION_DATA_APPROVER") {
-      userRole = "ROOT_POPULATION_DATA_APPROVER";
-    } else if (userRole !== "ROOT_POPULATION_DATA_APPROVER" && role.code === "POPULATION_DATA_APPROVER") {
-      userRole = "POPULATION_DATA_APPROVER";
-    }
-  });
+  userRole = roles.find(role => role.code === "ROOT_POPULATION_DATA_APPROVER")?.code || 
+             roles.find(role => role.code === "POPULATION_DATA_APPROVER")?.code || 
+             "";

Likely invalid or redundant comment.

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (2)

563-573: Previous refactoring suggestion is still valid

The current role determination logic can be simplified as suggested in the previous review.


578-586: 🧹 Nitpick (assertive)

Improve translation consistency

While the previous accessibility suggestions remain valid, also consider these translation improvements:

  1. The string concatenation for user role display could be handled more consistently using translation interpolation.
  2. The campaign name fallback could use a more specific translation key.
 <div className="role-summary-sub-heading">
     <div>
-    {`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName  || t("NO_NAME_AVAILABLE")}`}
+    {t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL_WITH_VALUE", { campaignName: campaignObject?.campaignName || t("HCM_MICROPLAN_NO_NAME_AVAILABLE") })}
     </div>
     <div>
-    {`${t("LOGGED_IN_AS")} ${userName} - ${t(userRole)}`}
+    {t("HCM_MICROPLAN_USER_ROLE_DISPLAY", { userName, userRole: t(userRole) })}
     </div>
 </div>

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: 0

🧹 Outside diff range comments (4)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (2)

Line range hint 379-394: Consider making phone validation more configurable

While the phone validation implementation is correct, consider these improvements:

  1. Move the regex pattern to a configuration to support different regional formats
  2. Localize the error message key

Example implementation:

 customValidationCheck: (data) => {
   const { phone } = data;
-  const mobileRegex = /^[0-9]{10}$/;
+  const mobileRegex = new RegExp(Digit.Config.PHONE_NUMBER_REGEX || '^[0-9]{10}$');
   
   if (!phone || phone.trim() === "") {
     return false;
   }
   
   if (!mobileRegex.test(phone)) {
-    return { error: true, label: "INVALID_MOBILE_NUMBER" };
+    return { error: true, label: t("CORE_COMMON_INVALID_MOBILE_NUMBER") };
   }
   
   return false;
 }
🧰 Tools
🪛 Biome

[error] 86-86: 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)


Line range hint 492-515: Add error handling for facility search request

The facility search request implementation needs improvement in error handling and API configuration:

  1. Consider moving the API endpoint to a configuration
  2. Add error handling for API failures
  3. Validate response structure before accessing nested properties

Example implementation:

 getFacilitySearchRequest: (prop) => {
   const tenantId = Digit.ULBService.getCurrentTenantId();
   const {campaignId} = Digit.Hooks.useQueryParams();
   return {
-    url: `/project-factory/v1/project-type/search`,
+    url: Digit.Config.API_ENDPOINTS.FACILITY_SEARCH || '/project-factory/v1/project-type/search',
     params: {  },
     body: {
       CampaignDetails: {
         "tenantId": tenantId,
         "ids": [campaignId]
       }
     },
     changeQueryName: `boundarySearchForPlanFacility`,
     config: {
       enabled: true,
       select: (data) => {
+        try {
+          if (!data?.CampaignDetails?.[0]?.boundaries) {
+            console.error('Invalid response structure');
+            return [];
+          }
           const result = data?.CampaignDetails?.[0]?.boundaries?.filter((item) => item.type == prop.lowestHierarchy) || [];
           return result;
+        } catch (error) {
+          console.error('Error processing facility data:', error);
+          return [];
+        }
       },
     },
   };
 }
🧰 Tools
🪛 Biome

[error] 86-86: 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)

health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (2)

Line range hint 797-833: Remove hardcoded fallback file ID and improve navigation handling.

Several improvements can be made to this code segment:

  1. The hardcoded dummy file ID should be removed from production code
  2. Direct window.location.href manipulation should be replaced with React Router navigation

Consider these improvements:

- const dummyFile = "c22a7676-d5d7-49b6-bcdb-83e9519f58df"
- const microplanFileId = row?.campaignDetails?.additionalDetails?.microplanFileId || dummyFile;
+ const microplanFileId = row?.campaignDetails?.additionalDetails?.microplanFileId;

- window.location.href = `/${window.contextPath}/employee/microplan/setup-microplan?key=${1}&microplanId=${row.id}...`
+ navigate(`/${window.contextPath}/employee/microplan/setup-microplan`, {
+   state: { key: 1, microplanId: row.id, campaignId: row.campaignDetails.id }
+ });

Line range hint 863-896: Use template literals for localization keys.

Replace string concatenation with template literals for better readability and maintainability.

Apply these changes:

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_STATUS_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_STATUS_${value}`))}</p>;

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISEASE_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_DISEASE_${value}`))}</p>;

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_TYPE_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_TYPE_${value}`))}</p>;

- return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISTRIBUTION_" + value))}</p>;
+ return <p>{t(Digit.Utils.locale.getTransformedLocale(`MICROPLAN_DISTRIBUTION_${value}`))}</p>;
🧰 Tools
🪛 Biome

[error] 874-874: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 8ef6e83 and 67bb03f.

📒 Files selected for processing (2)
  • health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (7 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (1)

Pattern **/*.js: check

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

Pattern **/*.js: check

🪛 Biome
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js

[error] 863-863: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


[error] 874-874: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


[error] 885-885: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)


[error] 896-896: Template literals are preferred over string concatenation.

Unsafe fix: Use a template literal.

(lint/style/useTemplate)

🔇 Additional comments (2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (2)

89-91: LGTM! Consistent use of localization keys

The implementation now consistently uses localization keys for both dropdown options and comparisons, addressing the previous review comments about string comparison inconsistency.

Also applies to: 108-116


Line range hint 516-567: Review and fix facility popup implementation

The facility popup implementation has several concerns:

  1. useState hook is used directly in a configuration object which is not a React component
  2. Click handler is commented out with a console.log placeholder
  3. Popup component might be causing crashes as indicated by the comment

Let's verify the popup component implementation:

Consider moving the popup logic to a separate React component:

-additionalCustomizations: (row, key, column, value, t, searchResult) => {
-  const [showPopup, setShowPopup] = useState(false);
-  const FacilityPopUp = Digit.ComponentRegistryService.getComponent("FacilityPopup");
+additionalCustomizations: (row, key, column, value, t, searchResult) => {
   switch (key) {
     case "MICROPLAN_FACILITY_SERVINGPOPULATION":
       return row?.additionalDetails?.servingPopulation;
     case "HCM_MICROPLAN_FACILITY_ACTION_ASSIGNMENT":
-      return (
-        <>
-          <ButtonNew
-            label={t(key)}
-            onClick={() => console.log("temp action")}
-            variation="secondary"
-          />
-          {showPopup && (
-            <FacilityPopUp
-              details={row}
-              onClose={() => {
-                setShowPopup(false);
-              }}
-            />
-          )}
-        </>
-      );
+      return <FacilityActionButton row={row} t={t} />;
     default:
       return null;
   }
 }

Create a new component for the facility action button:

const FacilityActionButton = ({ row, t }) => {
  const [showPopup, setShowPopup] = useState(false);
  const FacilityPopUp = Digit.ComponentRegistryService.getComponent("FacilityPopup");

  return (
    <>
      <ButtonNew
        label={t("HCM_MICROPLAN_FACILITY_ACTION_ASSIGNMENT")}
        onClick={() => setShowPopup(true)}
        variation="secondary"
      />
      {showPopup && (
        <FacilityPopUp
          details={row}
          onClose={() => setShowPopup(false)}
        />
      )}
    </>
  );
};
🧰 Tools
🪛 Biome

[error] 86-86: 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)

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 19, 2024
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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 67bb03f and d51223c.

📒 Files selected for processing (1)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js (6 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js (1)

Pattern **/*.js: check

🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js

[error] 323-352: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 328-328: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)


[error] 329-329: 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)


[error] 337-345: 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)


[error] 346-346: 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)

🔇 Additional comments (2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js (2)

1-1: LGTM: State management for confirmation popup

The new imports and state variables are properly structured to support the unassign confirmation feature.

Also applies to: 44-44, 235-235


120-126: LGTM: Improved unassign flow with confirmation

The unassign action now properly shows a confirmation popup before proceeding, improving user experience by preventing accidental unassignments.

Also applies to: 218-219

Copy link
Contributor

@nipunarora-eGov nipunarora-eGov left a comment

Choose a reason for hiding this comment

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

Check comments + add facility unassign popup

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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 25e154a and c050503.

📒 Files selected for processing (3)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (11 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigWrapper.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (2)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.024Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.370Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js

[error] 564-571: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 603-603: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 729-731: 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)

🔇 Additional comments (7)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js (5)

653-672: Workflow popup implementation looks good

The implementation correctly handles workflow actions and follows established error handling patterns from previous reviews.


729-731: 🛠️ Refactor suggestion

Add missing key prop to Button component

React requires a unique key prop for elements in an array to optimize rendering and reconciliation.

-            <Button label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {
+            <Button key="back-button" label={t(`HCM_MICROPLAN_POP_INBOX_BACK_BUTTON`)} onClick={() => {

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome

[error] 729-731: 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)


525-537: 🧹 Nitpick (assertive)

Simplify user role determination logic

The current role determination can be simplified using array methods for better readability and maintainability.

-  const roles = Digit.UserService.getUser().info.roles;
-  const userName = Digit.UserService.getUser().info.userName;
-  let userRole = "";
-
-  roles.forEach(role => {
-    if (role.code === "ROOT_POPULATION_DATA_APPROVER") {
-      userRole = "ROOT_POPULATION_DATA_APPROVER";
-    } else if (userRole !== "ROOT_POPULATION_DATA_APPROVER" && role.code === "POPULATION_DATA_APPROVER") {
-      userRole = "POPULATION_DATA_APPROVER";
-    }
-  });
+  const { roles, userName } = Digit.UserService.getUser().info;
+  const userRole = roles.find(role => role.code === "ROOT_POPULATION_DATA_APPROVER")?.code || 
+                   roles.find(role => role.code === "POPULATION_DATA_APPROVER")?.code || 
+                   "";

Likely invalid or redundant comment.


445-454: 🧹 Nitpick (assertive)

Status condition check implementation is correct

The implementation correctly validates status counts. Consider using a more concise implementation combining the conditions.

-  const isStatusConditionMet = (statusCount) => {
-    if (!statusCount || Object.keys(statusCount).length === 0) return false;
-    return Object.keys(statusCount).every(
-      (key) => (key === "VALIDATED" ? statusCount[key] > 0 : statusCount[key] === 0)
-    );
-  };
+  const isStatusConditionMet = (statusCount) => 
+    statusCount && 
+    Object.keys(statusCount).length > 0 &&
+    Object.keys(statusCount).every(
+      (key) => key === "VALIDATED" ? statusCount[key] > 0 : statusCount[key] === 0
+    );

Likely invalid or redundant comment.


563-571: 🧹 Nitpick (assertive)

Fix self-closing JSX element

The InboxFilterWrapper component should be self-closing as it doesn't have any children.

-        <InboxFilterWrapper
-          options={activeFilter}
-          onApplyFilters={onFilter}
-          clearFilters={clearFilters}
-          defaultValue={
-            selectedFilter === Object.entries(activeFilter)?.[0]?.[0] ? { [Object.entries(activeFilter)?.[0]?.[0]]: Object.entries(activeFilter)?.[0]?.[1] } : null
-          }
-        ></InboxFilterWrapper>
+        <InboxFilterWrapper
+          options={activeFilter}
+          onApplyFilters={onFilter}
+          clearFilters={clearFilters}
+          defaultValue={
+            selectedFilter === Object.entries(activeFilter)?.[0]?.[0] ? { [Object.entries(activeFilter)?.[0]?.[0]]: Object.entries(activeFilter)?.[0]?.[1] } : null
+          }
+        />

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome

[error] 564-571: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js (2)

639-649: Simplify role determination logic

The current role determination logic can be simplified as suggested in the previous review.


670-678: Enhance accessibility and i18n support in user info display

The user information display could benefit from improved accessibility and internationalization support as suggested in the previous review.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between c050503 and b713318.

📒 Files selected for processing (1)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (9 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (1)

Pattern **/*.js: check

🔇 Additional comments (2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (2)

533-533: LGTM!

The component export is correctly defined.


311-316: 🧹 Nitpick (assertive)

Simplify success message handling

The success message logic can be simplified using a ternary operator:

-if (facilityAssignedStatus) {
-  setShowToast({ 
-    key: "success", 
-    label: `${t("UNASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, 
-    transitionTime: 5000 
-  });
-} else {
-  setShowToast({ 
-    key: "success", 
-    label: `${t("ASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, 
-    transitionTime: 5000 
-  });
-}
+setShowToast({ 
+  key: "success", 
+  label: `${t(facilityAssignedStatus ? "UNASSIGNED_SUCESS" : "ASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, 
+  transitionTime: 5000 
+});

Likely invalid or redundant comment.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 21, 2024
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: 1

🧹 Outside diff range comments (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (1)

Line range hint 236-244: Enhance accessibility for village name display

Add ARIA labels to improve screen reader support for the village name and tooltip.

 {
   name: t("MP_FACILITY_VILLAGE"),
   cell: (row) => (
-    <div style={{ display: "flex", alignItems: "center", gap: ".5rem" }}>
+    <div 
+      style={{ display: "flex", alignItems: "center", gap: ".5rem" }}
+      role="cell"
+      aria-label={t("MP_FACILITY_VILLAGE")}
+    >
       <span>{t(`${row.boundaryCode}`)}</span>
-      <VillageHierarchyTooltipWrapper boundaryCode={row?.boundaryCode} />
+      <VillageHierarchyTooltipWrapper 
+        boundaryCode={row?.boundaryCode}
+        aria-label={t("VILLAGE_HIERARCHY_TOOLTIP")}
+      />
     </div>
   ),
   sortable: false,
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between b713318 and 3bfb19a.

📒 Files selected for processing (1)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (8 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (1)

Pattern **/*.js: check

🔇 Additional comments (8)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (8)

3-3: Skip comment - Import organization already addressed

Also applies to: 5-5


34-34: Skip comment - Duplicate component registration already addressed


35-35: Skip comment - State initialization improvements already addressed


310-315: Skip comment - Success message simplification already addressed


361-374: Skip comment - KPI parameters improvements already addressed


401-410: Skip comment - KPI card component extraction already addressed


532-532: LGTM! Component export follows best practices


73-84: 🧹 Nitpick (assertive)

Improve API configuration and error handling

Consider these improvements:

  1. Use object property shorthand
  2. Simplify the select function
  3. Add error handling for process instance search
 const { isLoading: isProcessLoading, data: processData, } = Digit.Hooks.useCustomAPIHook({
   url: "/egov-workflow-v2/egov-wf/process/_search",
   params: {
-    tenantId: tenantId,
+    tenantId,
     history: true,
-    businessIds: microplanId,
+    businessIds: microplanId
   },
   config: {
     enabled: true,
-    select: (data) => {
-      return data?.ProcessInstances;
-    },
+    select: data => data?.ProcessInstances,
+    onError: (error) => {
+      setShowToast({ 
+        key: "error", 
+        label: t("ERROR_WHILE_FETCHING_PROCESS"), 
+        transitionTime: 5000 
+      });
+    }
   },
 });

Likely invalid or redundant comment.

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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 3bfb19a and 3026ab0.

📒 Files selected for processing (1)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (8 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (1)

Pattern **/*.js: check

🔇 Additional comments (6)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (6)

3-3: Skip comment as issue was previously identified

Also applies to: 5-5


34-34: Skip comment as issue was previously identified


73-84: Skip comment as issue was previously identified


Line range hint 236-244: LGTM! Village name column with hierarchy tooltip

The implementation correctly combines the village name with a hierarchy tooltip for better user experience.


310-315: Skip comment as issue was previously identified


526-526: LGTM! Component export

The default export follows React conventions.

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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 5240361 and 2414749.

📒 Files selected for processing (1)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (8 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (1)

Pattern **/*.js: check

🔇 Additional comments (4)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FacilityPopup.js (4)

527-527: LGTM!

The export statement follows standard practices.


34-35: ⚠️ Potential issue

Remove duplicate component registration

The VillageHierarchyTooltipWrapper component is already imported via TooltipWrapper at line 3. Having multiple registrations could lead to maintenance issues.

-const VillageHierarchyTooltipWrapper = Digit.ComponentRegistryService.getComponent("VillageHierarchyTooltipWrapper");

Likely invalid or redundant comment.


361-374: 🧹 Nitpick (assertive)

Optimize KPI parameters updates

The KPI parameters state could benefit from memoization to prevent unnecessary re-renders.

+const getKpiParams = React.useCallback((details) => [
+  { key: "facilityName", value: details?.additionalDetails?.facilityName || t("NA") },
+  { key: "facilityType", value: details?.additionalDetails?.facilityType || t("NA") },
+  { key: "facilityStatus", value: details?.additionalDetails?.facilityStatus || t("NA")},
+  { key: "capacity", value: details?.additionalDetails?.capacity || t("NA") },
+  { key: "servingPopulation", value: details?.additionalDetails?.servingPopulation || t("NA") },
+  { key: "fixedPost", value: details?.additionalDetails?.fixedPost || t("NA") },
+  { key: "residingVillage", value: details?.residingBoundary || t("NA")}
+], [t]);

 useEffect(() => {
   if (details) {
-    setKpiParams([...]);
+    setKpiParams(getKpiParams(details));
   }
-}, [details]);
+}, [details, getKpiParams]);

Likely invalid or redundant comment.


310-315: 🧹 Nitpick (assertive)

Simplify success message handling

The success message logic can be simplified using a ternary operator, and unnecessary empty lines should be removed.

-if (facilityAssignedStatus) {
-  setShowToast({ key: "success", label: `${t("UNASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, transitionTime: 5000 });
-
-
-} else {
-  setShowToast({ key: "success", label: `${t("ASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, transitionTime: 5000 });
-}
+setShowToast({ 
+  key: "success", 
+  label: `${t(facilityAssignedStatus ? "UNASSIGNED_SUCESS" : "ASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, 
+  transitionTime: 5000 
+});

Likely invalid or redundant comment.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 21, 2024
@nipunarora-eGov nipunarora-eGov merged commit 427f95f into console Nov 21, 2024
3 checks passed
@nipunarora-eGov nipunarora-eGov deleted the abi-18-11 branch November 21, 2024 07:45
jagankumar-egov added a commit that referenced this pull request Dec 9, 2024
* fixed assumption audit fixes (#1758)

* fixed draft issue of Setup campaign (#1757)

Co-authored-by: Jagankumar <[email protected]>

* Summary css fix (#1755)

* updated css for summary screen

* removed log

* added null check

---------

Co-authored-by: rachana-egov <[email protected]>

* Breadcrumb for usermanagement (#1761)

* Breadcrumb changes

* console.log removed

* indentations

* Finalised microplan download (#1762)

* Feat : Added download button for finalised microplans

* Added Todo

* fixed HCMPRE-776 and removed updated old validation (#1763)

* fixed HCMPRE-776 and removed updated old validation

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update MyCampaign.js

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update CampaignDates.js

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update SetupCampaign.js

---------

Co-authored-by: Jagankumar <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix key (#1764)

Co-authored-by: NabeelAyubee <[email protected]>

* Fixed UiCustomisation Digit issue (#1766)

Checking UisCustomisation

* Fixed double selection of boundaries (#1765)

Update MultiSelectDropdown.js

* Fixed loader,breadcrumb,table cells css and added placeholder text fo… (#1769)

Fixed loader,breadcrumb,table cells css and added placeholder text for assumption fields

* fixed targetvalidation and added no results in boundary (#1768)

* Dynamic column pop inbox (#1770)

* Added dynamic column inside pop inbox

* updated status to action in status logs

* updated status log

* added comment logs for edit population

* updated css version

* updated code rabbit comment and css version

---------

Co-authored-by: rachana-egov <[email protected]>

* Feature/bug (#1773)

* z-index and camapaign-name in preview

* ui-ux-demo-review

* version updates

* ver

* Update ViewHierarchy.js

---------

Co-authored-by: Jagankumar <[email protected]>

* Updated the search dropdown (#1776)

updated the search dropdown

Co-authored-by: rachana-egov <[email protected]>

* Info ToolTip added (#1775)

* Added info icon on formula and assumptions

* Incremented CSS version

* Vesrion update (#1778)

* updated react-components version to fix icon issues in inbox screen

* updated versions everywhere

* myMicroplanFixes (#1777)

* My microplan data fixes, localisation fixes

* setup response screen fixes, breadcrumb localisation code correctify

* search bar fix

* fixes

* ADD NEW LOCALE

* roletable fixes for mobile number search, qa issue fix

* FIXES

* quickfixes

* quick fixes/ Tagging UI UX fixes

* fix

* added locale

* census table assignee issue fixes

* role table pop up css fix and my microplan click fix

* fixes and stepper click enable for back

* added user tag fixes

* UserAccessfixes

* Custom Assumption - Custom Formula

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Updated date formate (#1779)

* updated date formate and css

* updated css

---------

Co-authored-by: rachana-egov <[email protected]>

* Fix for cycle draft ::changes for the draft flow (#1780)

* Fixed assumption form multi save (#1781)

Update SetupMicroplan.js

* user tagging fixes (#1782)

Co-authored-by: NabeelAyubee <[email protected]>

* Usermanagement row on click redirect (#1783)

* Changes to usermanagement redirext on row click

* changes to onRow click in userManagement

* console removed

* changes

* null check

* changes

* removing extra mdms call

* changing useState

* removed var

* changes

* changes

* Plan and Pop inbox changes (#1784)

* removed popup for facilitya and population upload

* updated plan inbox

---------

Co-authored-by: rachana-egov <[email protected]>

* Feature/bugs (#1785)

* bug/boundary

* changed field name

* added something

* Update checklistSearchConfig.js

* Update ViewHierarchy.js

* fixes

* fixes1

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/ViewHierarchy.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Jagankumar <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fixed order in boundary details and changed hierarchy master (#1786)

* added the checks for the update campaign flow (#1788)

* Open Boundary Management ui Info pending changes  (#1789)

* pending changes

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useBoundaryHome.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/GeoPode.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/GeoPode.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Jagankumar <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Reverted action in assign to all, updated the column heading with pro… (#1790)

* reverted action in assign to all, updated the column heading with projecttype

* removed logs

---------

Co-authored-by: rachana-egov <[email protected]>

* Usermanagement css and boundaryScreen css (#1791)

Changes to userManagement, css for boundary

* Vehicle Change Assumptions & Formula (#1787)

* user tagging fixes

* Vehicle Assumptions and Vehicle Formula

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* yarn

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* css fixes (#1792)

Co-authored-by: Jagankumar <[email protected]>

* LCOALISATION FIXES (#1793)

* user tagging fixes

* Vehicle Assumptions and Vehicle Formula

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* yarn

* locaisaton code fixes

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* some-ui-fixes (#1794)

* some-ui-fixes

* version updates

* fixed boundary selection dropdown issue (#1796)

* fixed boundary selection dropdown issue

* fixed search juridiction dropdown

---------

Co-authored-by: rachana-egov <[email protected]>

* Allowed to update the name of microplan (#1795)

* Allowed to update the name of microplan

* changed hardcoded date to 30 from 100

---------

Co-authored-by: rachana-egov <[email protected]>

* demo issue fixes (#1797)

Co-authored-by: rachana-egov <[email protected]>

* ui fixes (#1798)

* Added retry of failed campaign

* stepper rvert back (#1799)

* ESTIMATION & FORMULA FIXES (#1804)

* user tagging fixes

* Vehicle Assumptions and Vehicle Formula

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* yarn

* locaisaton code fixes

* estimationa and formula fixes

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* error toast and checklist updates (#1805)

error taost and cehcklist updates

* HCMPRE 1131 (#1807)

* user tagging fixes

* Vehicle Assumptions and Vehicle Formula

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* yarn

* locaisaton code fixes

* estimationa and formula fixes

* my microplan fix

* fixes

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Updated sidebar for microplan (#1802)

* Updated sidebar for microplan

* Update index.scss

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Nipun Arora <[email protected]>

* style change of toolTip (#1806)

* toast and minor ui (#1809)

* ui/ux fixes (#1810)

* Changes to AssummptionList and stepper disable in setupConfig (#1811)

* Changes to assumptions list

* setupCompleted changes

* Formula View, and Select Acitivity Screen CSS changes (#1803)

* select-activity-commit

* Hover over formulaConfigView

* margin adjust

* removed console

* css changes

* package update

* changes to css

* package css update

* Revert "Allowed to update the name of microplan (#1795)" (#1812)

This reverts commit e32aad6.

Co-authored-by: Nipun Arora <[email protected]>

* updated message for header and label and added validation for max length (#1813)

* Cleaned up boundary Management code and add some validations

* redirect and ui (#1814)

* Assumptionlist fix (#1815)

changes

* changes in the delivery type and selection of boundary (#1816)

* to be picked (#1819)

* to be picked

* checklist and other changes

* role table fixes, drop down fix, pop up fix, use tag fix (#1820)

* user tagging fixes

* Vehicle Assumptions and Vehicle Formula

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/Hypothesis.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* yarn

* locaisaton code fixes

* estimationa and formula fixes

* my microplan fix

* fixes

* pull fixes

* user tag changes

* fixes

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fetch data type from mdms (#1822)

* fixed app delivery condition (#1825)

* not selected added in single value list (#1824)

* not selected added in single value list

* isActive added

* one more fix

* Facility dropdown (#1817)

* Added single dropdown in facilityCatchment

* tenantId fix

* Hierarchies fix

* Microplan name update (#1821)

* updated start date for campaign

* added update microplan name changes

---------

Co-authored-by: rachana-egov <[email protected]>

* Internal demo fixes (#1827)

* disabled the viewer card

* updated suggested microplan name formate

* updated assignee to assigner in timeline wrapper

* updated button side in my microplan screen

* updated sucurity and accessibility edit buttons

* commented tranportation mode from accessibility details

* added assignee next to village updated comment

* updated plan inbox

---------

Co-authored-by: rachana-egov <[email protected]>

* tenant logo css fix (#1828)

* Facility data fix (#1829)

FacilityData Fix

* Added boundary manager access to the home card

* Updated activity selection screen to have view also (#1830)

updated activity selection screen to have view also

Co-authored-by: rachana-egov <[email protected]>

* Added confirmation pop up to finalise actions (#1832)

added confimation pop up to finalize actions

Co-authored-by: rachana-egov <[email protected]>

* Popup for userAccess boundary area and toast message for assign unassign (#1831)

* Changed localization

* Loc

* Changes for popup in userAccess

* changes

* My MICROPLAN fixes, formula fixes (#1835)

* Hcmpre 1290 (#1834)

* fixed app delivery condition

* added my microplan screen

* changes in the url

* changes

---------

Co-authored-by: Jagankumar <[email protected]>

* Inbox (#1838)

* fixed app delivery condition

* fixed hover issue on search screen

* demo review changes in boudnary management (#1836)

* demo review changes in boudnary management

* different download template for hierarchy from geopode and completely new

* info cards added

* code clean

* Update searchSavedPlansWithCampaign.js (#1839)

Co-authored-by: Nipun Arora <[email protected]>

* Space (#1840)

* fixed app delivery condition

* added space

* fixed miner issues (#1837)

* fixed miner issues

* fixed pop inbox issue

* fixed status log issue

* Update PopInbox.js

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Nipun Arora <[email protected]>

* Update searchSavedPlansWithCampaign.js (#1841)

Co-authored-by: Nipun Arora <[email protected]>

* Gepspatial map view (#1842)

* added minor css changes and basic logic for geospatial view

* updated css version

* updated chooseactivity screen

* fixed syntax issue

* PO finding fixes (#1843)

* Fix campaign Type in draft (#1846)

* Plan Inbox patch fix (#1847)

* added workflow for toast message

* updated workflow button color

* added count for assign to me and all tabs

* added back button

---------

Co-authored-by: rachana-egov <[email protected]>

* Go Back button and microplan name quotes fix (#1844)

* Updated the core and other component version for landing page card  override

* Po finding fixes2 (#1845)

* added tooltip for residing boundary

* registered hierarchy tooltip inside component

* added different workflow message and alert header

* updated button color for workflow actions

* added info icons in select activity card

* added back button

* fixed action for facility

* updated css version

---------

Co-authored-by: rachana-egov <[email protected]>

* Summary user role tagging and Response Screen (#1852)

* Changes ro userAccessTableWrapper

* Response Screen

* comment removed

* minor updates (#1853)

Co-authored-by: Nipun Arora <[email protected]>

* toast localistaion (#1855)

* updated core component & css version

* updating the module versions

* Reverting the libraries version update

* Updated all the core component version from 1.8.3 to 1.8.10

* PO fixes (#1857)

* reverted column freeze as it was causing issues (#1858)

reverted column fix as it was causing issues

* Added column in sorted way, added assignee, added total pop (#1859)

Co-authored-by: NabeelAyubee <[email protected]>

* added serving facility (#1860)

Co-authored-by: NabeelAyubee <[email protected]>

* updated code (#1861)

* Formcomposer action bar fixes (#1862)

* added serving facility

* form composer action bar fix

---------

Co-authored-by: NabeelAyubee <[email protected]>

* Updated few localisation messages

* added loader screen to ftech data from microplan integration screen

* Updated UI Customizations file

* Approved microplan integration

* Added toast & success for api response

* plan inbox assignee fix (#1863)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

---------

Co-authored-by: NabeelAyubee <[email protected]>

* formula and assumption refresh issue (#1864)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

* formula and assumption refresh issue

---------

Co-authored-by: NabeelAyubee <[email protected]>

* minor changes (#1866)

* Action bar fixes, session fixes (#1867)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

* formula and assumption refresh issue

* action bar hidden fixes, session fixes

* Update index.js

* Update index.js

---------

Co-authored-by: NabeelAyubee <[email protected]>

* Download Button  (#1865)

* Loc changes to popInbox

* Loc

* Changes

* UICust update

* css package update

* Changes

* changes

* Update UICustomizations.js

* Name of file

* For Download update

* UI cust changes

* added return in UI

* Changes

---------

Co-authored-by: Nipun Arora <[email protected]>

* User Role being displayed in Pop, Plan and Fac (#1854)

* changes localizations

* Adding userName and their roles

* resolved conflict

* css package update

* UIcustomization dropdown changes

* pop-inbox changes

* package update

* loc added

* loc changes

* dropdown options changed

* UICust making same as in example

* UnassignPopup

* comments

* loc

* Loader added

* changes

* changes to roletablecomposer for unassign popup

* changes

* Facility Catchment

* reverted facility popup

* Changes

* KPI Card

* package update

* Facility data keys

* changes according to comments

* Changes

* rowOn click redirection

* Dummy Data removed

* removed import

* removed for residing boundary

* removed 5000

* package update for css

---------

Co-authored-by: Nipun Arora <[email protected]>

* fixes (#1869)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

* formula and assumption refresh issue

* action bar hidden fixes, session fixes

* fixes

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js

---------

Co-authored-by: NabeelAyubee <[email protected]>

* patch fix (#1868)

* route back to home on back

* fixed refresh issue for pop inbox

---------

Co-authored-by: rachana-egov <[email protected]>

* polling fix (#1870)

* polling fix

* Update TimelineComponent.js

* assumptions fixes (#1871)

Co-authored-by: Nipun Arora <[email protected]>

* Facility pop up fix (#1872)

* Localizations and Actions being cut (#1874)

* Changes

* Package update

* Disabled updating security and accessibility details after finalize  … (#1873)

Disabled updating security and accessibility details after finalize  facility catchment

Co-authored-by: rachana-egov <[email protected]>

* Update PopInbox.js (#1875)

Co-authored-by: Nipun Arora <[email protected]>

* scroll (#1876)

Co-authored-by: Nipun Arora <[email protected]>

* Update FacilityPopup.js (#1877)

* qquickfix (#1878)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

* formula and assumption refresh issue

* action bar hidden fixes, session fixes

* fixes

* fix

---------

Co-authored-by: NabeelAyubee <[email protected]>

* Updated the microplan integration piece

* adhoc changes (#1879)

* some fixes

* Update PlanInbox.js

* added checklist redirection (#1880)

* added checklist redirection

* removed console

* Updated workbench module version

* Plan and Pop inbox fix (#1881)

* fixed pop inbox boundary getting empty issue

* fixed back button issue

* updated search juridiction component

* fixed facility pop up boundary refresh

* removed pending for approval from status filter

---------

Co-authored-by: rachana-egov <[email protected]>

* updated table and other fixes (#1882)

* updated table and other fixes

* fixed table issue

* Latest KPI values and Heading change (#1883)

* Popup changed to alert type

* UserName to name

* userName to name

* changes to heading font wieght

* css package
update

* Removed i icon

* changes

* removed comments

* removed comments

* changes

* isLoading removed

* updated css

---------

Co-authored-by: Nipun Arora <[email protected]>

* Added count of villages and facilities in confirmation messages (#1885)

Co-authored-by: rachana-egov <[email protected]>

* Update UserUpload.js (#1886)

* fixed localization issue (#1888)

Co-authored-by: rachana-egov <[email protected]>

* Removed  Core HRMS and updated the timeout of fetch from microplan

* changed residing-boundary to multiselect dropdown, fixed table scroll… (#1889)

* changed residing-boundary to multiselect dropdown, fixed table scroll styles, made boundary selection popup dropdown searcheable

* fixed dropdown alignment

* fixed validation in boundary create and timeline button in the summary (#1890)

* fixed validation in boundary create and timeline button in the summary

* changed localisation condition

* Added missing the translation

* Added list of assignee for pop and plan inbox (#1887)

* added list of assignee for pop and plan inbox

* updated comments

* updated assignee for plan inbox

---------

Co-authored-by: rachana-egov <[email protected]>

* Re render assumption fix, atleast one mdms check, blank custom name check, (#1884)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

* formula and assumption refresh issue

* action bar hidden fixes, session fixes

* fixes

* fix

* action bar fix, formula next back issue

* assumption and formula one mdms check and refetch blank label check

* remove status log column

* fix

* adhoc fix

* fix

* fix

* del session

---------

Co-authored-by: NabeelAyubee <[email protected]>

* fixed validation cond for app (#1891)

* fixed filestore call issue (#1895)

* toast fix, user tagging table dropdown fix and added comment toast (#1896)

* FIXES (#1893)

* added serving facility

* form composer action bar fix

* plan inbox assignee fix

* formula and assumption refresh issue

* action bar hidden fixes, session fixes

* fixes

* fix

* action bar fix, formula next back issue

* assumption and formula one mdms check and refetch blank label check

* remove status log column

* fix

* adhoc fix

* fix

* fix

* del session

* FIXES
1. After clicking on nextin vehicle after addinginvalid valu3 it redirects me to 1st assumption page
2. yes no buttton ki jagah same rakho na dono pop up me in formula and assumption pop up
3. User can add same duplicate text assumption and same value comess. similary for same dropdowns can be selected multiple times(in vehicle). Applies for formula and assumption
4. cache issue in pop of add new in assumption and formula. Entered value is not reset if they close and reopen the popup. Applies for formula and assumption
5. need different loc code for description for vehicle assumption and vehicle estimation

* revert

* a

---------

Co-authored-by: NabeelAyubee <[email protected]>

* ui fixes. (#1897)

* ui fixes.

* review changes

* review changes1

* Fetch microplan related changes (#1898)

* mychange

* added changes for fetch from microplan screen

* updated packege

* added back button, redirected checklist success and fixed null issue … (#1894)

added back button, redirected checklist success and fixed null issue for app

* fixed finalized button issue (#1899)

* added fixes for the campaign update and fetch from mp

* added timeout cleaned up & fetch will start after the data template download

* Employee search fix (#1892)

* button change

* Changes

* Formula name validation

* Changes

* console log removed

* changes

* changes

* changes

* Original formula config

* Formula config change for toast

* Update FormulaConfiguration.js

---------

Co-authored-by: Nipun Arora <[email protected]>

* Bug fix (#1900)

* fixed decimal issue and total not getting validated issue

* fixed user tagging multiselect dropdown issue

---------

Co-authored-by: rachana-egov <[email protected]>

* Added few extra waiting steps for templates

* KPI card fix, and css change (#1903)

* Heading added

* changes to query, for kpi card

* css change

* css package update

* update to inbox codes (#1904)

updates

* Added dynamic columns in facility screen (#1902)

* Added dynamic columns in facility screen

* changed the filter condition

* Update FacilityPopup.js

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Nipun Arora <[email protected]>

* validations done for assumptions and formula (#1906)

Co-authored-by: Nipun Arora <[email protected]>

* localisation and error codes (#1905)

* Added fixes for timeout and redirection for fetch microplan (#1901)

* Added fixes for timeout and redirection for fetch microplan

* Update useFetchFromMicroplan.js

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Added fixes for the template generation

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/fetchFromMicroplan.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* updated

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* wait and retry message (#1909)

* Updated toast wran to warning message toast type

* checking popup issue in facility screen (#1910)

Co-authored-by: Swathi-eGov <[email protected]>

* Adhoc fixes 91 (#1912)

* updates to validation

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* updated regex

---------

Co-authored-by: Nipun Arora <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Pop inbox Pagination fix (#1907)

Co-authored-by: rachana-egov <[email protected]>

* Facility Pagination Fix (#1908)

Co-authored-by: rachana-egov <[email protected]>

* Feature/er (#1914)

* wait and retry message

* type of structure changed for irs

* fixed plan inbox issues (#1915)

Co-authored-by: rachana-egov <[email protected]>

* Table changes (#1913)

* a lot of changes

* small change

* changes

* loc

* removed

* added fixes for sort, view summary issue, no results in dropdown (#1916)

added fixes

* fixed facility catchment pop up issue (#1917)

Co-authored-by: rachana-egov <[email protected]>

* Fixed Audit issues (#1918)

Co-authored-by: rachana-egov <[email protected]>

* removed alphanumeric valiadtion (#1922)

Co-authored-by: Nipun Arora <[email protected]>

* updated the loader screen loader styles as per ux audit

* Kpis integrate (#1919)

* Kpis integration

* Some style changes

* Some validations

* Remove console

* Removed merged changes

* Data null handled

* Data null handled

* Assumption Toast Validation and Irs removed 1 (#1921)

* changes

* changes

* changes

* Fixed accessibility dropdown issue (#1923)

Co-authored-by: rachana-egov <[email protected]>

* Added extra steps and styles updated

* Added toast and changes primary, seccondary in Assumption,Formula (#1924)

* changes

* changes

* changes

* changes

* Changed hierarchy schema for microplan (#1925)

* Changed hierarchy schema for microplan

* Update UserUpload.js

* removed duplicate campaignId

---------

Co-authored-by: rachana-egov <[email protected]>

* Fixed small issues (#1927)

Co-authored-by: rachana-egov <[email protected]>

* Audit fixes main (#1926)

* audit fixes

* fixed campaign details css issue

* Update health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* updated core, react-components,ui-components and releated css versions

* added icon for download and changed primary to secondary for action button

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* width fix for module card (#1929)

* Formula Checking Fix (#1930)

* small changes

* changes

* changes

* Edit Size button changed (#1931)

changes

* Update HypothesisWrapper.js (#1932)

Co-authored-by: Nipun Arora <[email protected]>

* Feature/fixes (#1928)

* microplan hover and campign fixes with checklist minor improvements

* bottom margin below add levels

* review changes

* Updates to formula (#1933)

* Update HypothesisWrapper.js

* Update FormulaConfigWrapper.js

---------

Co-authored-by: Nipun Arora <[email protected]>

* fixed pop issue (#1934)

Co-authored-by: rachana-egov <[email protected]>

* css fix on card comp (#1935)

* Updated the campaign Card for the roles mapping

* Fixed screen breaking issue (#1936)

Co-authored-by: rachana-egov <[email protected]>

* validation update (#1937)

Update HypothesisWrapper.js

* Fixed assignee count for pop and plan inbox (#1938)

* Fixed assignee count for pop and plan inbox

* fixed back button issue in plan inbox

* removed logs

---------

Co-authored-by: rachana-egov <[email protected]>

* Changes in facility kpis (#1939)

* Changes in facility kpis

* Some changes

* fixed product chip and summary issue (#1941)

fixed productchip and summary issue

* Mdms kpi (#1942)

* Kpis from mdms

* Some optimizations

* Update health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useKpiDssSearch.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Dropdown popup fixes (#1943)

* removed custom loader, updated dropdown styles inside popup,fixed action drodpown css

* updated css version

* Added inline validations (#1944)

Co-authored-by: rachana-egov <[email protected]>

* Added refetch (#1945)

* Assumption formula fixes (#1946)

* added a toast on back button

* updated formula source to CUSTOM when any custom assumption is used in

---------

Co-authored-by: Nipun Arora <[email protected]>

* Update createUpdatePlanProject.js (#1948)

Co-authored-by: Nipun Arora <[email protected]>

* Fixed back button and edit population error message logic (#1949)

* fixed back button and edit population error message logic

* updated back button in facility screen

* added show on ui conditions on fields

* added translation function

---------

Co-authored-by: rachana-egov <[email protected]>

* localizations for user management and user tag (#1950)

* Loc in userManagement

* Changes to user tag loc

* added status filters (#1952)

* additional validations on assumptions + showing formulas in plan inbox based on show on estimation dashboard (#1953)

additional validations

* Updated Bread crumbs (#1954)

* fixed back button and edit population error message logic

* Updated breadcrumbs

* removed unused import

---------

Co-authored-by: rachana-egov <[email protected]>

* sort issue fix, title for buttons, actionbar fix (#1955)

* Patch fix (#1956)

* added list of roles for assigner

* added null check

---------

Co-authored-by: rachana-egov <[email protected]>

* Popup fix (#1958)

* fixed popup scroll issue

* updated versions

* Changes for kpis (#1960)

* Fixed toast issue + fixed invalidation of assumption and formula (#1963)

Co-authored-by: Nipun Arora <[email protected]>

* Updated the loader text, updated the icon information, change log updated

* fixed error message issue (#1964)

Co-authored-by: rachana-egov <[email protected]>

* Adhoc fixes 13: Fixed formula custom cascading changes + validations  (#1966)

* updated toast error in formulas

* Update createUpdatePlanProject.js

* updated mdms paths (#1968)

* Update searchDssChartV2.js (#1969)

* fixed resources,delivery screen issue and added campaign name (#1965)

* fixed resources,delivery screen issue and added campaign name

* added classname

* Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundarySummary.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* removed logs

---------

Co-authored-by: Jagankumar <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* bug bash bug of download popup openinng again and again (#1961)

* bug bash bug of download popup openinng again and again

* review changes

* Update UploadData.js

---------

Co-authored-by: Jagankumar <[email protected]>

* changes from count to quantity (#1970)

* changes from count to quantity

* removed logs

* Feature/time (#1971)

* timeline fix for microplan

* ui

* Update campaign.scss

---------

Co-authored-by: Jagankumar <[email protected]>

* added campaign name in update (#1973)

* Updated loc codes (#1976)

Update Module.js

* Revert module changes for localisation (#1977)

Revert "Updated loc codes (#1976)"

This reverts commit cf596aa.

* Added fix for the buil issue for trying out the optional deepndency #1974 (#1978)

Added fix for the buil issue for trying out the optional deepndency

* Some handlings (#1980)

* Updated hrms path (#1979)

updated hrms path

Co-authored-by: rachana-egov <[email protected]>

* removed commented code

* fixed usermanagement toast issue (#1982)

* removed commented code

* Added core ui build to check performance

* Fixed error issue (#1983)

* updated the package version of campaign manager modules

* adding utils and remove hardcoding module name (#1984)

* adding utils and remove hardcoding module name

* Update UICustomizations.js

* Update index.js

---------

Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: Jagankumar <[email protected]>

* added title for all buttons (#1985)

* updated package versions

* filtering fixes (#1986)

Co-authored-by: NabeelAyubee <[email protected]>

* Updated the config for the core app

* updated directory

* Feature/hcmpre1418 (#1988)

rounding off to nearest integer in attributes

* formatted

* Update health/micro-ui/web/core/install-deps.sh

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health/micro-ui/web/core/install-deps.sh

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* updated changeQueryName for planfacilityserach as residingBoundaries … (#1989)

* updated changeQueryName for planfacilityserach as residingBoundaries is changed to multiselect dropdown

* fixed length change issue

* fixed page responsiveness issue for formula configuration screen (#1990)

* clearing console (#1991)

Co-authored-by: NabeelAyubee <[email protected]>

* fixed rerendering of summary screen in update dates (#1992)

---------

Co-authored-by: Swathi-eGov <[email protected]>
Co-authored-by: Bhavya-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: abishekTa-egov <[email protected]>
Co-authored-by: ashish-egov <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <[email protected]>
Co-authored-by: NabeelAyubee <[email protected]>
Co-authored-by: suryansh-egov <[email protected]>
Co-authored-by: Nipun Arora <[email protected]>
Co-authored-by: Swathi-eGov <[email protected]>
Co-authored-by: Shashwat Mishra <[email protected]>
Co-authored-by: Anuraj <[email protected]>
Co-authored-by: Bhavya-egov <[email protected]>
@nabeelmd-eGov nabeelmd-eGov mentioned this pull request Dec 10, 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