Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions frontend/micro-ui/web/.env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
REACT_APP_STATE_LEVEL_TENANT_ID=pb
REACT_APP_PROXY_URL=https://qa.digit.org
# REACT_APP_STATE_LEVEL_TENANT_ID=pb
# REACT_APP_PROXY_URL=https://qa.digit.org
STATE_LEVEL_TENANT_ID=pg
REACT_APP_PROXY_URL=https://urban.eydemoapp.in
REACT_APP_STATE_LEVEL_TENANT_ID=pg
Comment on lines +3 to +5
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)

Clarify duplicate STATE_LEVEL_TENANT_ID variables.

There are two similar variables that might cause confusion. Consider adding comments to explain their purpose.

+# Backend state level tenant ID
 STATE_LEVEL_TENANT_ID=pg
+# Frontend state level tenant ID
 REACT_APP_STATE_LEVEL_TENANT_ID=pg

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

🤖 Prompt for AI Agents
In frontend/micro-ui/web/.env.sample around lines 3 to 5, there are two
variables named STATE_LEVEL_TENANT_ID and REACT_APP_STATE_LEVEL_TENANT_ID that
could cause confusion due to their similarity. Add comments above each variable
to clearly explain their distinct purposes and usage contexts to avoid ambiguity
for future developers.

SKIP_PREFLIGHT_CHECK=true
REACT_APP_USER_TYPE=EMPLOYEE
REACT_APP_EMPLOYEE_TOKEN=ec6a2db1-c000-4927-af21-f4ce13c1d75f
REACT_APP_CITIZEN_TOKEN=dce88a06-7e09-4923-97f9-f15af2deea66
Comment on lines +8 to +9
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove authentication tokens from sample file.

Authentication tokens should not be included in sample environment files as they may be accidentally committed or used in production.

-REACT_APP_EMPLOYEE_TOKEN=ec6a2db1-c000-4927-af21-f4ce13c1d75f
-REACT_APP_CITIZEN_TOKEN=dce88a06-7e09-4923-97f9-f15af2deea66
+REACT_APP_EMPLOYEE_TOKEN=your-employee-token-here
+REACT_APP_CITIZEN_TOKEN=your-citizen-token-here
📝 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
REACT_APP_EMPLOYEE_TOKEN=ec6a2db1-c000-4927-af21-f4ce13c1d75f
REACT_APP_CITIZEN_TOKEN=dce88a06-7e09-4923-97f9-f15af2deea66
REACT_APP_EMPLOYEE_TOKEN=your-employee-token-here
REACT_APP_CITIZEN_TOKEN=your-citizen-token-here
🤖 Prompt for AI Agents
In frontend/micro-ui/web/.env.sample at lines 8 to 9, remove the hardcoded
authentication tokens REACT_APP_EMPLOYEE_TOKEN and REACT_APP_CITIZEN_TOKEN from
the sample environment file. Replace them with placeholder values or leave them
blank to prevent accidental exposure or misuse of real tokens.

REACT_APP_PROXY_API=https://urban.eydemoapp.in
REACT_APP_PROXY_ASSETS=https://urban.eydemoapp.in
REACT_APP_GLOBAL=https://tfstatez7a2s.blob.core.windows.net/egov-dev-assets/globalConfigs.js

33 changes: 33 additions & 0 deletions frontend/micro-ui/web/micro-ui-internals/example/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SKIP_PREFLIGHT_CHECK=true
# REACT_APP_PROXY_API=https://unified-dev.digit.org
# REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org
# REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js

# SKIP_PREFLIGHT_CHECK=true
# REACT_APP_USER_TYPE=EMPLOYEE
# REACT_APP_PROXY_API=https://urban.eydemoapp.in
# REACT_APP_PROXY_ASSETS=https://urban.eydemoapp.in
# REACT_APP_GLOBAL=https://tfstate8auyj.blob.core.windows.net/egov-dev-assets/globalConfigs.js


# SKIP_PREFLIGHT_CHECK=true
# REACT_APP_USER_TYPE=EMPLOYEE
# REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a
# REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c
Comment on lines +15 to +16
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

