Skip to content

Conversation

@Hari-egov
Copy link
Contributor

@Hari-egov Hari-egov commented Jul 29, 2025

Choose the appropriate template for your PR:

Feature/Bugfix Request

JIRA ID
CCSD-530 , CCSD -528

Module
Workbench

Description

[1.0.27] [29-Jul-2025]

  • File Upload Issues Resolved & Edit MDMS view incorrect data fix

Summary by CodeRabbit

  • Bug Fixes

    • Resolved file upload issues and corrected data display in the Edit MDMS view within the Workbench module.
  • Style

    • Applied consistent max-width and padding to DatePicker fields in the HRMS module for improved layout.
  • New Features

    • Improved form data handling in Workbench forms, ensuring updates are managed internally and changes are propagated externally.
    • Enhanced user experience in the localisation add page by resetting selections and disabling download when the module dropdown is shown.

* CCSD-508

* digit-ui-module-hrms": "1.8.15

* removed change log

* digit-ui-module-hrms": "1.8.16"
- File Upload Issues Resolved & Edit MDMS view incorrect data fix
@Hari-egov Hari-egov requested a review from a team as a code owner July 29, 2025 06:20
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

📝 Walkthrough

Walkthrough

Styling updates were applied to DatePicker fields in HRMS components by introducing a max-width and padding. Workbench module received a changelog update and a bugfix entry. The DigitJSONForm component was refactored to encapsulate form data state and propagate changes. LocalisationAdd.js now resets certain states when a modal opens.

Changes

Cohort / File(s) Change Summary
HRMS DatePicker Styling
.../SelectDateofEmployment.js, .../assignment.js
Added a fieldStyle object with maxWidth and paddingRight applied to DatePicker field containers for consistent styling.
HRMS Changelog
.../hrms/CHANGELOG.md
Added a changelog entry for v1.8.16 noting max-width styling for DatePicker fields.
Workbench Changelog
.../workbench/CHANGELOG.md
Added a changelog entry for v1.0.27 documenting file upload and Edit MDMS view data display fixes.
Workbench DigitJSONForm Refactor
.../workbench/src/components/DigitJSONForm.js
Renamed state variable, introduced internal form data handler, and updated Form props to encapsulate and propagate form data changes.
Workbench Localisation Modal Reset
.../workbench/src/pages/employee/LocalisationAdd.js
Added useEffect to reset module selection and disable download when the module dropdown modal is shown.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LocalisationAdd
    participant Modal

    User->>LocalisationAdd: Triggers module dropdown modal (showModuleDropdownModal = true)
    LocalisationAdd->>LocalisationAdd: useEffect runs
    LocalisationAdd->>LocalisationAdd: isDownloadDisabled = true
    LocalisationAdd->>LocalisationAdd: choosenModule = null
    LocalisationAdd->>LocalisationAdd: jsonResult = null
    LocalisationAdd->>LocalisationAdd: jsonResultDefault = null
    LocalisationAdd-->>User: UI reflects reset state
Loading
sequenceDiagram
    participant Parent
    participant DigitJSONForm
    participant Form

    Parent->>DigitJSONForm: Passes formData and onFormChange
    DigitJSONForm->>DigitJSONForm: Initializes internalFormData with formData
    Form->>DigitJSONForm: onChange (formData)
    DigitJSONForm->>DigitJSONForm: Updates internalFormData
    DigitJSONForm->>Parent: Calls onFormChange with new formData
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny hops through fields of code,
With styles applied and states bestowed.
DatePickers now with max-width grace,
Forms refactored, bugs erased.
Modals reset with gentle care—
All is tidy, light as air!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch CCSD-530

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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: 2

🔭 Outside diff range comments (1)
micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js (1)

393-393: Fix reference to renamed variable.

The handleConfirm function references updatedData which was renamed to internalFormData, causing a runtime error.

Apply this diff to fix the reference:

-    Object.assign(formData, updatedData); 
+    Object.assign(formData, internalFormData); 
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 22bae4a and 825a564.

⛔ Files ignored due to path filters (7)
  • micro-ui/web/core/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/example/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/hrms/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json is excluded by !**/*.json
  • micro-ui/web/package.json is excluded by !**/*.json
  • micro-ui/web/sandbox/package.json is excluded by !**/*.json
  • micro-ui/web/workbench/package.json is excluded by !**/*.json
