Skip to content

Conversation

@nabeelmd-eGov
Copy link
Contributor

@nabeelmd-eGov nabeelmd-eGov commented Dec 16, 2025

  • summary fix
  • remove toast on switching tabs and flows
  • validation fix
  • pop up fixes, scanner label fix
  • radio and dropdown fix
  • campaign old date and name fixed
  • campaign old date and name fixed
  • Wrap AppHelpDrawer in React Portal to fix overlay issues
  • css fix
  • add custom loc key
  • create campaign name & date error fix
  • button disable fix for upcoming campaign fix
  • validation ignore when empty, version increment even inside form added
  • default landing to employee
  • css fix
  • boundary update screen fix
  • BUGFIX/GIT-3473:: Delivery rules fixes during update flow and refetching delivery rules (BUGFIX/GIT-3473:: Delivery rules fixes during update flow and refetching delivery rules #3515)
  • UI-UX Fixes and libraries upgrade and excel-ingestion apis update (UI-UX Fixes and libraries upgrade and excel-ingestion apis update #3521)
  • Update campaign flow fix for unified sheet flow
  • create campaign flow fix response screen text fix
  • Added boundary-management api integration (Added boundary-management api integration #3534)
  • fixed url
  • Range single value validation skip fix
  • UI-UX fixes
  • Multiselect dropdown select all issue, add product issue, cancel campaign fix, checkist issue fix
  • MDMS CONFIG RENAME AND Changes
  • checklist issue fix dummy loader rename
  • css upgrade

Choose the appropriate template for your PR:

Feature/Bugfix Request

JIRA ID

Module

Description

Summary by CodeRabbit

  • New Features

    • Enhanced mobile form field rendering with improved layout and input types support (text, textarea, number).
  • Bug Fixes

    • Improved spacing and alignment of mobile checklist items and form fields for better readability.
  • Style

    • Updated styling dependencies and adjusted campaign card and mobile layout CSS for improved visual consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

NabeelAyubee and others added 30 commits November 27, 2025 16:04
- Added ReactDOM import to AppHelpTutorial component
- Wrapped AppHelpDrawer JSX with ReactDOM.createPortal to render
  the tutorial overlay directly to document.body
- This prevents z-index and stacking context issues when the
  component is nested inside other elements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@nabeelmd-eGov nabeelmd-eGov requested a review from a team as a code owner December 16, 2025 15:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

📝 Walkthrough

Walkthrough

This PR updates CSS dependency versions across multiple HTML files, refactors MDMS schema references throughout the campaign manager module (renaming schema codes), enhances the MobileChecklist component to support multiple field types, renames the DummyLoader component to AppConfigInitializer, removes unused Redux logic, and adjusts CSS spacing and navigation paths.

Changes

Cohort / File(s) Summary
CSS Dependency Version Bump
health/micro-ui/web/builds/console/public/index.html, health/micro-ui/web/builds/core-ui/public/index.html, health/micro-ui/web/builds/workbench-ui/public/index.html
Updated digit-ui-health-css from 0.1.18-rc19 to 0.1.19-rc19 across all public index files
CSS Styling Adjustments
health/micro-ui/web/packages/css/src/pages/employee/campaign.scss, health/micro-ui/web/packages/css/src/pages/employee/checklist.scss
Applied fixed width sizing to campaign cards; added vertical spacing and responsive field wrapper styles to mobile checklist items
MobileChecklist Component Enhancement
health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
Expanded field type support to render SingleValueList/MultiValueList options, text inputs, textareas, number inputs, and numeric steppers using FieldV1 component with read-only behavior
MDMS Schema Refactoring
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js, health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js, health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/pageFieldsSlice.js, health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js, health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js, health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
Updated MDMS schema code references: NewFormConfig → TransformedFormConfig; NewApkConfig → FormConfig; AppConfigCache → TransformedFormConfig; NewFieldType → FieldTypeMappingConfig; NewDrawerPanelConfig → FieldPropertiesPanelConfig
Redux Cleanup
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/localizationSlice.js
Removed fetchAppScreenConfig async thunk and associated state properties (appScreenConfig, screenConfigStatus, screenConfigError) and reducer cases
Field Composer Update
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDrawerFieldComposer.js
Renamed textarea case label from "textarea" to "textArea" in ConditionalField; adjusted spacing in FieldV1 dropdown configuration
Component Rename & Routing
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js, health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js
Renamed DummyLoader component to AppConfigInitializer; updated route path from dummy-loader to app-config-init
Navigation & Config Updates
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js, health/micro-ui/web/public/index.html
Removed query parameter from campaign templates navigation; replaced globalConfigsWorkbenchHCMMZ.js with globalConfigsWorkbenchDev.js

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • MobileChecklist.js: Multiple conditional rendering branches for different field types (text, textarea, number, numeric stepper) require verification of correct type matching and read-only behavior implementation
  • MDMS schema refactoring: Six files with interconnected schema name changes (NewFormConfig→TransformedFormConfig, NewApkConfig→FormConfig, etc.) need verification of correct and consistent application
  • Redux localizationSlice.js removal: Ensure fetchAppScreenConfig removal doesn't break downstream dependencies or other module imports
  • Component rename propagation: Verify DummyLoader→AppConfigInitializer rename is complete across all imports and route references
  • CSS field wrapper styles: Confirm responsive width rules and margin adjustments render correctly on mobile checklist items

Possibly related PRs

Suggested reviewers

  • Swathi-eGov
  • Ramkrishna-egov
  • jagankumar-egov

Poem

🐰 Schemas hop to new names so grand,
DummyLoader transformed across the land,
Mobile checklists bloom with fields anew,
Text and numbers in every hue!
CSS bumps and spacing just right,
Configuration magic burning bright! ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 2 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a long list of unrelated fixes without proper template structure; missing JIRA ID, module specification, and coherent description of the primary change. Complete the PR description template with a JIRA ID, specify affected modules, and provide a clear summary of the main changes rather than a bulleted list of unrelated fixes.
Out of Scope Changes check ⚠️ Warning The PR contains many changes beyond the delivery rules fix in #3515: MDMS schema renames, component renaming, CSS asset updates, HTML index updates, and checklist styling changes. Clarify the scope of this PR by documenting all intended changes or split unrelated changes (CSS upgrades, MDMS renames, component renames) into separate PRs.
Title check ❓ Inconclusive The PR title contains vague terms like 'Dummy loader change' and tries to cover too many unrelated changes (loader rename, CSS upgrade, checklist change, MDMS rename), making it unfocused and hard to parse. Consider using a focused title like 'Refactor DummyLoader to AppConfigInitializer and update MDMS schema references' or split into multiple PRs by functional area.
Linked Issues check ❓ Inconclusive Only one linked issue (#3515) addresses delivery rules fixes; the PR changes also include MDMS schema renames, component renames, CSS upgrades, and checklist changes that are not covered by linked issues. Verify that all substantial code changes (MDMS renames, DummyLoader→AppConfigInitializer rename, CSS upgrades) align with actual JIRA/GitHub issues and link them appropriately.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 3381-new

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js (2)

56-58: Add validation before data transformation.

The code calls transformMdmsToAppConfig before verifying that appConfigResponse.mdms exists (checked later on line 60). This can lead to:

  • Line 56: Potential TypeError if response.mdms is null/undefined rather than an array
  • Line 58: Undefined version passed to transformMdmsToAppConfig when no existing config exists

Apply this diff to add validation:

-    const fullData = response?.mdms && response?.mdms?.map((item) => item.data);
-    
-    const transformedData = transformMdmsToAppConfig(fullData, appConfigResponse.mdms?.[0].data?.version);
-    // Step 3: Update the existing config's mdms property with transformedData
     if (appConfigResponse?.mdms && appConfigResponse.mdms.length > 0) {
+      if (!response?.mdms || !Array.isArray(response.mdms)) {
+        console.error("No TransformedFormConfig data found");
+        setShowToast({ key: "error", label: "APP_CONFIG_UPDATE_FAILED" });
+        setTimeout(() => navigate(-1), 3000);
+        return;
+      }
+      
+      const fullData = response.mdms.map((item) => item.data);
+      const transformedData = transformMdmsToAppConfig(fullData, appConfigResponse.mdms[0].data?.version);
+      
       const existingConfig = appConfigResponse.mdms?.[0].data;

85-87: Consider state-based navigation instead of setTimeout.

The current pattern uses setTimeout for navigation, which can be fragile if the component unmounts during the delay or if the user expects immediate feedback.

Consider these alternatives:

  1. Navigate immediately after showing the toast and let the next screen handle the message display
  2. Add a button to the toast for user-controlled navigation
  3. Store navigation intent in state and use it in a cleanup-safe way

Example for immediate navigation with toast on next screen:

-        setLoaderText("APP_CONFIG_SUBMITTED_REDIRECTING");
-        setTimeout(() => {
-          navigate(`/${window?.contextPath}/employee/campaign/new-app-modules?campaignNumber=${campaignNumber}&tenantId=${tenantId}`);
-        }, 3000);
+        navigate(
+          `/${window?.contextPath}/employee/campaign/new-app-modules?campaignNumber=${campaignNumber}&tenantId=${tenantId}`,
+          { state: { successMessage: "APP_CONFIG_SUBMITTED" } }
+        );

Also applies to: 92-94, 100-102

health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js (1)

36-122: Improve error handling for better user experience.

The error handling in the useEffect only logs errors to the console (line 116), which means users could be stuck on a loading screen indefinitely if API calls fail. Consider adding user-facing error feedback.

Apply this diff to add error state and user feedback:

+import { Toast } from "@egovernments/digit-ui-components";
+
 const AppConfigInitializer = () => {
   const { t } = useTranslation();
   const navigate = useNavigate();
+  const [error, setError] = useState(null);
   const searchParams = new URLSearchParams(location.search);
   // ... rest of code
 
   useEffect(() => {
     if (mdmsData && mdmsData.length > 0) {
       const processData = async () => {
         try {
+          setError(null);
           // ... existing code
         } catch (error) {
           console.error("Error processing MDMS data:", error);
+          setError(t("ERROR_PROCESSING_CONFIG"));
         }
       };
 
       processData();
     }
   }, [mdmsData, campaignNumber, flow, navigate, tenantId]);
 
+  if (error) {
+    return (
+      <div style={{ display: "flex", flexDirection: "column", alignItems: "center", marginTop: "2rem" }}>
+        <Toast type="error" label={error} onClose={() => setError(null)} />
+        <Button
+          label={t("GO_BACK")}
+          onClick={() => navigate(-1)}
+          variation="secondary"
+          style={{ marginTop: "1rem" }}
+        />
+      </div>
+    );
+  }
+
   return <Loader page={true} variant={"OverlayLoader"} loaderText={t("LOADING_MODULE", { module: flow, campaign: campaignNumber })} />;
 };
♻️ Duplicate comments (3)
health/micro-ui/web/builds/console/public/index.html (1)

13-13: Same CSS version update as core-ui build.

This CSS version update is consistent with the change in health/micro-ui/web/builds/core-ui/public/index.html. Refer to the verification request in that file.

health/micro-ui/web/public/index.html (1)

13-13: CSS version update consistent with other builds.

The CSS version update to 0.1.19-rc19 is consistent across all build artifacts. Refer to the verification request in health/micro-ui/web/builds/core-ui/public/index.html.

health/micro-ui/web/builds/workbench-ui/public/index.html (1)

13-13: CSS version update consistent with other builds.

The CSS version update to 0.1.19-rc19 matches the coordinated change across all build artifacts. Refer to the verification request in health/micro-ui/web/builds/core-ui/public/index.html.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3cbec0f and ccb26ea.

⛔ Files ignored due to path filters (7)
  • health/configs/Schemas/HCM-ADMIN-CONSOLE.FieldPropertiesPanelConfig.json is excluded by !**/*.json
  • health/configs/Schemas/HCM-ADMIN-CONSOLE.FieldTypeConfig.json is excluded by !**/*.json
  • health/configs/Schemas/HCM-ADMIN-CONSOLE.FormConfig.json is excluded by !**/*.json
  • health/configs/Schemas/HCM-ADMIN-CONSOLE.FormConfigTemplate.json is excluded by !**/*.json
  • health/configs/Schemas/HCM-ADMIN-CONSOLE.TransformedFormConfig.json is excluded by !**/*.json
  • health/micro-ui/web/packages/css/package.json is excluded by !**/*.json
  • health/micro-ui/web/packages/modules/campaign-manager/package.json is excluded by !**/*.json
📒 Files selected for processing (17)
  • health/micro-ui/web/builds/console/public/index.html (1 hunks)
  • health/micro-ui/web/builds/core-ui/public/index.html (1 hunks)
  • health/micro-ui/web/builds/workbench-ui/public/index.html (1 hunks)
  • health/micro-ui/web/packages/css/src/pages/employee/campaign.scss (1 hunks)
  • health/micro-ui/web/packages/css/src/pages/employee/checklist.scss (2 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js (3 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js (3 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js (5 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDrawerFieldComposer.js (2 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/localizationSlice.js (0 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js (1 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js (6 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js (2 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js (1 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js (2 hunks)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js (2 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
💤 Files with no reviewable changes (1)
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/localizationSlice.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js

⚙️ CodeRabbit configuration file

check

Files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDrawerFieldComposer.js
🧠 Learnings (18)
📓 Common learnings
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend PR: 741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js:15-15
Timestamp: 2024-10-08T20:11:12.539Z
Learning: When adding a new module code like "campaignmanager" to `moduleCode`, ensure that it is properly handled in all relevant conditional checks and function parameters across the codebase.
📚 Learning: 2025-06-26T10:17:02.717Z
Learnt from: Hari-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/builds/core-ui/public/index.html
  • health/micro-ui/web/builds/console/public/index.html
  • health/micro-ui/web/builds/workbench-ui/public/index.html
  • health/micro-ui/web/public/index.html
📚 Learning: 2025-01-02T04:41:15.957Z
Learnt from: jagankumar-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js
📚 Learning: 2024-06-10T19:25:42.992Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js
  • health/micro-ui/web/builds/console/public/index.html
  • health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
📚 Learning: 2025-06-26T10:38:13.794Z
Learnt from: Hari-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js
📚 Learning: 2025-02-05T10:18:29.947Z
Learnt from: Tulika-eGov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js
📚 Learning: 2024-10-08T20:11:12.539Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend PR: 741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js:15-15
Timestamp: 2024-10-08T20:11:12.539Z
Learning: When adding a new module code like "campaignmanager" to `moduleCode`, ensure that it is properly handled in all relevant conditional checks and function parameters across the codebase.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js
📚 Learning: 2024-11-07T07:17:27.636Z
Learnt from: jagankumar-egov
Repo: egovernments/DIGIT-Frontend PR: 1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
📚 Learning: 2024-11-07T11:02:33.520Z
Learnt from: rachana-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDrawerFieldComposer.js
📚 Learning: 2024-06-10T19:25:42.992Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend PR: 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js
📚 Learning: 2025-06-26T10:24:08.628Z
Learnt from: Hari-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/css/src/pages/employee/checklist.scss
📚 Learning: 2024-10-11T10:00:29.720Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/css/src/pages/employee/checklist.scss
📚 Learning: 2024-06-10T19:25:42.992Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend 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`.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js
  • health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
  • health/micro-ui/web/public/index.html
📚 Learning: 2025-08-19T07:07:45.217Z
Learnt from: syedkaifegov
Repo: egovernments/DIGIT-Frontend PR: 3012
File: micro-ui/web/micro-ui-internals/packages/css/src/index.scss:692-696
Timestamp: 2025-08-19T07:07:45.217Z
Learning: CSS changes for .employee-app-wrapper.sandbox are specific to Urban repo's sandbox branch implementation, not related to sandbox-login-page components found in the main codebase.

Applied to files:

  • health/micro-ui/web/packages/css/src/pages/employee/campaign.scss
📚 Learning: 2025-10-23T10:53:42.448Z
Learnt from: jagankumar-egov
Repo: egovernments/DIGIT-Frontend PR: 3275
File: health/micro-ui/web/micro-ui-internals/packages/modules/health-hrms/src/services/urls.js:49-52
Timestamp: 2025-10-23T10:53:42.448Z
Learning: In the DIGIT-Frontend health modules (health-hrms and health-payments), service endpoint URLs should always be config-driven using window.globalConfigs.getConfig() with fallback defaults, never hardcoded. Established config keys include: HRMS_CONTEXT_PATH, ATTENDANCE_CONTEXT_PATH, INDIVIDUAL_CONTEXT_PATH, PROJECT_CONTEXT_PATH, MUSTER_ROLL_CONTEXT_PATH, EXPENSE_CONTEXT_PATH, EXPENSE_CALCULATOR_CONTEXT_PATH, and BOUNDARY_CONTEXT_PATH. The setupProxy.js file may be an exception as it's development-only.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js
  • health/micro-ui/web/public/index.html
📚 Learning: 2024-10-08T20:11:12.539Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js
📚 Learning: 2024-06-14T14:10:38.086Z
Learnt from: siddhant-nawale-egov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
📚 Learning: 2024-10-26T15:11:49.938Z
Learnt from: nabeelmd-eGov
Repo: egovernments/DIGIT-Frontend 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.

Applied to files:

  • health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDrawerFieldComposer.js
🧬 Code graph analysis (5)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js (5)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js (2)
  • response (15-30)
  • mdmsContext (3-3)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/localizationSlice.js (2)
  • response (12-16)
  • response (36-36)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/flowPagesSlice.js (2)
  • response (10-24)
  • mdmsContext (3-3)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js (2)
  • mdmsContext (18-18)
  • tenantId (16-16)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/FullConfigWrapper.js (2)
  • mdmsContext (15-15)
  • tenantId (24-24)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js (1)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppModule.js (1)
  • schemaCode (30-30)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js (1)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js (1)
  • AppConfigInitializer (9-125)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js (6)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js (1)
  • mdmsContext (7-7)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js (1)
  • mdmsContext (3-3)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/FullConfigWrapper.js (1)
  • mdmsContext (15-15)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/flowPagesSlice.js (1)
  • mdmsContext (3-3)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/labelFieldPairSlice.js (1)
  • mdmsContext (7-7)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/localizationSlice.js (1)
  • MODULE_CONSTANTS (3-3)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js (4)
health/micro-ui/web/packages/modules/campaign-manager/src/Module.js (1)
  • moduleName (131-131)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignDetails.js (1)
  • moduleName (154-154)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/transformMdmsConfig.js (1)
  • moduleName (16-16)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDependentFieldWrapper.js (1)
  • moduleName (83-83)
🪛 Biome (2.1.2)
health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js

[error] 53-53: A form label must be associated with an input.

Consider adding a for or htmlFor attribute to the label element or moving the input element to inside the label element.

(lint/a11y/noLabelWithoutControl)

🔇 Additional comments (17)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigSaveLoader.js (2)

22-37: LGTM: schemaCode update aligns with MDMS rename.

The update from NewFormConfig to TransformedFormConfig is consistent with the broader MDMS schema renaming across the campaign-manager module.


39-54: LGTM: schemaCode update aligns with MDMS rename.

The update from NewApkConfig to FormConfig is consistent with the broader MDMS schema renaming across the campaign-manager module.

health/micro-ui/web/public/index.html (1)

21-21: Verify the global config script change is correct for the target environment.

The global config script was changed from globalConfigsWorkbenchHCMMZ.js to globalConfigsWorkbenchDev.js. The "Dev" suffix suggests this is a development environment configuration.

Confirm that this is the intended configuration for the deployment target and not an accidental environment mismatch.

health/micro-ui/web/builds/core-ui/public/index.html (1)

13-13: Verify the CSS package version exists and flag security concerns.

The package @egovernments/[email protected] should be verified for availability on unpkg and checked for security vulnerabilities. Confirm the package exists on the CDN and review npm security advisories for this specific version.

health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/redux/pageFieldsSlice.js (1)

20-20: Schema rename is complete and consistently applied.

All references to the old schema have been updated to TransformedFormConfig across the campaign manager module. The change follows the established pattern used in other related files (AppFeatures.js, AppConfigInitializer.js, AppConfigurationWrapper.js, AppConfigSaveLoader.js).

health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppFeatures.js (1)

103-103: MDMS schema references updated consistently for cache operations.

The MDMS schema references have been updated from AppConfigCache to TransformedFormConfig in both:

  • The cache data fetch criteria (line 103)
  • The cache clearing mutation (line 231)

This maintains consistency between read and write operations and aligns with the broader MDMS schema migration across the campaign-manager module.

Also applies to: 231-231

health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/AppConfigInitializer.js (2)

9-9: Component rename completed consistently.

The component has been renamed from DummyLoader to AppConfigInitializer throughout the file:

  • Component declaration (line 9)
  • Default export (line 127)

This aligns with the updated import in index.js and the new route path app-config-init.

Also applies to: 18-18, 127-127


18-18: MDMS schema references are correctly documented.

The MDMS schema codes match the code implementation:

  • Initial fetch: FormConfig (line 18)
  • Existence check: TransformedFormConfig (line 46)
  • Creation payload and endpoint: TransformedFormConfig (lines 74, 80)
  • Flow config: AppFlowConfig (line 101)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/NewAppModule.js (1)

15-15: MDMS schema and navigation updates are verified as consistent.

The FormConfig schema is properly defined in the MDMS backend as part of HCM-ADMIN-CONSOLE. The changes align with the broader refactoring:

  • MDMS schemaCode correctly updated from NewApkConfig to FormConfig
  • Navigation path correctly updated from dummy-loader to app-config-init, matching the component rename (DummyLoader → AppConfigInitializer)
  • No remaining references to the old NewApkConfig schema
  • Both changes are consistent with the related updates in index.js (route definition) and AppConfigInitializer.js (component rename)
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/index.js (1)

12-12: Component rename and route update are consistent.

The import, route path, and element have been updated consistently:

  • Import: DummyLoaderAppConfigInitializer
  • Route path: dummy-loaderapp-config-init
  • Element: <DummyLoader /><AppConfigInitializer />

Navigation calls throughout the codebase have been updated to use the new app-config-init route, and no remaining references to the old dummy-loader route exist.

health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js (1)

7-7: Removal of fetchAppScreenConfig is safe and verified as complete.

The import has been completely removed from this file. A comprehensive search of the entire codebase confirms there are no remaining references to fetchAppScreenConfig, indicating the cleanup was intentional and thorough. No other parts of the application depend on this function.

health/micro-ui/web/packages/css/src/pages/employee/campaign.scss (1)

1026-1029: LGTM!

The wrapper simplification aligns with the card-level styling changes. The transparent background and no box-shadow is appropriate for a wrapper container.

health/micro-ui/web/packages/css/src/pages/employee/checklist.scss (1)

453-469: LGTM!

The new mobile field wrapper styles properly support the FieldV1 component integration in MobileChecklist. The width: 100% rule ensures proper mobile responsiveness, and the margin-bottom: 0 reset on .digit-field-wrapper prevents unwanted spacing accumulation.

health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/NewDrawerFieldComposer.js (2)

1143-1146: LGTM!

The disablePortal and optionsCustomStyle properties are correctly configured for the dropdown within the drawer context.


1065-1084: Remove the unused case "textArea": handler in ConditionalField switch statement—it's dead code never reached from current configuration.

The conditional fields rendered by this component (lines 104–111) are filtered from panelItem.conditionalField, which only includes types: text, number, options, dropdown, filters, radioOptions, and dependencyFieldWrapper. No configuration defines a conditional field with type "textArea", so the case "textArea": at line 1068 is unreachable. Either remove it, or add a conditional field type definition in fieldPanelPropertiesSlice.js if this was intended for future use.

Likely an incorrect or invalid review comment.

health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js (2)

1-6: LGTM!

The FieldV1 import and filter syntax updates are clean. The component integration properly supports the expanded field type rendering in the mobile checklist preview.


59-93: Consider normalizing type code comparisons for maintainability.

The type code checks use various string literals with inconsistent casing (e.g., "text" vs "Text", "number" vs "Number", "numeric" vs "Numeric"). While this likely handles different data sources, it could be brittle if new type codes are added.

Consider extracting type codes to constants or using case-insensitive comparison:

const TEXT_INPUT_TYPES = ["Short Answer", "String", "text"];
const TEXTAREA_TYPES = ["Long Answer", "Paragraph", "textarea"];
const NUMBER_TYPES = ["Number", "Integer", "number"];
const NUMERIC_STEPPER_TYPES = ["Numeric", "numeric"];

// Usage:
{TEXT_INPUT_TYPES.includes(question.type.code) && (
  // render text input
)}

This improves maintainability when type codes are added or changed.

⛔ Skipped due to learnings
Learnt from: nabeelmd-eGov
Repo: egovernments/DIGIT-Frontend 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.

Comment on lines 931 to +934
.digit-campaign-home-card {
display: flex;
justify-content: flex-start;
min-width: 31.25rem;
max-width: 100%;
flex: 1;
width: 31.25rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider responsive width handling for campaign cards.

The fixed width of 31.25rem (500px) may cause horizontal overflow on smaller screens or narrow viewports. The previous flex-based sizing likely provided better responsiveness.

Consider adding a max-width constraint with responsive fallback:

 .digit-campaign-home-card {
   display: flex;
   justify-content: flex-start;
-  width: 31.25rem;
+  width: 31.25rem;
+  max-width: 100%;

Alternatively, if the design explicitly requires this fixed width on all screen sizes, ensure the parent container handles overflow appropriately.

📝 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
.digit-campaign-home-card {
display: flex;
justify-content: flex-start;
min-width: 31.25rem;
max-width: 100%;
flex: 1;
width: 31.25rem;
.digit-campaign-home-card {
display: flex;
justify-content: flex-start;
width: 31.25rem;
max-width: 100%;
🤖 Prompt for AI Agents
In health/micro-ui/web/packages/css/src/pages/employee/campaign.scss around
lines 931-934, the .digit-campaign-home-card uses a fixed width: 31.25rem which
can cause horizontal overflow on small viewports; replace the hard width with a
responsive approach such as using max-width: 31.25rem combined with width: 100%
(or a flex-basis-based sizing) so the card shrinks on narrow screens, and
optionally add a media query to enforce the fixed width at larger breakpoints;
if the design truly requires a constant 31.25rem, instead keep the fixed width
but ensure the parent container handles overflow (overflow-x: auto or wrapping)
to avoid layout breakage.

Comment on lines +38 to +58
{question.options.map((option, index) => (
<div key={index} className="mobile-option-item">
{/* Conditionally render radio or checkbox based on question.type.code */}
{question.type.code === "SingleValueList" ? (
<input
type="radio"
name={`question-${question.id}`}
onClick={(e) => e.preventDefault()} // Prevents interaction
/>
) : (
<input
type="checkbox"
onClick={(e) => e.preventDefault()} // Prevents interaction
/>
)}
<label className="mobile-answer">{option.label}</label>
</div>
))}
<div style={{ height: "0.5rem" }}></div>
</div>
)}
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 | 🟡 Minor

