Skip to content

Conversation

Hari-egov
Copy link
Contributor

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

Choose the appropriate template for your PR:

Feature/Bugfix Request

JIRA ID
CCSD 474

Module
Logout Overlay fix
Workbench View State Issue Fix

Summary by CodeRabbit

  • Bug Fixes

    • Resolved issues with view and edit state in the Workbench module.
    • Improved navigation behavior in employee management, ensuring more reliable redirects after updates.
  • Style

    • Updated styling for employee dropdown and select input fields for improved appearance and layering.
    • Applied maximum width and padding to DatePicker fields in HRMS forms for consistent layout.
  • Refactor

    • Enhanced code readability and maintainability in Workbench employee view pages.
    • Refined localization data handling and navigation flow in employee edit pages.
  • Chores

    • Updated linked stylesheet version for consistent UI.
    • Added changelog entries for recent updates in HRMS and Workbench modules.

* CCSD-508

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

* removed change log

* digit-ui-module-hrms": "1.8.16"
@Hari-egov Hari-egov requested a review from a team as a code owner July 30, 2025 12:22
Copy link
Contributor

coderabbitai bot commented Jul 30, 2025

📝 Walkthrough

Walkthrough

This update introduces style adjustments to employee select dropdowns and date picker fields, refactors navigation and localization logic in the MDMS Edit page, and improves code readability in the MDMS View page. Additionally, changelogs are updated for HRMS and Workbench modules, and a stylesheet version is incremented in the public HTML.

Changes

Cohort / File(s) Change Summary
Employee Select & Dropdown Styling
micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss
Adjusts z-index and introduces new styling rules for dropdown employee select input fields.
HRMS DatePicker Max Width
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js, micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js
Adds a maximum width and right padding to DatePicker field containers via inline styles.
MDMS Edit Navigation & Localization Refactor
micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSEdit.js
Refactors navigation to use window.location.href, moves localization logic to a React effect, introduces state for localized data, and updates mutation success handling.
MDMS View Code Cleanup
micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSView.js
Refactors toast rendering, fixes formatting, and cleans up code for readability without altering functionality.
Changelog Updates
micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md, micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md
Adds new changelog entries for HRMS (v1.8.16) and Workbench (v1.0.28) modules.
Public HTML Stylesheet Version Bump
micro-ui/web/public/index.html
Updates @egovernments/digit-ui-css stylesheet link from version 1.8.34 to 1.8.35.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MDMS_Edit_Page
    participant LocalizationMap
    participant Browser

    User->>MDMS_Edit_Page: Load/Edit Employee Data
    MDMS_Edit_Page->>LocalizationMap: Fetch localization data
    MDMS_Edit_Page->>MDMS_Edit_Page: useEffect runs, prepares localized data
    User->>MDMS_Edit_Page: Submit update
    MDMS_Edit_Page->>MDMS_Edit_Page: Mutation success
    MDMS_Edit_Page->>Browser: setTimeout (1s), then window.location.href redirect
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Suggested reviewers

  • nabeelmd-eGov
  • jagankumar-egov

Poem

In fields of code where changes bloom,
Styles align and dropdowns groom,
A DatePicker’s width now stands just right,
While MDMS pages refactor with delight.
Changelogs whisper what’s new and bright—
This bunny hops with CSS in sight!
🐇💻✨

Note

⚡️ Unit Test Generation is now available in beta!

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


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 41fd484 and 6fb0236.

⛔ Files ignored due to path filters (6)
  • 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/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 (1)
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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#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: 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: 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: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Otp/index.js:0-0
Timestamp: 2025-06-26T10:17:02.717Z
Learning: In the DIGIT Frontend project, banner images and similar configuration data should be managed through MDMS (Master Data Management Service) rather than hardcoded arrays or separate config files, as indicated by the user Hari-egov.
micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md (2)

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.

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

[grammar] ~1-~1: Use correct spacing
Context: ## [1.0.28] [30-July-2025] - Workbench View and edit state issues ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~2-~2: Use correct spacing
Context: ...y-2025] - Workbench View and edit state issues ## [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

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

(MD022, blanks-around-headings)


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

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


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

(MD009, no-trailing-spaces)


2-2: Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

🔇 Additional comments (1)
micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md (1)

