Skip to content

TICKET:: HCMPRE-2294,HCMPRE-2256,HCMPRE-2257,HCMPRE-2387 #2298

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

Open
wants to merge 45 commits into
base: console
Choose a base branch
from

Conversation

pitabash-eGov
Copy link
Contributor

@pitabash-eGov pitabash-eGov commented Apr 1, 2025

HRMS modules changes:

  1. digit-ui-component is used
  2. custom component is replaced with digit component .

Summary by CodeRabbit

  • New Features

    • Integrated new HRMS functionality to enhance employee management, including streamlined interfaces for creating, editing, and reviewing employee data.
    • Introduced dynamic action prompts for common tasks such as activation, deactivation, and password updates.
    • Enhanced search and navigation experiences with improved breadcrumb trails and assignment management.
    • Added new components for managing campaign assignments, employee details, and inbox searches.
    • Implemented new configuration options for HRMS functionalities, including role assignments and jurisdiction management.
    • Expanded proxy routes to accommodate new HRMS endpoints.
  • Style Enhancements

    • Refined visual layouts and updated form styles to deliver a more consistent and user-friendly interface.

@pitabash-eGov pitabash-eGov self-assigned this Apr 1, 2025
@pitabash-eGov pitabash-eGov requested a review from a team as a code owner April 1, 2025 05:09
Copy link
Contributor

coderabbitai bot commented Apr 1, 2025

Caution

Review failed

Failed to post review comments.

📝 Walkthrough

Walkthrough

The changes integrate HRMS components into the Digit UI application. New import and initialization calls for HRMS have been added in multiple entry point files. Additionally, stylesheet links and SCSS files have been updated or added for HRMS-specific styling. Several UI customization files, proxy routes, and configurations have been restructured. A comprehensive set of new HRMS module components, hooks, services, utilities, constants, and pages have been introduced, supporting operations such as employee creation, detail display, campaign assignment, and search functionalities.

Changes

File(s) Change Summary
health/micro-ui/web/health-payments/App.js, health/micro-ui/web/micro-ui-internals/example/src/index.js, health/micro-ui/web/workbench/App.js Imported and initialized initHRMSComponents from the HRMS module, integrating HRMS components into Digit UI initialization and updating enabled modules.
health/micro-ui/web/micro-ui-internals/example/public/index.html, health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/hrmsupdate.scss, health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss Updated stylesheet links with new version numbers; added a new SCSS file with custom HRMS styles and imported it into the main CSS.
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js, health/micro-ui/web/micro-ui-internals/example/src/setupProxy.js Restructured UI customizations (simplified logic, added SearchDefaultConfigMain) and introduced several new proxy routes for health endpoints.
health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/components/... Added numerous new HRMS React components (e.g., EmployeeAction, BreadCrumbs, CampaignsAssignment, DeactivatePopUp, BoundaryComponent, RolesAssigned, Jurisdictions, ActionPopUp) along with new configuration files and constants.
health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/hooks/..., health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/services/..., health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js Introduced custom hooks for HRMS operations (create, update, delete, search, etc.), new service modules for API interactions, and utility functions for data and date processing.
health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/pages/employee/... Implemented new HRMS module pages (e.g., AssignCampaign, CreateEmployee, EmployeeDetailScreen, InboxSearch, ResponseScreen) for employee management and campaign assignments.

Sequence Diagram(s)

sequenceDiagram
    participant UI as DigitUI
    participant HRMS as HRMS Components
    participant Payment as Payment Components
    UI->>HRMS: initDigitUI() calls initHRMSComponents()
    HRMS-->>UI: HRMS components initialized
    UI->>Payment: initDigitUI() calls initPaymentComponents()
    Payment-->>UI: Payment components initialized
Loading

Suggested reviewers

  • nipunarora-eGov
  • nabeelmd-eGov
  • jagankumar-egov

Poem

I'm a happy little bunny,
Hopping through code so sunny.
HRMS joins our grand parade,
With hooks and pages freshly made.
🎉 Tails up, cheers all around,
For new features safe and sound!
🐇 Hop on to the updated ground.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

@Ramkrishna-egov Ramkrishna-egov left a comment

Choose a reason for hiding this comment

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