‼️ Hard-coded access tokens committed to VCS

REACT_APP_EMPLOYEE_TOKEN and REACT_APP_CITIZEN_TOKEN expose real-looking UUIDs. Even though the lines are commented, they are now part of the git history and can be recovered.

Immediate actions:

  1. Purge these secrets from the repo history (e.g. git filter-repo or git filter-branch + force-push).
  2. Rotate/invalidate the exposed tokens in the backend.
  3. Keep secrets in a vault or CI secret manager and inject at build/runtime, never commit them—commented or not.
-# REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a
-# REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c
📝 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
# REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a
# REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c
🧰 Tools
🪛 Gitleaks (8.26.0)

15-15: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


16-16: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🤖 Prompt for AI Agents
In frontend/micro-ui/web/micro-ui-internals/example/.env around lines 15 to 16,
there are hard-coded access tokens committed to version control, even though
commented out, they remain in git history and pose a security risk. Remove these
tokens from the git history using tools like git filter-repo or git
filter-branch followed by a force-push, rotate or invalidate the exposed tokens
in the backend, and ensure secrets are stored securely in a vault or CI secret
manager and injected at build or runtime without ever committing them to the
repository.


SKIP_PREFLIGHT_CHECK=true
REACT_APP_USER_TYPE=EMPLOYEE
# REACT_APP_USER_TYPE=CITIZEN
# REACT_APP_PROXY_API=https://staging.digit.org
# REACT_APP_PROXY_ASSETS=https://staging.digit.org
#  REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/works-dev-asset/globalConfigsWorks.js

REACT_APP_PROXY_API=https://urban.eydemoapp.in
REACT_APP_PROXY_ASSETS=https://urban.eydemoapp.in
 REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/works-dev-asset/globalConfigsWorks.js

# SKIP_PREFLIGHT_CHECK=true
# REACT_APP_PROXY_API=https://unified-dev.digit.org
# REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org
# REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js
# REACT_APP_USER_TYPE=EMPLOYEE
Comment on lines +1 to +33
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)

Streamline duplicated env blocks

Multiple, near-identical blocks (lines 1-11, 13-11, 18-28, 29-33) repeat the same variables with different values. This makes it hard to know which values are active and risks accidental deployment with the wrong configuration.

Suggested approach:
• Keep only one active block per environment (.env.development, .env.staging, .env.production).
• Delete or move commented reference values to .env.sample or docs.

This reduces noise and clarifies which variables the app will actually read.

🧰 Tools
🪛 Gitleaks (8.26.0)

15-15: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


16-16: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🤖 Prompt for AI Agents
In frontend/micro-ui/web/micro-ui-internals/example/.env lines 1 to 33, there
are multiple duplicated environment variable blocks with different values,
causing confusion about which are active. To fix this, retain only one active
block corresponding to the intended environment and remove or relocate all other
commented blocks and reference values to a separate .env.sample file or
documentation. This will clarify which variables are used and reduce the risk of
deploying with incorrect settings.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap" rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="theme-color" content="#00bcd1"/>
<title>Digit</title>
<title>IMC</title>
Comment on lines 8 to +9
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

Meta theme-color no longer matches new brand palette

meta[name="theme-color"] is still #00bcd1 (cyan) while every other file switches the primary accent to #4729A3 (purple). Browser UIs that pick up this value (Android address bar, PWA splash, etc.) will now look off-brand.

-    <meta name="theme-color" content="#00bcd1"/>
+    <meta name="theme-color" content="#4729A3"/>
📝 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
<meta name="theme-color" content="#00bcd1"/>
<title>Digit</title>
<title>IMC</title>
<meta name="theme-color" content="#4729A3"/>
<title>IMC</title>
🤖 Prompt for AI Agents
In frontend/micro-ui/web/micro-ui-internals/example/public/index.html at lines 8
to 9, update the meta tag with name "theme-color" to use the new brand color
#4729A3 instead of the old cyan #00bcd1 to ensure consistency with the updated
primary accent color across the application.