1-4: 1.0.27 entry disappeared – confirm this isn’t an accidental drop
The prior version 1.0.27 (added in the last commit) is no longer present. Changelogs should be append-only so historical information isn’t lost. Please verify whether
a) 1.0.27 was merged elsewhere and intentionally superseded, or
b) it was mistakenly overwritten by 1.0.28.
If (b), restore the 1.0.27 section above 1.0.28.

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

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

🔭 Outside diff range comments (2)
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (1)

41-51: Inline style could be moved to CSS for maintainability

Applying style={fieldStyle} directly is fine for a quick fix, but over time scattered inline styles become hard to track and override.
Prefer adding a dedicated CSS class (e.g., .date-field--constrained) and keep styling in SCSS, which also eases theming.

No code diff provided as this is an organisational recommendation.

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

233-269: Consider replacing repeated inline styles with CSS class

Both “From Date” and “To Date” pickers now use identical inline styles.
Moving this styling to a CSS module/class will:

  • Cut bundle size (every inline style serialises to DOM)
  • Make future visual tweaks SCSS-only
  • Ease overriding in downstream projects

Example:

/* hrms-date-field.scss */
.hrms-date-field {
  max-width: 36.25rem;
  padding-right: 2.5rem;
}

and in JSX:

<div className="field hrms-date-field">

Not blocking, but worth considering before the pattern spreads further.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7d86814 and 41fd484.