Fix accessibility: Associate label with input control.

The static analysis correctly identifies that the <label> on line 53 is not associated with its corresponding input. This breaks screen reader navigation.

Apply this diff to fix the accessibility issue:

                     {question.type.code === "SingleValueList" ? (
                       <input
                         type="radio"
                         name={`question-${question.id}`}
+                        id={`option-${question.id}-${index}`}
                         onClick={(e) => e.preventDefault()} // Prevents interaction
                       />
                     ) : (
                       <input
                         type="checkbox"
+                        id={`option-${question.id}-${index}`}
                         onClick={(e) => e.preventDefault()} // Prevents interaction
                       />
                     )}
-                    <label className="mobile-answer">{option.label}</label>
+                    <label htmlFor={`option-${question.id}-${index}`} className="mobile-answer">{option.label}</label>
📝 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
{question.options.map((option, index) => (
<div key={index} className="mobile-option-item">
{/* Conditionally render radio or checkbox based on question.type.code */}
{question.type.code === "SingleValueList" ? (
<input
type="radio"
name={`question-${question.id}`}
onClick={(e) => e.preventDefault()} // Prevents interaction
/>
) : (
<input
type="checkbox"
onClick={(e) => e.preventDefault()} // Prevents interaction
/>
)}
<label className="mobile-answer">{option.label}</label>
</div>
))}
<div style={{ height: "0.5rem" }}></div>
</div>
)}
{question.options.map((option, index) => (
<div key={index} className="mobile-option-item">
{/* Conditionally render radio or checkbox based on question.type.code */}
{question.type.code === "SingleValueList" ? (
<input
type="radio"
name={`question-${question.id}`}
id={`option-${question.id}-${index}`}
onClick={(e) => e.preventDefault()} // Prevents interaction
/>
) : (
<input
type="checkbox"
id={`option-${question.id}-${index}`}
onClick={(e) => e.preventDefault()} // Prevents interaction
/>
)}
<label htmlFor={`option-${question.id}-${index}`} className="mobile-answer">{option.label}</label>
</div>
))}
<div style={{ height: "0.5rem" }}></div>
</div>
)}
🧰 Tools
🪛 Biome (2.1.2)