@pitabash-eGov Resolve the code comments

return projectName;
}

export const getHighLevelProjects = (projectDetails) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@pitabash-eGov Please check this if this util is necessary, and if its necessary the Enums are hardcoded, Please refer from boundary Order from boundary search API

}

useEffect(() => {
switch (action) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@pitabash-eGov Add the actions to MDMS, Create a new master and refer from MDMS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: need to change


// Fetch project details associated with the staff
const response = await Digit.CustomService.getResponse({
url: Urls.hcm.searchProject, // API endpoint for project search
Copy link
Contributor

Choose a reason for hiding this comment

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

@pitabash-eGov useCustomAPIhook can be used, here instead of Digit.CustomService.getRespons

UserSearch: "/user/_search",
UserLogout: "/user/_logout",

Shortener: "/egov-url-shortening/shortener",
Copy link
Contributor

Choose a reason for hiding this comment

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

@pitabash-eGov Add url shortner context path as optional

@Ramkrishna-egov Ramkrishna-egov self-requested a review April 3, 2025 17:43
@Ramkrishna-egov Ramkrishna-egov changed the base branch from HCMPRE-246 to console April 8, 2025 15:20
case "Landline":
return /^[0-9]{11}$/i;
case "PropertyID":
return /^[a-zA-z0-9\s\\/\-]$/i;

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium

Suspicious character range that overlaps with a-z in the same character class, and is equivalent to [A-Z[]^_`a-z].

Copilot Autofix

AI 13 days ago

To fix the problem, we need to correct the overly permissive range A-z to accurately match only the intended characters. The correct range should be A-Za-z to include all uppercase and lowercase letters without including unintended special characters.

  • Update the regular expression on line 70 to use A-Za-z instead of A-z.
  • Ensure that the functionality remains the same by only changing the character range in the regular expression.
Suggested changeset 1
health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js b/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js
@@ -69,3 +69,3 @@
       case "PropertyID":
-        return /^[a-zA-z0-9\s\\/\-]$/i;
+        return /^[a-zA-Za-z0-9\s\\/\-]$/i;
       case "ElectricityConnNo":
EOF
@@ -69,3 +69,3 @@
case "PropertyID":
return /^[a-zA-z0-9\s\\/\-]$/i;
return /^[a-zA-Za-z0-9\s\\/\-]$/i;
case "ElectricityConnNo":
Copilot is powered by AI and may make mistakes. Always verify output.
case "IFSC":
return /^[A-Z]{4}0[A-Z0-9]{6}$/;
case "ApplicationNo":
return /^[a-zA-z0-9\s\\/\-]$/i;

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium

Suspicious character range that overlaps with a-z in the same character class, and is equivalent to [A-Z[]^_`a-z].

Copilot Autofix

AI 13 days ago

To fix the problem, we need to correct the regular expression by replacing the overly permissive range A-z with the correct range A-Z. This will ensure that only uppercase letters are matched, along with the other intended characters.

  • Locate the regular expression in the file health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js.
  • Replace the range A-z with A-Z in the regular expressions on lines 70 and 98.
  • No additional methods, imports, or definitions are needed to implement this change.
Suggested changeset 1
health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js b/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/utils/utlis.js
@@ -69,3 +69,3 @@
       case "PropertyID":
-        return /^[a-zA-z0-9\s\\/\-]$/i;
+        return /^[a-zA-Z0-9\s\\/\-]$/i;
       case "ElectricityConnNo":
@@ -97,3 +97,3 @@
       case "ApplicationNo":
-        return /^[a-zA-z0-9\s\\/\-]$/i;
+        return /^[a-zA-Z0-9\s\\/\-]$/i;
       case "Password":
EOF
@@ -69,3 +69,3 @@
case "PropertyID":
return /^[a-zA-z0-9\s\\/\-]$/i;
return /^[a-zA-Z0-9\s\\/\-]$/i;
case "ElectricityConnNo":
@@ -97,3 +97,3 @@
case "ApplicationNo":
return /^[a-zA-z0-9\s\\/\-]$/i;
return /^[a-zA-Z0-9\s\\/\-]$/i;
case "Password":
Copilot is powered by AI and may make mistakes. Always verify output.
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 9, 2025
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.

2 participants