⛔ Files ignored due to path filters (8)
  • 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/css/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 (8)
  • micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss (1 hunks)
  • 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/pages/employee/MDMSEdit.js (4 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSView.js (5 hunks)
  • micro-ui/web/public/index.html (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/assignment.js
  • micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSView.js
  • micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSEdit.js
🧠 Learnings (9)
📓 Common learnings
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#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: 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: 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: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Otp/index.js:0-0
Timestamp: 2025-06-26T10:17:02.717Z
Learning: In the DIGIT Frontend project, banner images and similar configuration data should be managed through MDMS (Master Data Management Service) rather than hardcoded arrays or separate config files, as indicated by the user Hari-egov.
micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md (2)

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.

micro-ui/web/public/index.html (6)

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: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from @egovernments/digit-ui-components has compatibility issues with the ActionBar, leading to the preference for using the Button from @egovernments/digit-ui-react-components in certain scenarios.

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: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/css/src/components/Carousel.scss:0-0
Timestamp: 2025-06-26T10:16:36.004Z
Learning: In the DIGIT-Frontend codebase, signup-container CSS classes cannot be namespaced under parent classes due to existing style constraints and requirements.

Learnt from: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Otp/index.js:0-0
Timestamp: 2025-06-26T10:17:02.717Z
Learning: In the DIGIT Frontend project, banner images and similar configuration data should be managed through MDMS (Master Data Management Service) rather than hardcoded arrays or separate config files, as indicated by the user Hari-egov.

Learnt from: siddhant-nawale-egov
PR: #691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components Loader, Toast, and Modal are from different libraries in the DIGIT-Frontend project, as clarified by the user.

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-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: #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: 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/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: #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: 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: #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.

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

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.

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: #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: #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: 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.

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.

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

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

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: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Toast component's styling is managed internally within the component, ensuring consistency and adaptability across different contexts without the need for additional external styling.

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: siddhant-nawale-egov
PR: #691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components Loader, Toast, and Modal are from different libraries in the DIGIT-Frontend project, as clarified by the user.

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: 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: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:326-345
Timestamp: 2025-06-26T10:38:13.794Z
Learning: In the DIGIT Frontend sandbox module, configuration data comes from MDMS (Master Data Management System) which provides reliable, well-structured data for UI components, reducing the likelihood of malformed configuration data that would require extensive error handling.

Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from @egovernments/digit-ui-components has compatibility issues with the ActionBar, leading to the preference for using the Button from @egovernments/digit-ui-react-components in certain scenarios.

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.

Learnt from: Hari-egov
PR: #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: 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: Tulika-eGov
PR: #2188
File: micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocalities.js:5-6
Timestamp: 2025-02-05T10:06:57.846Z
Learning: In useLocalities hook, the language parameter is used in the query key to trigger React Query cache invalidation when language changes, while actual translation is handled by the 't' function parameter.

Learnt from: Ramkrishna-egov
PR: #1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In ActivityCard.js, React.Fragment is used in the code.

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

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: #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: 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: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/LoginSignupSelector.js:24-24
Timestamp: 2025-06-26T09:43:00.597Z
Learning: In LoginSignupSelector component, the URL checking using window.location.href.includes("sandbox-ui/user/sign-up") is intentional for URL validation purposes, not navigation. The team prefers this approach over React Router's useLocation hook for specific URL checking needs.

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: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The onStepClick logic in CreateMicroplan.js is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.

Learnt from: siddhant-nawale-egov
PR: #698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js:55-57
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The logic for the data change save check in the RuleEngine.js file has been shifted elsewhere for more global checks.

Learnt from: siddhant-nawale-egov
PR: #691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components Loader, Toast, and Modal are from different libraries in the DIGIT-Frontend project, as clarified by the user.

Learnt from: Tulika-eGov
PR: #2188
File: micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocalities.js:5-6
Timestamp: 2025-02-05T10:06:57.846Z
Learning: In useLocalities hook, the language parameter is used in the query key to trigger React Query cache invalidation when language changes, while actual translation is handled by the 't' function parameter.

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: Hari-egov
PR: #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: 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.

micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss (10)

Learnt from: siddhant-nawale-egov
PR: #876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:86-97
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The use of !important in the .modal-header CSS class within microplanning.scss is necessary to ensure the styles are applied as intended and are not overridden by other styles.

Learnt from: siddhant-nawale-egov
PR: #675
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:33-58
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The use of !important in the .wbh-header-container and .guideline-actionbar-content CSS classes within microplanning.scss is necessary to prevent these styles from being overridden.

Learnt from: Hari-egov
PR: #2644
File: micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss:1642-1662
Timestamp: 2025-06-26T10:24:08.628Z
Learning: In the sandbox SCSS file, tab styling with margin-bottom and border changes that cause layout shifts are intentional design requirements per updated UI specifications, not bugs to be fixed.

Learnt from: siddhant-nawale-egov
PR: #675
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:649-652
Timestamp: 2024-10-11T10:00:29.720Z
Learning: The use of !important in the .excel-wrapper CSS class is necessary to prevent the styles from being overridden in certain contexts.

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: 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: #2644
File: micro-ui/web/micro-ui-internals/packages/css/src/components/Carousel.scss:0-0
Timestamp: 2025-06-26T10:16:36.004Z
Learning: In the DIGIT-Frontend codebase, signup-container CSS classes cannot be namespaced under parent classes due to existing style constraints and requirements.

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: siddhant-nawale-egov
PR: #377
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:19-25
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The use of !important in the .api-data-loader CSS class is necessary due to the component being used in multiple places which leads to its styles being overridden if !important is not used.

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/assignment.js (1)
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js (1)
  • fieldStyle (26-29)
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)
🪛 LanguageTool
micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md

[grammar] ~1-~1: Use correct spacing
Context: ## [1.0.27] [30-July-2025] - Workbench View and edit state issues ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~2-~2: Use correct spacing
Context: ...y-2025] - Workbench View and edit state issues ## [1.0.26] [18-Jun-2025] - Provided schem...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

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)

🪛 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)

micro-ui/web/micro-ui-internals/packages/modules/hrms/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)


3-3: Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

🔇 Additional comments (12)
micro-ui/web/public/index.html (1)

10-10: LGTM! Stylesheet version update.

The version bump from 1.8.34 to 1.8.35 aligns with the CSS changes made in the workbench module and ensures the latest styles are applied globally.

micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss (2)

776-776: LGTM! Z-index fix for modal select inputs.

The z-index adjustment ensures proper layering of input elements within modal contexts.


784-796: LGTM! Comprehensive styling for employee select dropdowns.

The styling improvements for employee select dropdown inputs address positioning, z-index layering, and visual consistency. The specific z-index value and positioning properties ensure proper dropdown behavior.

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

86-86: Minor improvement: Fixed type property spacing.

Good catch on standardizing the type property spacing for consistency.


133-134: Good refactoring: Improved code formatting.

The function formatting and consistent spacing improve readability.


148-154: Good improvement: Consistent variable declarations.