[error] 53-53: A form label must be associated with an input.

Consider adding a for or htmlFor attribute to the label element or moving the input element to inside the label element.

(lint/a11y/noLabelWithoutControl)

🤖 Prompt for AI Agents
In
health/micro-ui/web/packages/modules/campaign-manager/src/components/MobileChecklist.js
around lines 38 to 58, the <label> is not associated with its input which breaks
screen reader navigation; assign each input a stable unique id (e.g.
`question-${question.id}-option-${index}`) and set the corresponding label's
htmlFor to that id so the label is properly linked to the control; keep the
conditional input types and existing attributes (name/type) and ensure keys
remain unique.

// Make the update call
const response = await Digit.CustomService.getResponse({
url: `/${mdmsContext}/v2/_update/${MODULE_CONSTANTS}.AppConfigCache`,
url: `/${mdmsContext}/v2/_update/${MODULE_CONSTANTS}.TransformedFormConfig`,
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# First, locate and examine the target file
FILE_PATH="health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewAppConfiguration/AppConfigurationWrapper.js"

# Check if file exists
if [ -f "$FILE_PATH" ]; then
  # Display file info and line count
  echo "File found. Total lines: $(wc -l < "$FILE_PATH")"
  echo ""
  echo "=== Lines 95-105 (around line 99) ==="
  sed -n '95,105p' "$FILE_PATH"
  echo ""
  echo "=== Lines 160-170 (around line 163) ==="
  sed -n '160,170p' "$FILE_PATH"
  echo ""
  echo "=== Lines 198-208 (around line 201) ==="
  sed -n '198,208p' "$FILE_PATH"
  echo ""
  echo "=== Lines 209-219 (around line 212) ==="
  sed -n '209,219p' "$FILE_PATH"
else
  echo "File not found at path: $FILE_PATH"
  # Try to find it with fd
  echo "Searching for AppConfigurationWrapper.js..."
  fd "AppConfigurationWrapper.js" -type f
fi

Repository: egovernments/DIGIT-Frontend

Length of output: 1562


🏁 Script executed:

#!/bin/bash

# Search for old schema names in the entire codebase
echo "=== Searching for OLD schema names ==="
echo ""
echo "--- Searching for 'AppConfigCache' ---"
rg -i "AppConfigCache" --type js --type json -A 2 -B 2 || echo "Not found"
echo ""
echo "--- Searching for 'NewFormConfig' ---"
rg -i "NewFormConfig" --type js --type json -A 2 -B 2 || echo "Not found"
echo ""
echo "--- Searching for 'NewFieldType' ---"
rg -i "NewFieldType" --type js --type json -A 2 -B 2 || echo "Not found"
echo ""
echo "--- Searching for 'NewDrawerPanelConfig' ---"
rg -i "NewDrawerPanelConfig" --type js --type json -A 2 -B 2 || echo "Not found"
echo ""
echo "=== Searching for NEW schema names ==="
echo ""
echo "--- Searching for 'TransformedFormConfig' ---"
rg "TransformedFormConfig" --type js --type json | head -20
echo ""
echo "--- Searching for 'FieldTypeMappingConfig' ---"
rg "FieldTypeMappingConfig" --type js --type json | head -20
echo ""
echo "--- Searching for 'FieldPropertiesPanelConfig' ---"
rg "FieldPropertiesPanelConfig" --type js --type json | head -20

Repository: egovernments/DIGIT-Frontend

Length of output: 19656


MDMS schema references updated consistently in new implementation.

The MDMS schema references have been correctly updated in AppConfigurationWrapper.js:

  • Line 99: TransformedFormConfig in update URL ✓
  • Line 163: TransformedFormConfig in schemaCode ✓
  • Line 201: FieldTypeMappingConfig
  • Line 212: FieldPropertiesPanelConfig

These changes are part of a new implementation in health/micro-ui/web/packages/modules/campaign-manager/. Note that AppConfigCache remains in use in a parallel older implementation at micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/, suggesting either a staged rollout or coexisting implementations. Verify that backend MDMS schemas supporting the new schema codes are deployed when this new implementation becomes active.

onClick={() => {
navigate(
`/${window.contextPath}/employee/campaign/campaign-templates?from=home`
`/${window.contextPath}/employee/campaign/campaign-templates`
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 | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find all references to the 'from' query parameter in navigation and breadcrumb logic

# Search for usage of 'from' query parameter
rg -n --type=js -C3 '\bfrom\s*[=:]\s*["\']home["\']' health/micro-ui/web/packages/modules/campaign-manager/

# Search for query parameter parsing of 'from'
rg -n --type=js -C3 'searchParams\.get\(["\']from["\']|\burl\?\.from\b' health/micro-ui/web/packages/modules/campaign-manager/

Repository: egovernments/DIGIT-Frontend

Length of output: 139


🏁 Script executed:

#!/bin/bash
# Description: Find all references to the 'from' query parameter in navigation and breadcrumb logic

# Search for usage of 'from' query parameter
rg -n --type=js -C3 'from.*home' health/micro-ui/web/packages/modules/campaign-manager/

# Search for query parameter parsing of 'from'
rg -n --type=js -C3 'url\?\.from' health/micro-ui/web/packages/modules/campaign-manager/

# Search for searchParams.get with 'from'
rg -n --type=js -C3 'searchParams\.get.*from' health/micro-ui/web/packages/modules/campaign-manager/

Repository: egovernments/DIGIT-Frontend

Length of output: 5585


🏁 Script executed:

#!/bin/bash
# Get context around line 175 in CampaignHome.js
sed -n '170,180p' health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js

Repository: egovernments/DIGIT-Frontend

Length of output: 439


Breadcrumb will not display on campaign-templates page after removing the query parameter.

Removing the ?from=home query parameter breaks breadcrumb visibility. The breadcrumb logic in index.js (line 157) requires url?.from === "home" to display the "CREATE_CAMPAIGN_HOME" breadcrumb when on the campaign-templates page. Without this parameter, the breadcrumb will not appear when users navigate from CampaignHome to campaign-templates.

Either restore the ?from=home parameter in the navigation URL at line 175, or update the breadcrumb logic in index.js to display correctly without depending on the query parameter.

🤖 Prompt for AI Agents
In
health/micro-ui/web/packages/modules/campaign-manager/src/pages/employee/NewCampaignCreate/CampaignHome.js
around line 175, the navigation URL to campaign-templates was changed to remove
the ?from=home query param which breaks breadcrumb visibility; to fix either
restore the query param by changing the URL back to
`/${window.contextPath}/employee/campaign/campaign-templates?from=home` so the
existing breadcrumb logic continues to work, or (preferred) update the
breadcrumb logic in index.js (around line ~157) to not rely on url?.from ===
"home" and instead detect the campaign-templates route by pathname or route name
(e.g., check location.pathname or route id equals the campaign-templates path)
so the CREATE_CAMPAIGN_HOME breadcrumb displays even without the query param.

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.

5 participants