<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css/dist/index.css"/>
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ const createProxy = createProxyMiddleware({
// target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org",
target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org",
changeOrigin: true,
secure: false,
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)

Document SSL certificate verification bypass.

The secure: false setting disables SSL certificate verification, which is acceptable for development environments but should be documented.

Consider adding a comment to clarify the purpose:

+  // Disable SSL certificate verification for development
   secure: false,
📝 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
secure: false,
// Disable SSL certificate verification for development
secure: false,
🤖 Prompt for AI Agents
In frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js at line 8,
add a comment above the line setting `secure: false` to document that this
disables SSL certificate verification and is intended only for development
environments. This clarifies the purpose of the setting for future maintainers.

});
const assetsProxy = createProxyMiddleware({
target: process.env.REACT_APP_PROXY_ASSETS || "https://qa.digit.org",
changeOrigin: true,
secure: false,
});
module.exports = function (app) {
[
Expand Down Expand Up @@ -43,7 +45,8 @@ module.exports = function (app) {
"/tl-services/v1/_create",
"/tl-services/v1/_search",
"/egov-url-shortening/shortener",
"/inbox/v1/_search",
// "/inbox/v1/_search",
"/inbox/v2/_search",
Comment on lines +48 to +49
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify API compatibility when switching from v1 to v2.

The inbox search endpoint has been switched from v1 to v2. Ensure that all dependent components are compatible with the v2 API.

Run the following script to verify the usage of inbox search endpoints:


🏁 Script executed:

#!/bin/bash
# Description: Check for any remaining references to v1 inbox search endpoints
# Expected: No v1 references should remain if fully migrated to v2

echo "Searching for v1 inbox search references..."
rg -A 3 "inbox/v1/_search" --type js --type jsx --type ts --type tsx

echo "Searching for v2 inbox search references..."
rg -A 3 "inbox/v2/_search" --type js --type jsx --type ts --type tsx

Length of output: 387


🏁 Script executed:

#!/bin/bash
# Re-run search without relying on ripgrep’s built-in type filters
echo "Searching for v1 inbox search references across all files..."
rg -A 3 "inbox/v1/_search"

echo "Searching for v2 inbox search references across all files..."
rg -A 3 "inbox/v2/_search"

Length of output: 2650


No active /inbox/v1/_search usage remains—clean up legacy comments and docs

  • Ran a full-text search; no non-commented references to /inbox/v1/_search were found.
  • Remaining v1 mentions are only in commented code and documentation:
    • frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js (commented out)
    • frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/urls.js (commented out)
    • docs/inbox.yml (documentation)
      Please remove or update these legacy entries to complete the migration to the v2 API.
🤖 Prompt for AI Agents
In frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js around
lines 48 to 49, remove the commented out legacy reference to "/inbox/v1/_search"
since it is no longer used. Clean up this commented code to fully transition to
the v2 API and avoid confusion.

"/inbox/v2/_search",

"/tl-services",
Expand Down
13 changes: 7 additions & 6 deletions frontend/micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "egovernments",
"version": "1.5.4",
"main": "index.js",
"workspaces": [
"workspaces": [
"packages/libraries",
"example",
"packages/react-components",
"packages/modules/*"
"packages/modules/*"
],
"author": "Abhinav Kushwaha <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -64,22 +64,23 @@
"deploy:jenkins": "./scripts/jenkins.sh"
},
"devDependencies": {
"@babel/plugin-transform-optional-chaining": "7.25.9",
"husky": "7.0.4",
"lint-staged": "12.3.7",
"npm-run-all": "4.1.5",
"prettier": "2.1.2",
"@babel/plugin-transform-optional-chaining": "7.25.9"
"prettier": "2.1.2"
},
"husky": {},
"lint-staged": {
"*.{js,css,md}": "prettier --write"
},
"dependencies": {
"http-proxy-middleware": "^3.0.5",
"lodash": "4.17.21",
"microbundle-crl": "0.13.11"
} ,
},
"resolutions": {
"**/babel-loader": "8.2.2",
"**/babel-loader": "8.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify babel-loader version downgrade

The babel-loader version has been downgraded from a potentially newer version to 8.1.0. Ensure this doesn't introduce compatibility issues or security vulnerabilities.


🌐 Web query:

What is the latest stable version of babel-loader and are there any known security issues with version 8.1.0?

💡 Result:

As of July 3, 2025, the latest stable version of babel-loader is 10.0.0, released on February 27, 2025. (releasealert.dev)

Regarding version 8.1.0, released on March 20, 2020, there are no known direct security vulnerabilities associated with this version. (security.snyk.io)

However, it's important to note that babel-loader 8.1.0 is significantly outdated, and using such an old version may expose your project to other security risks due to potential vulnerabilities in its dependencies or the absence of security patches. Additionally, newer versions of babel-loader offer improved performance, new features, and better compatibility with recent versions of Babel and webpack.

Therefore, it's highly recommended to upgrade to the latest stable version of babel-loader to ensure your project benefits from the latest security updates and features.

Citations:


Upgrade babel-loader to the latest stable release

[email protected] is four major versions behind the current stable (10.0.0) and—while no direct CVEs have been reported against 8.1.0—using such an old loader can leave you missing critical security patches, performance optimizations, and compatibility fixes with recent Babel and webpack releases. Please update your dependency to at least 10.0.0 (or newer) to keep your build chain secure and up to date.

• File: frontend/micro-ui/web/micro-ui-internals/package.json
Line 83:

-    "**/babel-loader": "8.1.0",
+    "**/babel-loader": "^10.0.0",
📝 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
"**/babel-loader": "8.1.0",
"**/babel-loader": "^10.0.0",
🤖 Prompt for AI Agents
In frontend/micro-ui/web/micro-ui-internals/package.json at line 83, the
babel-loader version is outdated at 8.1.0. Update the babel-loader dependency to
at least version 10.0.0 or newer to ensure you have the latest security patches,
performance improvements, and compatibility fixes. Modify the version string in
the dependencies or devDependencies section accordingly.

"**/@babel/core": "7.14.0",
"**/@babel/preset-env": "7.14.0",
"**/@babel/plugin-transform-modules-commonjs": "7.14.0"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
svg {
height: 20px;
width: 20px;
fill: #f47738;
fill: #4729A3;
margin: auto;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
.banner {
@apply flex justify-center items-center;
height: calc(100vh - 80px);
background: linear-gradient(rgba(11, 75, 102, 0.8), rgba(11, 75, 102, 0.8)), var(--banner-url) center center;
background: linear-gradient(180deg, rgba(5, 117, 230, 0.5) 0%, rgba(89, 50, 234, 0.5) 84.79%, rgba(2, 27, 121, 0.5) 100%);

.bannerCard {
min-width: 400px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.card {
@apply bg-white m-sm px-md pt-md pb-lg shadow-card;
border-radius: 4px;
max-width: 960px;

.card-header {
@apply text-text-primary text-heading-xl font-bold font-rc align-middle text-left mb-md;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@
padding-right: 16px;
padding-left: 16px;
&.active {
border-left: 5px solid #f47738;
border-left: 5px solid #4729A3;
.menu-label {
color: #f47738;
color: #4729A3;
}
.icon {
fill: #f47738;
fill: #4729A3;
}
}

Expand Down Expand Up @@ -220,13 +220,13 @@
padding-right: 16px;
padding-left: 16px;
&.active {
border-left: 5px solid #f47738;
border-left: 5px solid #4729A3;
padding-left: 11px;
.menu-label {
color: #f47738;
color: #4729A3;
}
.icon {
fill: #f47738;
fill: #4729A3;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}

.user-img-txt {
background: #f47738;
background: #4729A3;
padding: 10px 15px;
border-radius: 50%;
color: white;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
.fill-path-primary-main {
path {
fill: #f47738;
fill: #4729A3;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
.inbox-total {
padding: 4px;
display: table;
background-color: #4729A3 !important;
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)

LGTM! Color theme update with specificity note.

The purple color (#4729A3) updates are consistent with the broader UI theme changes. However, the use of !important declarations suggests potential CSS specificity issues. Consider reviewing the CSS cascade to see if these can be resolved without !important.

Also applies to: 434-434

🤖 Prompt for AI Agents
In
frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss
at lines 36 and 434, the background-color uses !important which indicates
specificity conflicts. Review the CSS selectors and structure to increase
specificity or refactor styles so that !important is not needed, ensuring the
purple color applies correctly without overriding issues.

@apply whitespace-normal text-center text-white w-8 h-8 bg-primary-main rounded-full ml-xs;
}
}
Expand Down Expand Up @@ -430,6 +431,7 @@
}
.complaint-links-container .header .removeHeight {
line-height: 28px;
color: #4729A3 !important;
}

@screen dt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
margin-top: 12px;

.user-img-txt {
background: #f47738;
background: #4729A3;
padding: 10px 15px;
border-radius: 50%;
color: white;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.employeeCard {
.submit-bar {
@apply w-full;
background-color: #4729A3B2 !important;
}
Comment on lines 4 to 6
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)

Use theme variable for button background

To stay consistent with the new purple palette use a CSS variable instead of an 8-digit hex literal.

-      background-color: #4729A3B2 !important;
+      background-color: var(--egov-primary-dark-70, rgba(71,41,163,0.7)) !important;
📝 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
@apply w-full;
background-color: #4729A3B2 !important;
}
@apply w-full;
- background-color: #4729A3B2 !important;
+ background-color: var(--egov-primary-dark-70, rgba(71,41,163,0.7)) !important;
}
🤖 Prompt for AI Agents
In
frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss
around lines 4 to 6, replace the hardcoded 8-digit hex color value for the
button background with the appropriate CSS variable from the theme's purple
palette to maintain consistency. Identify the correct CSS variable representing
the purple shade and update the background-color property to use that variable
instead of the literal hex code.

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import usePtMDMS from "./pt/useMDMS";
import usePropertyAssessment from "./pt/usePropertyAssessment";
import usePtCalculationEstimate from "./pt/usePtCalculationEstimate";
import useGenderMDMS from "./pt/useGenderMDMS";
import useSalutationsMDMS from "./pt/useSalutationsMdms";
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify import path casing consistency.

The import path uses "./pt/useSalutationsMdms" but the hook name is useSalutationsMDMS. Please ensure the file name casing matches the expected convention.


🏁 Script executed:

#!/bin/bash
# Description: Verify the actual filename for the salutations hook
# Expected: Find the correct filename to ensure import consistency

fd -t f -e js "useSalutations" --exec echo "Found: {}"

Length of output: 158


Correct import path casing for useSalutationsMDMS

The hook file is named useSalutationsMDMS.js (uppercase “MDMS”), but the import uses "./pt/useSalutationsMdms". On case-sensitive filesystems this will fail to resolve.

• File:
frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js
Line: 105

• Update the import to match the filename casing:

- import useSalutationsMDMS from "./pt/useSalutationsMdms";
+ import useSalutationsMDMS from "./pt/useSalutationsMDMS";
📝 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
import useSalutationsMDMS from "./pt/useSalutationsMdms";
import useSalutationsMDMS from "./pt/useSalutationsMDMS";
🤖 Prompt for AI Agents
In
frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js
at line 105, the import path for useSalutationsMDMS has incorrect casing. Update
the import statement to use the exact filename casing "./pt/useSalutationsMDMS"
to match the file name and avoid resolution errors on case-sensitive
filesystems.

import usePTGenderMDMS from "./pt/usePTGenderMDMS";
import useMyPropertyPayments from "./pt/useMyPropertyPayments";
import useGenericViewProperty from "./pt/useGenericViewProperty";
Expand Down Expand Up @@ -327,6 +328,7 @@ const pt = {
usePropertyAssessment,
usePtCalculationEstimate,
useGenderMDMS,
useSalutationsMDMS,
usePTGenderMDMS,
useMyPropertyPayments,
useGenericViewProperty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ const usePropertyMDMS = (tenantId, moduleCode, type, config = {}) => {
const useSubOwnerShipCategory = () => {
return useQuery("PT_SUB_OWNERSHIP_CATEGORY", () => MdmsService.getPropertySubOwnerShipCategory(tenantId, moduleCode, type), config);
};
const useAssessmentYear = ()=>{
return useQuery("PT_ASSESSMENT_YEAR", () => MdmsService.getPropertyAssessmentYear(tenantId, moduleCode, type), config);
}
const useRoadFactor = ()=>{
return useQuery("PT_ROAD_FACTOR", () => MdmsService.getPropertyRoadFactor(tenantId, moduleCode, type), config);
}

const useDocumentRequiredScreen = () => {
return useQuery("PT_DOCUMENT_REQ_SCREEN", () => MdmsService.getDocumentRequiredScreen(tenantId, moduleCode), config);
};
Expand All @@ -20,6 +27,13 @@ const usePropertyMDMS = (tenantId, moduleCode, type, config = {}) => {
const usePTPropertyType = () => {
return useQuery("PT_PROPERTY_TYPE", () => MdmsService.getPTPropertyType(tenantId, moduleCode, type), config);
};
const usegetPTConstructionType = () => {
return useQuery("PT_CONSTRUCTION_TYPE", () => MdmsService.getPTConstructionType(tenantId, moduleCode, type), config);
};
const usegetPTOccupancyType = () => {
return useQuery("PT_OCCUPANCY_TYPE", () => MdmsService.getPTOccupancyType(tenantId, moduleCode, type), config);
};

const useRentalDetails = () => {
return useQuery("PT_RENTAL_DETAILS", () => MdmsService.getRentalDetails(tenantId, moduleCode), config);
};
Expand All @@ -44,12 +58,20 @@ const usePropertyMDMS = (tenantId, moduleCode, type, config = {}) => {
return usePropertyOwnerType();
case "SubOwnerShipCategory":
return useSubOwnerShipCategory();
case "AssessmentYear":
return useAssessmentYear();
case "RoadFactor":
return useRoadFactor();
case "Documents":
return useDocumentRequiredScreen();
case "UsageCategory":
return useUsageCategory();
case "PTPropertyType":
return usePTPropertyType();
case "ConstructionType":
return usegetPTConstructionType();
case "OccupancyType":
return usegetPTOccupancyType();
case "RentalDetails":
return useRentalDetails();
case "Floor":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { useQuery } from "react-query";
import { MdmsService } from "../../services/elements/MDMS";

const useSalutationsMDMS = (tenantId, moduleCode, type, config = {}) => {
const useSalutationsDetails = () => {
return useQuery("PT_Salutations_DETAILS", () => MdmsService.getSalutationsType(tenantId, moduleCode ,type), config);
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

Use dynamic query key to prevent cache collisions

The hardcoded query key "PT_Salutations_DETAILS" could cause cache issues when the same hook is used with different parameters.

- return useQuery("PT_Salutations_DETAILS", () => MdmsService.getSalutationsType(tenantId, moduleCode ,type), config);
+ return useQuery(
+   ["PT_Salutations_DETAILS", tenantId, moduleCode, type], 
+   () => MdmsService.getSalutationsType(tenantId, moduleCode, type), 
+   config
+ );
📝 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
return useQuery("PT_Salutations_DETAILS", () => MdmsService.getSalutationsType(tenantId, moduleCode ,type), config);
return useQuery(
["PT_Salutations_DETAILS", tenantId, moduleCode, type],
() => MdmsService.getSalutationsType(tenantId, moduleCode, type),
config
);
🤖 Prompt for AI Agents
In
frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pt/useSalutationsMDMS.js
at line 6, the query key for useQuery is hardcoded as "PT_Salutations_DETAILS",
which can cause cache collisions when the hook is called with different
tenantId, moduleCode, or type parameters. To fix this, change the query key to a
dynamic array that includes these parameters, such as ["PT_Salutations_DETAILS",
tenantId, moduleCode, type], so that the cache is properly scoped per unique
parameter set.

};


switch (type) {
case "Salutations":
return useSalutationsDetails();
}
};
Comment on lines +10 to +14
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

Improve switch statement and add default case

The switch statement only handles one case and lacks a default case, which could lead to undefined behavior.

  switch (type) {
    case "Salutations":
      return useSalutationsDetails();
+   default:
+     throw new Error(`Unsupported salutation type: ${type}`);
  }
📝 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
switch (type) {
case "Salutations":
return useSalutationsDetails();
}
};
switch (type) {
case "Salutations":
return useSalutationsDetails();
default:
throw new Error(`Unsupported salutation type: ${type}`);
}
};
🤖 Prompt for AI Agents
In
frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pt/useSalutationsMDMS.js
around lines 10 to 14, the switch statement only handles the "Salutations" case
and lacks a default case, which can cause undefined behavior if an unexpected
type is passed. Add a default case to the switch statement that returns a safe
fallback value or handles the unexpected input appropriately to ensure
predictable behavior.




export default useSalutationsMDMS;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Urls = {
localization: `/localization/messages/v1/_search`,
location: {
localities: `/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=ADMIN&boundaryType=Locality`,
revenue_localities: `/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=REVENUE&boundaryType=Locality`,
revenue_localities: `/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=REVENUE&boundaryType=City`,
},

pgr_search: `/pgr-services/v2/request/_search`,
Expand All @@ -25,8 +25,10 @@ const Urls = {
UserProfileUpdate: "/user/profile/_update",
EmployeeSearch: "/egov-hrms/employees/_search",

InboxSearch: "/inbox/v1/_search",
// InboxSearch: "/inbox/v1/_search",
InboxSearch: "/inbox/v2/_search",
InboxSearchV2: "/inbox/v2/_search",

Comment on lines +28 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify inbox search API migration completion

The inbox search has been migrated from v1 to v2 endpoint. Ensure all consuming services have been updated to use the new endpoint.


🏁 Script executed:

#!/bin/bash
# Description: Verify all inbox search references use v2 endpoint
# Expected: No remaining references to v1 inbox search endpoint

echo "=== Searching for inbox/v1/_search references ==="
rg -A 3 -B 3 "inbox/v1/_search"

echo "=== Searching for InboxSearch usage ==="
rg -A 3 -B 3 "InboxSearch"

echo "=== Searching for inbox/v2/_search references ==="
rg -A 3 -B 3 "inbox/v2/_search"

Length of output: 18333


Ensure complete migration of the inbox search API to v2

We’ve still got remnants of the v1 endpoint in our docs and example proxy setup. Please update the following:

• frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js
– Remove the commented-out "/inbox/v1/_search" line to avoid confusion.

• docs/inbox.yml
– Replace the entire /inbox/v1/_search: path definition with /inbox/v2/_search: (and update any example requests/responses accordingly).

Optionally, consider aligning the SearchV2 helper in InboxService.js to explicitly use Urls.InboxSearchV2 rather than Urls.InboxSearch for clarity, even though both currently point to v2.

Once these are updated, rerun the grep checks to confirm there are no remaining v1 references.

🤖 Prompt for AI Agents
In
frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/urls.js
around lines 28 to 31, ensure the inbox search API migration to v2 is complete
by removing any references to the v1 endpoint in related files. Specifically, in
frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js, delete the
commented-out "/inbox/v1/_search" line to prevent confusion. In docs/inbox.yml,
replace the entire /inbox/v1/_search path definition with /inbox/v2/_search and
update example requests and responses accordingly. Optionally, update
InboxService.js to have the SearchV2 helper explicitly use Urls.InboxSearchV2
instead of Urls.InboxSearch for clarity. After these changes, rerun grep checks
to confirm no v1 references remain.


UserSearch: "/user/_search",
UserLogout: "/user/_logout",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const InboxGeneral = {
},
SearchV2: ({ ...filters }) => {
return Request({
url: Urls.InboxSearchV2,
// url: Urls.InboxSearchV2,
url: Urls.InboxSearch,
useCache: false,
method: "POST",
auth: true,
Expand Down
Loading