The consistent spacing and formatting of variable declarations enhances code readability.


182-182: Minor improvement: Consistent loading condition formatting.

The reformatted loading condition maintains functionality while improving readability.


184-204: Excellent refactoring: Extracted toast rendering logic.

Moving the toast rendering logic into a dedicated renderToast function improves code organization and maintainability. The function cleanly handles conditional rendering with consistent styling and proper event handling.


224-229: Good cleanup: Added missing semicolon and formatting.

The addition of the missing semicolon after the export statement and consistent formatting improve code quality.

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

25-33: Navigation approach changed from SPA to full page reload.

The navigation method was changed from React Router's history.push to window.location.href, which causes a full page reload instead of SPA navigation. This approach might be intentional to address state management issues mentioned in the PR objectives.

Please verify that this navigation change is intentional and necessary for resolving the "Workbench View State" issues mentioned in the PR. Full page reloads can impact user experience compared to SPA navigation.


185-187: Consistent navigation approach with delayed redirect.

The success handler also uses window.location.href with a timeout, maintaining consistency with the navigation approach change. The 1-second delay allows the toast message to be visible before navigation.


199-199: Updated to use state-managed form data.

The defaultFormData prop now uses the initialFormData state variable instead of the previously computed finalData?.data, aligning with the refactored localization logic.

Comment on lines +1 to +4

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

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 formatting breaks Markdown conventions

Current problems:

  1. File starts with a level-2 heading – MD041 recommends starting with a single #.
  2. Headings need blank lines before/after (MD022).
  3. Trailing spaces on Line 2.
  4. List item on Line 3 should be preceded by a blank line (MD032).

Suggested quick fix:

-## [1.8.16] [25-July-2025] 
-- DatePicker HRMS - Maxwidth Added for 2 more fields
+# HRMS Module Changelog
+
+## [1.8.16] – 25-Jul-2025
+
+### Added
+* DatePicker – max-width applied to two additional fields.

Applying this keeps the file markdown-lint clean and improves readability.

📝 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.8.16] [25-July-2025]
- DatePicker HRMS - Maxwidth Added for 2 more fields
# HRMS Module Changelog
## [1.8.16] – 25-Jul-2025
### Added
* DatePicker – max-width applied to two additional fields.
🧰 Tools
🪛 LanguageTool

[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)

🪛 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)


3-3: Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md lines 1 to
4, fix markdown formatting by changing the initial heading from level-2 (##) to
level-1 (#), add blank lines before and after headings, remove trailing spaces
on line 2, and insert a blank line before the list item on line 3 to comply with
markdown lint rules and improve readability.

Comment on lines +209 to +213
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)

Duplicate fieldStyle definition – centralise it

fieldStyle is now declared inside the inner Assignment component, duplicating the same literal already added in SelectDateofEmployment. Besides code repetition it is freshly created for every Assignment render (and there can be many).

Reuse a single exported constant (or CSS class) instead:

-import React ... // existing imports
+import { FIELD_STYLE } from "./SelectDateofEmployment"; // or a new `styles.js`

-const fieldStyle = {
-  maxWidth: "36.25rem",
-  paddingRight: "2.5rem",
-};

and

-<div className="field" style={fieldStyle}>
+<div className="field" style={FIELD_STYLE}>

This keeps Render → DOM churn minimal and removes duplication.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js
around lines 209 to 213, the fieldStyle object is redundantly defined inside the
Assignment component, duplicating the same style already declared in
SelectDateofEmployment. To fix this, move the fieldStyle definition outside both
components as a single exported constant or define it as a CSS class, then
import or reference it in both places. This avoids recreating the style object
on every render and eliminates duplication.

Comment on lines +25 to +29

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)

Extract fieldStyle constant outside the component to avoid per-render object recreation

fieldStyle is instantiated on every render of SelectDateofEmployment.
Although the object is small, the new reference forces React to treat style as changed each render, causing an unnecessary re-paint of the wrapped DatePicker.

+// Place near the top of the file, after imports
+export const FIELD_STYLE = { maxWidth: "36.25rem", paddingRight: "2.5rem" };
 
-const fieldStyle = {
-  maxWidth: "36.25rem",
-  paddingRight: "2.5rem",
-};

