-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update UserManagement.js #2017
Update UserManagement.js #2017
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request focus on the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range comments (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/UserManagement.js (3)
Line range hint
30-37
: Replace window.location.href with React Router navigationUsing
window.location.href
causes a full page reload. Consider using React Router's history for smoother navigation.- window.location.href=`/${contextPath}/employee/hrms/details/${tenantId}/${row}` + history.push(`/${contextPath}/employee/hrms/details/${tenantId}/${row}`);
Line range hint
30-37
: Implement proper input sanitizationThe code directly interpolates user input (
row
) into a URL without sanitization. Consider implementing proper URL encoding.- window.location.href=`/${contextPath}/employee/hrms/details/${tenantId}/${row}` + const sanitizedUserName = encodeURIComponent(row); + window.location.href=`/${contextPath}/employee/hrms/details/${tenantId}/${sanitizedUserName}`
Line range hint
33-37
: Enhance error handling with user feedbackThe error handling only logs to console. Consider adding user feedback through a toast or notification system.
if (!contextPath) { - console.error("Context path configuration is missing"); + console.error("Context path configuration is missing"); + Digit.Utils.notificationV2.error("ERROR_CONFIGURATION_MISSING"); return; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/UserManagement.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/UserManagement.js (1)
Pattern **/*.js
: check
🔇 Additional comments (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/UserManagement.js (1)
Line range hint 30-37
: Verify consistent data structure usage across the application
Let's verify if this data structure change is consistent with other parts of the application using the InboxSearchComposer.
✅ Verification successful
Based on the search results, I can see that the data structure pattern used in the code is consistent with other implementations across the codebase. The onClickRow
handler consistently receives the row data in a similar structure where the actual data is accessed via data?.original
or directly as row?.original
. This is evident in multiple files:
- In ApprovedMicroplans.js:
const onClickRow = ({ original: row })
- In MyCampaign.js:
const onClickRow = ({ original: row })
- In MDMSSearchv2.js:
const onClickRow = ({original:row})
The navigation pattern using window.location.href
with context path is also consistent with other implementations where they use either history.push
or window.location.href
with the context path.
The data structure and navigation patterns in the code are consistent with the rest of the codebase
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for other instances of InboxSearchComposer usage to verify data structure consistency
rg -l "InboxSearchComposer" | xargs rg "onClickRow" -A 5 -B 5
Length of output: 29063
...ro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/UserManagement.js
Show resolved
Hide resolved
Co-authored-by: Nipun Arora <[email protected]>
* BUGFIX/HCMPRE-1585 fixed tootltip icon position according to the label (#2010) * Update UserManagement.js (#2017) Co-authored-by: Nipun Arora <[email protected]> --------- Co-authored-by: Nipun Arora <[email protected]>
Co-authored-by: Nipun Arora <[email protected]>
* Update UserManagement.js (#2017) Co-authored-by: Nipun Arora <[email protected]> * updated core version (#2020) * Bugfix/hcmpre 1583 (#2021) * Update MicroplanSearch.js * Pagination issues --------- Co-authored-by: Nipun Arora <[email protected]> * BUGFIX/HCMPRE-1634: fix for versions (#2024) * Revert "Bugfix/hcmpre 1583 (#2021)" This reverts commit 201a0ce. * BUGFIX/HCMPRE-1634 Revert ing"updated core version (#2020)" * BUGFIX/HCMPRE-1583 fixes --------- Co-authored-by: Swathi-eGov <[email protected]> * FEATURE/HCMPRE-1634:Fixed all the version updates (#2026) FEATURE/HCMPRE-1634: Fixed all the version updates * Update package.json --------- Co-authored-by: Swathi-eGov <[email protected]> Co-authored-by: Nipun Arora <[email protected]> Co-authored-by: abishekTa-egov <[email protected]> Co-authored-by: Swathi-eGov <[email protected]>
Choose the appropriate template for your PR:
Feature PR
Feature Request
JIRA ID
Module
Description
Related Issues
Bugfix PR
Bugfix Request
JIRA ID
Module
Description
Root Cause
Related Issues
Release PR
Summary by CodeRabbit
Bug Fixes
Documentation