📒 Files selected for processing (6)
  • micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (2 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js (3 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js (3 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationAdd.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js

⚙️ CodeRabbit Configuration File

check

Files:

  • micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationAdd.js
  • micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js
🧠 Learnings (7)
📓 Common learnings
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/configs/UICustomizations.js:22-130
Timestamp: 2025-02-05T10:26:52.452Z
Learning: UI customizations in DIGIT-Frontend should not be restructured at this time as a new methodology for formcomposer will be implemented in the future.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:157-162
Timestamp: 2025-07-15T06:50:54.535Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), localization is already working correctly when using `ele.hierarchyType` directly in the `gethierarchylistdata()` function. The suggested locale conversion using `Digit.Utils.locale.convertToLocale(ele.hierarchyType, 'EGOV_LOCATION_BOUNDARYTYPE')` is not needed as the current implementation already provides proper localization.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1779
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js:19-28
Timestamp: 2024-11-08T07:49:53.969Z
Learning: In `FileComponent.js`, the `formatDate` function receives a date string that is always a valid date entity, so additional input validation and error handling are unnecessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:26-26
Timestamp: 2025-07-15T04:58:30.634Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the team has moved away from using MDMS hooks for boundary data fetching and now uses direct API calls to the boundary service endpoint `/boundary-service/boundary-relationships/_search` instead of the `useHrmsMDMS` hook with "FetchBoundaries" parameter.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:43-74
Timestamp: 2025-07-15T06:49:28.898Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the current error handling approach in the `fetchDetailsForSelectedOption` function is considered sufficient by the team. Enhanced error handling with user notifications and fallback behavior is not required for the boundary service API call.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md (6)

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:26-26
Timestamp: 2025-07-15T04:58:30.634Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the team has moved away from using MDMS hooks for boundary data fetching and now uses direct API calls to the boundary service endpoint /boundary-service/boundary-relationships/_search instead of the useHrmsMDMS hook with "FetchBoundaries" parameter.

Learnt from: jagankumar-egov
PR: #2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.

Learnt from: rachana-egov
PR: #1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js, the data?.additionalFields object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:43-74
Timestamp: 2025-07-15T06:49:28.898Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the current error handling approach in the fetchDetailsForSelectedOption function is considered sufficient by the team. Enhanced error handling with user notifications and fallback behavior is not required for the boundary service API call.

micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md (3)

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: jagankumar-egov
PR: #2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.

micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (10)

Learnt from: rachana-egov
PR: #1779
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js:19-28
Timestamp: 2024-11-08T07:49:53.969Z
Learning: In FileComponent.js, the formatDate function receives a date string that is always a valid date entity, so additional input validation and error handling are unnecessary.

Learnt from: rachana-egov
PR: #1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js, the data?.additionalFields object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: jagankumar-egov
PR: #2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a defaultTenant variable to store Digit.ULBService.getStateId() instead of calling the function multiple times inline in the defaultValue object. This improves code readability and avoids function call duplication.

Learnt from: jagankumar-egov
PR: #2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.

Learnt from: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:157-162
Timestamp: 2025-07-15T06:50:54.535Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), localization is already working correctly when using ele.hierarchyType directly in the gethierarchylistdata() function. The suggested locale conversion using Digit.Utils.locale.convertToLocale(ele.hierarchyType, 'EGOV_LOCATION_BOUNDARYTYPE') is not needed as the current implementation already provides proper localization.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:26-26
Timestamp: 2025-07-15T04:58:30.634Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the team has moved away from using MDMS hooks for boundary data fetching and now uses direct API calls to the boundary service endpoint /boundary-service/boundary-relationships/_search instead of the useHrmsMDMS hook with "FetchBoundaries" parameter.

Learnt from: siddhant-nawale-egov
PR: #876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The CustomScaleControl component in the micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.

micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js (12)

Learnt from: Tulika-eGov
PR: #2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/configs/UICustomizations.js:22-130
Timestamp: 2025-02-05T10:26:52.452Z
Learning: UI customizations in DIGIT-Frontend should not be restructured at this time as a new methodology for formcomposer will be implemented in the future.

Learnt from: Tulika-eGov
PR: #2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: jagankumar-egov
PR: #2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a defaultTenant variable to store Digit.ULBService.getStateId() instead of calling the function multiple times inline in the defaultValue object. This improves code readability and avoids function call duplication.

Learnt from: jagankumar-egov
PR: #2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.

Learnt from: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.

Learnt from: nabeelmd-eGov
PR: #1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the UICustomizations.js file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.

Learnt from: rachana-egov
PR: #1779
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js:19-28
Timestamp: 2024-11-08T07:49:53.969Z
Learning: In FileComponent.js, the formatDate function receives a date string that is always a valid date entity, so additional input validation and error handling are unnecessary.

Learnt from: siddhant-nawale-egov
PR: #698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in MicroplanPreview.js are from different libraries: @egovernments/digit-ui-components and @egovernments/digit-ui-react-components.

Learnt from: rachana-egov
PR: #1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In PopInboxTable.js, the showEditVillagePopup state variable is initialized as an empty object.

Learnt from: rachana-egov
PR: #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.023Z
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.

micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationAdd.js (10)

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: rachana-egov
PR: #1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js, the data?.additionalFields object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.

Learnt from: Tulika-eGov
PR: #2188
File: micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintSubType.js:14-14
Timestamp: 2025-02-05T10:05:37.433Z
Learning: In PGR's useComplaintSubType hook, the translation function 't' must be included in the useEffect dependency array to ensure complaint types are updated when the language changes.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:157-162
Timestamp: 2025-07-15T06:50:54.535Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), localization is already working correctly when using ele.hierarchyType directly in the gethierarchylistdata() function. The suggested locale conversion using Digit.Utils.locale.convertToLocale(ele.hierarchyType, 'EGOV_LOCATION_BOUNDARYTYPE') is not needed as the current implementation already provides proper localization.