Then use FIELD_STYLE in JSX.
If several components require the same styling (see assignment.js), consider a small shared util or, better, a CSS/SASS class to keep styling concerns in stylesheets.

🤖 Prompt for AI Agents
In
micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js
around lines 25 to 29, the fieldStyle object is defined inside the component
causing it to be recreated on every render, which triggers unnecessary
re-paints. Move the fieldStyle object outside the SelectDateofEmployment
component and rename it to FIELD_STYLE. Then update the JSX to use this
constant. Consider extracting common styles to a shared utility or CSS/SASS
class if used across multiple components.

Comment on lines 1 to 3
## [1.0.27] [30-July-2025]
- Workbench View and edit state issues

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)

Fix markdown formatting issues.

The changelog entry is appropriate, but there are formatting issues that should be addressed:

  • Remove trailing spaces after the description
  • Add proper blank line spacing around headings

Apply this diff to fix the formatting:

 ## [1.0.27]  [30-July-2025]
-- Workbench View and edit state issues 
+- Workbench View and edit state issues
+
📝 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] [30-July-2025]
- Workbench View and edit state issues
## [1.0.27] [30-July-2025]
- Workbench View and edit state issues
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Use correct spacing
Context: ## [1.0.27] [30-July-2025] - Workbench View and edit state issues ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~2-~2: Use correct spacing
Context: ...y-2025] - Workbench View and edit state issues ## [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)


3-3: Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In micro-ui/web/micro-ui-internals/packages/modules/workbench/CHANGELOG.md at
lines 1 to 3, fix markdown formatting by removing trailing spaces after the
description line and ensuring there is a blank line before and after the heading
to improve readability and conform to markdown standards.

Comment on lines +108 to +121
const [initialFormData, setInitialFormData] = useState(null);

React.useEffect(() => {
if (data?.data && localizationMap && !initialFormData) {
const updatedData = _.cloneDeep(data);
Object.keys(updatedData.data).forEach((field) => {
const localizationKey = tranformLocModuleName(`${data.schemaCode}_${field}_${updatedData.data[field]}`);
if (localizationMap[localizationKey]) {
updatedData.data[field] = localizationMap[localizationKey];
}
});
setInitialFormData(updatedData.data);
}
}, [data, localizationMap, initialFormData]);
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Potential infinite re-render risk in useEffect dependency array.

The useEffect includes initialFormData in its dependency array, but the effect also sets initialFormData. This could potentially cause an infinite loop if the cloned data object reference changes.

Consider removing initialFormData from the dependency array since the guard condition !initialFormData already prevents unnecessary updates:

-  }, [data, localizationMap, initialFormData]);
+  }, [data, localizationMap]);

The guard condition !initialFormData ensures the effect only runs once when the data is initially available.

📝 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
const [initialFormData, setInitialFormData] = useState(null);
React.useEffect(() => {
if (data?.data && localizationMap && !initialFormData) {
const updatedData = _.cloneDeep(data);
Object.keys(updatedData.data).forEach((field) => {
const localizationKey = tranformLocModuleName(`${data.schemaCode}_${field}_${updatedData.data[field]}`);
if (localizationMap[localizationKey]) {
updatedData.data[field] = localizationMap[localizationKey];
}
});
setInitialFormData(updatedData.data);
}
}, [data, localizationMap, initialFormData]);
const [initialFormData, setInitialFormData] = useState(null);
React.useEffect(() => {
if (data?.data && localizationMap && !initialFormData) {
const updatedData = _.cloneDeep(data);
Object.keys(updatedData.data).forEach((field) => {
const localizationKey = tranformLocModuleName(`${data.schemaCode}_${field}_${updatedData.data[field]}`);
if (localizationMap[localizationKey]) {
updatedData.data[field] = localizationMap[localizationKey];
}
});
setInitialFormData(updatedData.data);
}
}, [data, localizationMap]);
🤖 Prompt for AI Agents
In
micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSEdit.js
around lines 108 to 121, the useEffect hook includes initialFormData in its
dependency array but also updates initialFormData inside the effect, risking an
infinite re-render loop. To fix this, remove initialFormData from the dependency
array since the condition !initialFormData already prevents repeated updates,
ensuring the effect runs only once when data is initially available.

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.

1 participant