Learnt from: siddhant-nawale-egov
PR: #204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:468-481
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The error message in the checkForErrorInUploadedFile function within Upload.js is being localized and improved for better user experience, as clarified by the user.

Learnt from: jagankumar-egov
PR: #2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.

Learnt from: jagankumar-egov
PR: #2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a defaultTenant variable to store Digit.ULBService.getStateId() instead of calling the function multiple times inline in the defaultValue object. This improves code readability and avoids function call duplication.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:26-26
Timestamp: 2025-07-15T04:58:30.634Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the team has moved away from using MDMS hooks for boundary data fetching and now uses direct API calls to the boundary service endpoint /boundary-service/boundary-relationships/_search instead of the useHrmsMDMS hook with "FetchBoundaries" parameter.

Learnt from: siddhant-nawale-egov
PR: #720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js:46-56
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The user prefers the useEffect hook to run only when checkDataCompletion changes in the Navigator component.

micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js (10)

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: siddhant-nawale-egov
PR: #606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The addResourcesToFilteredDataToShow function in micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js now includes checks for data integrity, such as validation of previewData, the common column, and resources, along with error logging for invalid data formats.

Learnt from: rachana-egov
PR: #1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js, the data?.additionalFields object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.

Learnt from: siddhant-nawale-egov
PR: #675
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Mapping.js:675-675
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The modal component from the external library used in Mapping.js does not support the className property, and thus styles cannot be refactored into a CSS module.

Learnt from: siddhant-nawale-egov
PR: #675
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Mapping.js:675-675
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The modal component from the external library used in Mapping.js does not support the className property, and thus styles cannot be refactored into a CSS module.

Learnt from: siddhant-nawale-egov
PR: #876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.

Learnt from: Hari-egov
PR: #2788
File: micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js:26-26
Timestamp: 2025-07-15T04:58:30.634Z
Learning: In the HRMS module (micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js), the team has moved away from using MDMS hooks for boundary data fetching and now uses direct API calls to the boundary service endpoint /boundary-service/boundary-relationships/_search instead of the useHrmsMDMS hook with "FetchBoundaries" parameter.

Learnt from: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.

Learnt from: rachana-egov
PR: #1779
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js:19-28
Timestamp: 2024-11-08T07:49:53.969Z
Learning: In FileComponent.js, the formatDate function receives a date string that is always a valid date entity, so additional input validation and error handling are unnecessary.

Learnt from: jagankumar-egov
PR: #2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.

🧬 Code Graph Analysis (2)
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (1)
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js (1)
  • fieldStyle (209-212)
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js (1)
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (1)
  • fieldStyle (26-29)
🪛 LanguageTool
micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md

[grammar] ~1-~1: Use correct spacing
Context: ## [1.8.16] [25-July-2025] - DatePicker HRMS - Max...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~3-~3: Use correct spacing
Context: ...icker HRMS - Maxwidth Added for 2 more fields ## [1.8.15] [25-July-2025] - DatePicker HR...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md

[grammar] ~1-~1: Use correct spacing
Context: ## [1.0.27] [29-Jul-2025] - File Upload Issues Resolved & Edit MD...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~2-~2: Use correct spacing
Context: ...solved & Edit MDMS view incorrect data fix ## [1.0.26] [18-Jun-2025] - Provided schem...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

🪛 markdownlint-cli2 (0.17.2)
micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md

2-2: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


2-2: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

⏰ Context from checks skipped due to timeout of 10000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js (3)

287-287: LGTM! Good encapsulation of internal form state.

Renaming updatedData to internalFormData better reflects its purpose and improves code clarity.


397-401: LGTM! Well-designed internal change handler.

The onFormChangeInternal function properly encapsulates form data updates within the component while still propagating changes to external handlers when provided.


436-437: LGTM! Form props updated correctly.

The Form component now uses the internal state and handler, maintaining proper data flow within the component.

micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationAdd.js (1)

185-192: LGTM! Proper modal state management.

The useEffect correctly resets related states when the module dropdown modal opens, ensuring clean UI state and preventing stale data issues. The dependency array is appropriately limited to showModuleDropdownModal.

micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md (1)

2-3: Fix spacing issues in changelog entry.

The changelog entry has extra spacing after brackets and periods.

Apply this diff to fix the spacing:

-## [1.8.16] [25-July-2025] 
-- DatePicker HRMS - Maxwidth Added for 2 more fields
+## [1.8.16] [25-July-2025]
+- DatePicker HRMS - Maxwidth Added for 2 more fields

Likely an incorrect or invalid review comment.

micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (2)

26-29: LGTM! Consistent styling approach.

The fieldStyle object is well-defined and the styling values are appropriate for constraining DatePicker field width and spacing.


41-41: LGTM! Proper inline style application.

The inline style application to the field wrapper is implemented correctly and maintains consistency with the pattern used in assignment.js.

micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js (1)

233-233: LGTM! Consistent style application.

The inline style application to both fromDate and toDate field wrappers is implemented correctly and provides consistent spacing and width constraints.

Also applies to: 254-254

Comment on lines +209 to +212
const fieldStyle = {
maxWidth: "36.25rem",
paddingRight: "2.5rem",
};
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider extracting shared styles to eliminate duplication.

The fieldStyle object is duplicated across multiple files (SelectDateofEmployment.js and assignment.js). This violates the DRY principle and could lead to maintenance issues.

Consider creating a shared constants file or utility for common form field styles. Would you like me to help create a solution to centralize these shared styles?

🤖 Prompt for AI Agents
In
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js
around lines 209 to 212, the fieldStyle object is duplicated in multiple files,
violating the DRY principle. To fix this, create a shared constants or styles
file (e.g., formFieldStyles.js) in a common directory and move the fieldStyle
object there. Then, import this shared style object into assignment.js and other
files like SelectDateofEmployment.js to eliminate duplication and centralize
style management.

Comment on lines +1 to +2
## [1.0.27] [29-Jul-2025]
- File Upload Issues Resolved & Edit MDMS view incorrect data fix
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Changelog entry content is good but needs formatting cleanup.

The changelog entry accurately documents the fixes mentioned in the PR objectives. However, please address the formatting issues:

Apply this diff to fix formatting:

-## [1.0.27]  [29-Jul-2025]
-- File Upload Issues Resolved & Edit MDMS view incorrect data fix   
+## [1.0.27] [29-Jul-2025]
+- File Upload Issues Resolved & Edit MDMS view incorrect data fix
+

This removes trailing spaces, fixes bracket spacing, and adds the missing blank line after the entry.

📝 Committable suggestion

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

Suggested change
## [1.0.27] [29-Jul-2025]
- File Upload Issues Resolved & Edit MDMS view incorrect data fix
## [1.0.27] [29-Jul-2025]
- File Upload Issues Resolved & Edit MDMS view incorrect data fix
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Use correct spacing
Context: ## [1.0.27] [29-Jul-2025] - File Upload Issues Resolved & Edit MD...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~2-~2: Use correct spacing
Context: ...solved & Edit MDMS view incorrect data fix ## [1.0.26] [18-Jun-2025] - Provided schem...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

🪛 markdownlint-cli2 (0.17.2)

2-2: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


2-2: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
In micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md at
lines 1 to 2, the changelog entry has formatting issues such as trailing spaces,
inconsistent bracket spacing, and missing a blank line after the entry. Remove
any trailing spaces, ensure proper spacing around brackets, and add a blank line
after the changelog entry to improve readability and maintain consistency.

@jagankumar-egov jagankumar-egov deleted the branch develop October 28, 2025 04:27
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