-
Notifications
You must be signed in to change notification settings - Fork 46
FEATURE-2881:: Dependent Field and FEATURE-2888- Fieald/Feature Property Configuration Support Added #3013
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
base: console
Are you sure you want to change the base?
Conversation
* enabled hrms,pgr with workbench * Added the pgr module code * added module enable codes * core 1.8.1 sidebar null check fixes * updated pgr versions
* ISTE-11: Fixed Redirect logout url, Fixed breadcrumb need to hide * ISTE-11: Added or operator * ISTE-11: Upgraded package.json , Removed inline css * ISTE-11: Updated logout redirect url * Update index.js --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
* updated ajv for fasturi issue * Update package.json * Update package.json * updated ajv * check the ajv fixs * try out for , "fast-uri":"2.1.0" * Update package.json * Update webpack.config.js * revert all package change * try build all packages * Revert "revert all package change" This reverts commit e252951. * updated the readme of core and components * updted the core module version
* Updates the delivery rules logic for gender * * info message for status creating (#644) * success message if user cred sheet * send id with key resourceid * Send variant in sku also Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Feat : added boundary validation (#643) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Update campaignValidators.ts (#645) * added delay in download (#646) * Update campaignValidators.ts (#647) * fixes (#649) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * fixed header validation (#648) * change in filter recursive (#650) * Update genericUtils.ts (#652) * fix (#651) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * updated lowest level hierarchy validation for target HLM -5948 (#654) * Update campaignValidators.ts (#655) * fixes-> cyclenumber issue, hover issue, dropdown height issue, * css * fixes-> cyclenumber issue, hover issue, dropdown height issue, (#656) * fixes-> cyclenumber issue, hover issue, dropdown height issue, * css --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Update campaignUtils.ts * fixed HLM-5970 * Feat : added boundary validation at data level * fixes * local add * Added boundary validation * Refactor * fixed HLM-5935 and HLM-5749 * Refactor * Feat : updated table * change campaignid in payload * Feat : added campaignId * Update campaignApis.ts * Update campaignValidators.ts * refactored * Refactor * assigned campaignId * Refactor * updated createRequest Schema * Feat : invalid Status Persist * status fix * version-fix * Update CODEOWNERS * core version updated and css fix for language dropdown * refactor (#676) * Uat signoff (#678) * change in filter recursive * lowest level * added validation related to target sheet headers * HLM-5916 * download button fixes in summary (#682) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Hlm 5927 (#687) * change in filter recursive * lowest level * added validation for boundary codes to be invalid other than that selected from UI in target upload * Added Delivery and cycle config for LLIN and SMC both (#688) * no of cycle and deivery drafted changes * fixes * add localisation code for boundaries * fixes * fixes * Value localise in summary screen, api error change * fixes * genarate api call fix * font size change for summary * login css change * HLM-5718: SMC delivery config enhancement * config update * added config for in between * fix config for llin * added mdms integration --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Fixed HLM-5988_warning message (#689) Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * download filename fixes (#693) * download button fixes in summary * download filename with custom name changes added --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * download filename fixes (#694) * download button fixes in summary * download filename with custom name changes added * config fix for llin --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * successful toast message is fixed (#695) * successful toast message is fixed * Update UploadData.js * HLM-5991: Alert Pop UP CR (#696) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * HLM-5718 changes (#703) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Localization cache (#706) * change in filter recursive * lowest level * refactored localization cache logic * Update README.md (#707) * Update README.md * Update README.md * Update utilities/project-factory/README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update README.md --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HLM-5985_made lowest level changes (#708) * HLM-5985_made lowest level changes * resolved codeRabbit comments * Create LOCALSETUP.md (#709) * Create LOCALSETUP.md * Refactored config * Update LOCALSETUP.md * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update LOCALSETUP.md --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated the localisation module config * Refactor config (#713) * Refactor config * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update postman_collection.json (#714) * Update postman_collection.json * Update postman_collection.json * Delete utilities/project-factory/project_factory_swagger.yml (#715) * Feat : removed campaignId validation for boundary upload (#718) * updated the delay for boundary relationship * added logger for request TODO TEST will be reverted * Revert "added logger for request TODO TEST" This reverts commit d5c2bf5. * Schema validation (#719) * Feat : removed campaignId validation for boundary upload * Feat : added schema validation * Fixed mdms host * updated the logger messages * updated the loggers * delivery new changes, toast fix, error fix (#716) * delivery new changes, toast fix, error fix * new fixes * fixes * change text component to field component * added hierarchy * fix * fix * fix * fix * passing hierarchy from props --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Schema validation2 (#721) * Feat : removed campaignId validation for boundary upload * Feat : added schema validation * Fixed mdms host * Feat : added boundary validation * Feat : optimized product search * Fix : project mapping fixed (#722) * Fixed project search (#723) * smc fixes (#724) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Feat : added boundary confirmation (#727) * Fix: fixed processing boundary * Refactor * fixed HLM-6109 (#729) * gate fixes validation, ui ux (#731) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * integrated panelcard component (#732) * integrated panelcard component * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/Response.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update genericUtils.ts (#733) * Create CHANGELOG.md (#717) * Update request.ts (#735) * fixed generate api issue (#734) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Create CHANGELOG.md * gate fixes (#736) * gate fixes validation, ui ux * gate fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * added loader in the selecting boundaries (#737) * Update createAndSearch.ts (#738) * fix (#739) * fix * fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Patch 3 (#740) * change in filter recursive * lowest level * trimmed underscore and empty spaces * boundary fix (#742) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Update genericUtils.ts (#746) * fixed the delivery products issue * Fixed delivery conditions issue * Update campaignApis.ts (#747) * fixed warning toast (#748) * fixed warning toast * Update UploadData.js * fix (#749) * fix * fx * fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * core -update (#751) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * fixed stepper issue (#752) * fixed stepper issue * Update index.html * Feat : added user validation via individual (#753) * fixes (#754) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * code fix nabeel (#756) * fixes * fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Updated few loggers (#759) * updated few loggers flow * Update utilities/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/genericUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Updated the user Password generation logic #761 * Update Listener.ts (#730) * Update Listener.ts * added try catch logic in producer * Feat : added parallel batch execution (#767) * Feat : added parallel batch execution * Refactor * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed the stepper (#765) * changes config (#769) * Project type config and added loggers for process of campaign (#772) * Feat : added themes in generate template (#773) * fixed the ajv package version for build issue * Feat : removed xlsx (#776) * HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT (#778) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * css update (#780) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * HLM-6179 and HLM-6180 (#777) * HLM-6179 and HLM-6180 * campaign name changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Feat : fixed target generation (#781) * fixed tenantId issue (#784) * fix: resolved AJV-related Jenkins build issue reference #783 #786 (#787) * module ui fix * updated all the package version for build fixes * fixed kafka-error at target generation (#789) * updated core version (#791) * updated core version * updated css also * Update campaignValidators.ts (#794) * Updated the excel generation logic and files * added changes for configurable column in target sheet (#779) * change in filter recursive * lowest level * made target headers genearte through mdms schema * changed config index.ts * changed config index.ts * changes for now * added configurable column logic from schema HLM-6169 * updated validate of target columns through schema * added masterForColumnSchema in index.ts * formatted dataManageService * refactored lock TargetFields func * removed console.log * User creation performance improved (#800) * Feat : Improved user creation performance * Change status color * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update genericUtils.ts (#801) * Hlm 6170 (#802) * change in filter recursive * lowest level * HLM -6170 added logic for only village level data in target sheet and some refactoring * updated css (#804) * fixed button issue (#805) * HLM 6177: Error card implementation in summary screen (#806) * HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT * Added Error Cards in summary screen and redirection --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * added error button styles (#807) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * updated popUp css (#808) * HLM 6178: Implementing New Pop up screen in boundaries (#809) * added error button styles * Implementing New Pop up screen in boundaries --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Facility changes (#812) * Feat : changed facility Template * Feat : locked target templates * fixed colour issue (#813) * Updated the project type conversion logic for the "deliveryType" dont1 and n config * Unique field added (#814) * Feat : changed facility Template * Feat : locked target templates * Feat : added unique check logic * Target schema update (#815) * change in filter recursive * lowest level * updated shcema of target columns to be configurable * removed empty spaces from config index.ts * Active mapping (#817) * Feat : changed facility Template * Feat : locked target templates * Feat : added unique check logic * Feat : added mapping via active field * changes in the schema validation (#816) * Updated the workbench and css module version * Feat : added active inactive boundary check (#818) * Update campaignValidators.ts (#819) * added active inactive validation (#820) * changed api call time (#826) * Feat : added target sum mapping (#825) * added campaign type as filter (#827) * Update genericApis.ts (#828) * Update excelUtils.ts (#829) * UI issue fixes, icon fix in summary error (#831) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Target columns (#830) * change in filter recursive * lowest level * commit * Feat : target flow fixed for LLIN-mz * uat to dev --------- Co-authored-by: admin1 <nitish@egovernments.org> * Feat : freezed target columns (#833) * Target mr dn (#834) * change in filter recursive * lowest level * Feat : skipped validation temporarily * changes in the target validation (#835) * fixed error info (#837) * Added roboto font (#840) * Feat : added roboto font * Fixed config * target validation based on diff campaign types (#843) * change in filter recursive * lowest level * updated validation of target based on campaign type * fixed validation issue (#844) * Updated the workbench package version * fixed validation logic (#846) * fixed validation logic * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Error messages improved (#848) * Feat : imporved error messages and initilised utils for tracking process * Fix ; unused variables fixed * Feat : improved error messages * Fix : download error fix (#850) * Update campaignUtils.ts (#851) * Update campaignUtils.ts * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#853) * HLM 6210: Toast, error focus fix and project type reset delivery data fix (#854) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * HLM-6225_added time out according to data (#855) * Update campaignValidators.ts (#859) * HLM 6210 (#858) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix * parallel search fixes --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Remove validation (#852) * change in filter recursive * lowest level * removed unnecessary validation for target * spacing refactor * Update campaignValidators.ts (#863) * Header validation (#861) * change in filter recursive * lowest level * removed unnecessary validation for target * changed the logic of header validation * space refactor * Update campaignUtils.ts (#864) * fixed ui error (#865) * Read me (#867) * change in filter recursive * lowest level * removed unnecessary validation for target * changed the logic of header validation * fixed portugese language error * space refactoring * Update Dockerfile * Update Dockerfile * Update migrate.sh * Update Dockerfile * Update campaignValidators.ts (#868) * HLM 6210:campaign type change reset fix (#869) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix * parallel search fixes * campaign type change reset fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Update excelUtils.ts for sheetHeaders wraping (#870) * Update package.json * updated error messages (#871) * feat : added jaeger-client tracing (#872) * updated the table config * Update campaignApis.ts (#875) * removed the schema and updated the db name * fixing generate API call, file auto delete, date error (#877) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Trim resource (#878) * Feat : trimmed resource persist message * Refactor * Removed reject error in produce message * fixed min time, draft logic (#879) * Update index.ts (#880) * added min ui error and facility usage (#883) * added min ui error and facility usage * changes * Update campaignUtils.ts (#884) * HLM 6007 (#885) * fixing generate API call, file auto delete, date error * generate api fix --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * Update Dockerfile * Feat : docker config update (#886) * Update Dockerfile (#887) * Create buildWorkbenchUI.yml * Update README.md (#917) * Update buildWorkbenchUI.yml * Update README.md * Updated the DB Schema issue of Project-factory * fixed hierarchy order (#919) * User flag hcm (#920) * Feat : docker config update * Feat : added user create flag * Refactored * Update campaignUtils.ts * Update campaignMappingUtils.ts (#922) * Ashish egov patch 2 (#921) * Update index.ts * Update campaignApis.ts * Fixed the project type conversion and product duplicate issue * Update campaignApis.ts (#924) * Update campaignMappingUtils.ts (#925) * Update campaignMappingUtils.ts * Refactored * Update publishProjectFactory.yml * Update buildWorkbenchUI.yml * Update campaignMappingUtils.ts (#926) * Update request.ts (#928) * Update request.ts * Feat : updated httprequest * Feat : warning response added * Refactor * added start and enddate in cycles * Update campaignApis.ts (#930) * Update request.ts (#932) * fixed generate issue (#933) * Fixed project-type resources duplication * updated target error messages (#936) * fixed stepper from draft (#937) * Update Listener.ts * delivery type disable fix, product sku name change (#939) Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> * fixed error message issue (#941) * Redis integration (#940) * Feat : added redis * Feat : added redis retry * removed templates folder * updated the folder structure for health ui and removed utilties * Update publishAllPackages.yml * Update buildWorkbenchUI.yml --------- Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com> Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: Bhavya-egov <bhavya.mangal@egovernments.org> Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Swathi-eGov <137176788+Swathi-eGov@users.noreply.github.com> Co-authored-by: admin1 <nitish@egovernments.org>
…ith Campaign changes (#961) * HLM-5154 removing chloropleth part * Update Mapping.js * updated project type * HLM-5208 basic chloropleth setup * HLM-5208 review changes and bug HLM-5866 * HLM-5208 review changes * work in progress * work in progress * work in progress * work in progress * HLM-5156 filter lyaer in map * HLM-5156 adding filter layer is mapping section HLM-5880 bug * HLM-5156 updating UIconfigurations * HLM-5891 microplan success screen bug * Update UICustomizations.js * HLM-5891 updating how data is processed and then stored in ssn storage * reverting the digit svg version * HLM-5156 adding isFilterPropertyOfMapSection to ajv * HLM-5156 minor fixes * changing shapefile content name validation * HLM-5156 review changes * HLM-5156 review changes * HLM-5208 adding choropleth UI * Updated schema property name * downgrading digit ui react components * HLM-5926 UI audit changes and enabling upload of multi sheet data * HLM-5926 upgrading css pkg * HLM-5926 changeing id to name in success screen * HLM-5926 review changes * Update package.json * HLM-5926 review chagnes * HLM-5926 upgrading microplan css pkg version * HLM-5926 dropdowns to digit dropdowns * HLM-5926 adding base color changes * HLM-5926 increasing css pkg version * HLM-5926 adding review changes * removing debugger * Update updateSessionUtils.js * work in progress * HLM-5926 api integration for active status * HLM-5926 review changes * increasing microplan css version * adding additional prop load check in navigator * HLM-5926 download translated microlan * HLM-5926 removing duplicate children in mapping * HLM-5926 adding review changes * HLM-5926 review changes * demo fixes * demo changes * HLM-5926 demo changes for preview and modal buttons * HLM-5926 campaign date change * HLM-5926 review changes * HLM-5926 overriding login page css * Update microplanning.scss * HLM-6011 campaign date * Update UICustomizations.js * HLM-5926 resource mapping errors * HLM-6019 adding show error in upload preview screen and navigation restrictions * HLM-6019 review changes * Update JsonPreviewInExcelForm.js * HLM-6019 download template * HLM-6019 enabling download * HLM-6019 review changes * HLM-6019 review change * Update Upload.js * HLM-6019 reverted digit core * HLM-5125 download template * HLM-5925 adding review changes * Update RuleEngine.js * HLM-6172 template download and save and highlight the data after data is adjusted in microplan generation page. * HLM-6172 adding review changes * HLM-6172 Notice and instruction page needs to be hidden or should contian sample data and Check localisation for geojson and shape file Mapping * HLM-5172 Column heading has to be freezed * HLM-6172 review changes * HLM-6172 debuggers * HLM-6172 review changes * HLM-5925 help feature bug fixes * HLM-6172 downlgrading ui core version * HLM-6172 campaigntype automation * HLM-6172 Tool tip of formula configuration and Hover over the errors in preview screen add localization and template download changes * HLM-6172 avj fixes * adding review changes * HLM-6172 removing MDMS data * work in progress * HLM-6172 removing mdms data and removing heirarchy mapping from facilities * field length validation for geojson and shape files * HLM-6172 reinstating setting upload error * adding review changes * Update Upload.js * error correction for handle excel * work in progress * work in progress * work in progress * work in progress * work in progress * Update Upload.js * work in progress * work in progress * Update Upload.js * Update Upload.js * Update Upload.js * Update Upload.js * work in progress * work in progress * HLM-6172 adding audit changes * HLM-6172 adding required data for smc and demo review comment changes * cleaning up code * HLM-6172 removing mdms files and adding review changes * HLM-6172 removing unnecessary dependancy and activating process hold with api throws an error * HLM-6172 adding review changes * Update index.js * Update excelValidations.js * HLM-6172 Navigation via fixed keyboard for Popups is not working * HLM-6172 adding review changes * HLM-6172 adding microplan name validation * HLM-6172 adding review changes * HLM-6172 adding review changes * Update CommonComponents.js * Update updateSessionUtils.js * improving error handling * HLM-6172 changed how microplan nameing error is shown, rule logic correction * HLM-6172 adding naming convention info box * upgraded microplan css version * HLM-6172 adding select all corrections * HLM-6172 adding campaign end date restriction, and other required changes * HLM-6172 modal focus changes * HLM-6172 example data filling * HLM-6172 review changes * Update processHierarchyAndData.js * HLM-6172 mapping page correction and api call data corrections * adding review changes * HLM-6172 adding required changes for facility data upload and removing prerequisites from upload data section * HLM-6172 adding review changes * Update Upload.js * Update Upload.js * Update Upload.js * HLM-6172 allowing user to enter 0.somehing in hypothesis section * HLM-6172 adding upload propogation restriction on error * Update Upload.js * HLM-6172 changing the upload page navigation * Update MicroplanDetails.js * HLM-6172 shifting toast to create microplan * work in progress * work in progress * upgrade microplan css version * work in progress * work in progress * work in progress * work in progress * HLM-6234 HLM-6235 HLM-6237 HLM-6238 HLM-6239 HLM-6240 * adding review changes and protection of cell in downloaded templates * increasing microplan css pkg version * removing MDMS data and adding review changes * adding review changes * adding review changes * hiding unique identifier column * HLM-6172 adding upload guidelines * Update Upload.js * micro css changes and comfirm mcroplan pop up * Update MicroplanPreview.js * HLM-6172 updating operation to match api changes * updating operation to match api changes * removing unused code and updating readme file * adding UploadGuidelines * Update index.js * HLM-6258 , HLM-6251 adding readme for templates and enabling user to uplaod comma separated boundary code in facility * updating microplan scss version * reducing complexities of various funcitons * reducing complexities of various funcitons * Update MicroplanPreview.js * adding review changes and removing MDMS data * adding review changes * adding style for generated microplan * Update coreOverride.scss * overriding microplan success header class and updates shape file handling * HLM-6298 adding active inactive field in template * adding review chagnes * reducing function complicity * adding review changes * Update CreateMicroplan.js * updating microplan css pkg * translating error column header for styling * geojson shapefile active inactive changes * updating css pkg version * adding review changes * Update index.js * moving microplaning from micro-ui/ to health/micro-ui/ * Update CODEOWNERS * shifting health service frontend data to digit fronend * removed template --------- Co-authored-by: Nipun Arora <aroranipun1@gmail.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
…steps unlocked (#967) * Trimmed microplan name. Open Saved microplan with navigation for all steps unlocked * Update SavedMicroplans.js
…eojson-active-status-change adding map height css changes, geojson active inactive status change
* Adding handling of same name sheets * Update Upload.js * upgrading css pkg for microplan
* Adding handling of same name sheets * Update Upload.js * upgrading css pkg for microplan * adding optional changing for microplanPreview AggregatesList
* added changes in the master for draft boundary * added dss card changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
…rkbench to have schema code in action url (#1035) * added logic to handle mdms-v2 api * Update urls.js * Update package.json --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
…led (#2978) * Updated the packges for fix * Update App.js * Update inter-package.json * Update App.js * BUGFIX/HCMPRE-2496: Updated the component version * Update inter-package.json
* Added template screen for referral flow * FEATURE/HCMPRE-2958 : Added dependency field wrapper
* GIT-2888:: Features/ Prperties Config * Added filter component to support Enums * Removed console logs * GIT-2888 :: Features/properties Config --------- Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.org>
…in reverse restructuring of form config
…instead of object
…rty Configuration Support Added
Caution Review failedFailed to post review comments. 📝 WalkthroughWalkthroughMigrates routing to React Router v6 and React Query to TanStack across campaign-manager. Refactors app configuration MDMS flow and introduces multi-condition dependent fields. Adds new create-campaign components, boundary creation multi-step orchestration, dynamic example bootstrap and dev webpack, new CSS popup overlay, Docker/Nginx path updates, docs/env updates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as BoundaryRelationCreate (UI)
participant Loc as Localisation Service
participant H as Boundary Hierarchy API
participant T as Template Gen API
participant S as Status Poll API
participant D as Data Create API
participant DL as File Download
User->>UI: Confirm create
UI->>Loc: Upsert localisation entries
Loc-->>UI: OK
UI->>H: Create hierarchy (levels + parents)
H-->>UI: hierarchyId/newHierarchy
alt New hierarchy
UI->>T: Generate template
loop Poll until fileStoreId
UI->>S: Check generation status
S-->>UI: status / fileStoreId?
end
UI->>DL: Download Excel template
DL-->>UI: File saved
else Reuse hierarchy
UI->>D: Create data from template
loop Poll until completed
UI->>S: Check data creation status
S-->>UI: status
end
end
UI-->>User: Success/redirect
sequenceDiagram
autonumber
participant Boot as MainApp (example/src/index.js)
participant Lib as Digit.initLibraries
participant Win as window.Digit
participant UI as DigitUI (lazy)
Boot->>Win: Set SessionStorage (user_type, tokens, tenantIds)
Boot->>Lib: Initialize libraries (stateCode)
Lib-->>Boot: Ready
Boot->>Win: Expose Digit.Hooks
Boot->>UI: Lazy load modules (Workbench, Campaign)
UI-->>Boot: Render
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewersPoem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.38.6)health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.jsTip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js
⚙️ CodeRabbit Configuration File
check
Files:
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
🧬 Code Graph Analysis (2)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js (2)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DrawerFieldComposer.js (1)
drawerState
(395-397)micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js (1)
Dropdown
(94-281)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js (2)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationParentLayer.js (1)
parentState
(60-60)micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js (1)
Dropdown
(94-281)
🔇 Additional comments (3)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js (2)
56-66
: Verify MDMS “active” flag semantics.Default prefill relies on
o.active === true
. If MDMS items use a different flag (e.g.,isActive
,enabled
) or omit it (implying active), this will prefill nothing.
- Confirm the MDMS schema for this master exposes
active
boolean.- If not, adjust the predicate accordingly (e.g., treat missing flag as active).
Proposed defensive tweak if “active” is sometimes absent:
- const defaultCodes = mdmsOptions.filter(o => o.active).map(o => o.code); + const defaultCodes = mdmsOptions.filter(o => o.active ?? true).map(o => o.code);
8-28
: LGTM: Auto-select + persistence flow is cohesive.
- First-render auto-select (saved or first option) with persisted
selectedSchema
/schemaCode
is sound.- Prefill of enums from
drawerState
with fallback to MDMS “active” flags, and keeping enums/schema in sync on toggle/select, improves UX resilience across drawer re-opens.Also applies to: 50-68, 71-83
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js (1)
81-106
: Expression grammar has no parentheses/quoting; joiner tokens in values will break parsing.
splitByJoiners
matches raw “&&”/“||” anywhere. If a string value contains these tokens, conditions will split incorrectly. There’s also no support for grouping or quoting.
- If user-entered values can contain “&&” or “||”, consider:
- Escaping quoted values during serialization and unescaping on parse, or
- Restricting values to dropdowns/numbers for these operators, or
- Implementing a simple tokenizer supporting quotes and parentheses.
Would you like a small tokenizer implementation to safely parse and serialize the expression language?
Also applies to: 113-122, 124-135
})); | ||
|
||
return updated; | ||
return nextCodes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Remove unused return value from state updater.
setLocalActiveOptions
updater’s return value is discarded. Returning nextCodes
here is misleading.
Apply this diff:
- return nextCodes;
+ return nextCodes; // value returned from updater is used to set local state, not as handleToggle's return
Alternatively, make handleToggle
explicit by not returning anything.
📝 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.
return nextCodes; | |
return nextCodes; // value returned from updater is used to set local state, not as handleToggle's return |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
around line 85, the setLocalActiveOptions state updater returns nextCodes even
though the return value is ignored; remove the misleading return so the updater
has no return value (or refactor handleToggle to be explicitly void) and update
any related comments to reflect that the function mutates state via the setter
only.
<Dropdown | ||
variant={""} | ||
t={t} | ||
disabled={disabled} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Dropdown uses unsupported prop disabled
; should be disable
.
react-components Dropdown ignores disabled
and only respects disable
. The schema selector will not actually disable when disabled
is true.
Apply this diff:
- disabled={disabled}
+ disable={disabled}
📝 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.
disabled={disabled} | |
disable={disabled} |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
around line 94, the Dropdown is using the unsupported prop `disabled`; replace
it with the correct prop name `disable` and pass the same boolean value (e.g.,
change `disabled={disabled}` to `disable={disabled}`) so the Dropdown actually
becomes non-interactive when intended.
return ( | ||
<Switch | ||
key={opt.code} | ||
key={`${opt.code}-${isActive}`} // force re-sync if prefilled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Avoid key churn on Switch; use a stable key.
Using key={
${opt.code}-${isActive}}
forces unmount/mount on every toggle and can reset internal state/animations. isChecked
already controls the visual state.
Apply this diff:
- key={`${opt.code}-${isActive}`} // force re-sync if prefilled
+ key={opt.code}
📝 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.
key={`${opt.code}-${isActive}`} // force re-sync if prefilled | |
key={opt.code} |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
around line 118, the Switch is given a volatile key
`\`${opt.code}-${isActive}\`` which causes unmount/remount on every toggle;
replace it with a stable key (for example `opt.code` or `opt.id`) so the
component instance persists, and rely on the existing isChecked/isActive prop to
control toggle state rather than using the key to force re-sync.
...dules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
Outdated
Show resolved
Hide resolved
const pageObj = currentTemplate.find((p) => p.name === pageCode)?.cards?.[0]; | ||
if (!pageObj?.fields) return []; | ||
// Exclude template fields | ||
return pageObj.fields | ||
.filter((f) => f?.type !== "template") | ||
.filter((f) => pageCode !== currentPage || f.order < selectedFieldItem?.order) | ||
.map((f) => ({ | ||
code: f.jsonPath, | ||
name: f.jsonPath, | ||
format: f.format, | ||
type: f.type || f.datatype || f.format || 'string', | ||
enums: f.dropDownOptions || [], | ||
})); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Field discovery limited to first card; consider flattening all cards.
Current logic only reads cards[0]
. Pages with multiple cards will hide valid fields from selection.
Apply this diff to aggregate fields across cards:
- const pageObj = currentTemplate.find((p) => p.name === pageCode)?.cards?.[0];
- if (!pageObj?.fields) return [];
- // Exclude template fields
- return pageObj.fields
+ const pageObj = currentTemplate.find((p) => p.name === pageCode);
+ const allFields = (pageObj?.cards || []).flatMap((c) => c?.fields || []);
+ if (!allFields.length) return [];
+ // Exclude template fields
+ return allFields
.filter((f) => f?.type !== "template")
.filter((f) => pageCode !== currentPage || f.order < selectedFieldItem?.order)
.map((f) => ({
code: f.jsonPath,
name: f.jsonPath,
format: f.format,
type: f.type || f.datatype || f.format || 'string',
enums: f.dropDownOptions || [],
}));
If flatMap
support is uncertain in your build target, replace with reduce
.
📝 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.
const pageObj = currentTemplate.find((p) => p.name === pageCode)?.cards?.[0]; | |
if (!pageObj?.fields) return []; | |
// Exclude template fields | |
return pageObj.fields | |
.filter((f) => f?.type !== "template") | |
.filter((f) => pageCode !== currentPage || f.order < selectedFieldItem?.order) | |
.map((f) => ({ | |
code: f.jsonPath, | |
name: f.jsonPath, | |
format: f.format, | |
type: f.type || f.datatype || f.format || 'string', | |
enums: f.dropDownOptions || [], | |
})); | |
}; | |
const pageObj = currentTemplate.find((p) => p.name === pageCode); | |
const allFields = (pageObj?.cards || []).flatMap((c) => c?.fields || []); | |
if (!allFields.length) return []; | |
// Exclude template fields | |
return allFields | |
.filter((f) => f?.type !== "template") | |
.filter((f) => pageCode !== currentPage || f.order < selectedFieldItem?.order) | |
.map((f) => ({ | |
code: f.jsonPath, | |
name: f.jsonPath, | |
format: f.format, | |
type: f.type || f.datatype || f.format || 'string', | |
enums: f.dropDownOptions || [], | |
})); | |
}; |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
around lines 34 to 47, the current implementation reads only cards[0] which
misses fields on other cards; update the logic to aggregate fields from all
cards (use cards.flatMap(c => c.fields || []) or cards.reduce((acc, c) =>
acc.concat(c.fields || []), []) if flatMap isn't supported), then apply the
existing checks: return [] if no fields, filter out template-type fields, apply
the pageCode/order-based filter, and finally map to the existing {code, name,
format, type, enums} shape so fields from every card are considered.
const [pageCode = '', fieldCode = ''] = (left || '').split('.').map((s) => (s || '').trim()); | ||
return { | ||
selectedPage: {}, | ||
selectedField: {}, | ||
comparisonType: {}, | ||
fieldValue: "" | ||
selectedPage: pageCode ? { code: pageCode, name: pageCode } : {}, | ||
selectedField: fieldCode ? { code: fieldCode, name: fieldCode } : {}, | ||
comparisonType: { code: operator, name: operator }, | ||
fieldValue: (right || '').trim(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing bug: field code truncated when it contains dots.
parseSingle
splits on all “.” and only keeps the second token, dropping the rest of the JSONPath (common for nested paths). This breaks round-tripping expressions.
Apply this diff to split only on the first dot:
- const [pageCode = '', fieldCode = ''] = (left || '').split('.').map((s) => (s || '').trim());
+ const lhs = (left || '').trim();
+ const dot = lhs.indexOf('.');
+ const pageCode = dot !== -1 ? lhs.slice(0, dot).trim() : '';
+ const fieldCode = dot !== -1 ? lhs.slice(dot + 1).trim() : '';
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
around lines 69 to 75, parseSingle currently splits the left value on all dots
which truncates JSONPath-like field codes; change the logic to split only on the
first dot so pageCode is the substring before the first dot and fieldCode is the
rest (preserving any additional dots). Implement this by finding the first '.'
index on (left || ''), then use substring/ slice to derive pageCode and
fieldCode (falling back to '' and trimming), and keep the rest of the returned
shape unchanged.
}); | ||
}} | ||
selected={cond.selectedField} | ||
disabled={!cond?.selectedPage?.code} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Dropdown uses unsupported disabled
; react-components expects disable
.
These dropdowns won’t actually disable, allowing interaction before prerequisites are met.
Apply this diff:
- disabled={!cond?.selectedPage?.code}
+ disable={!cond?.selectedPage?.code}
- disabled={!cond?.selectedField?.code}
+ disable={!cond?.selectedField?.code}
- disabled={!cond?.selectedField?.code}
+ disable={!cond?.selectedField?.code}
Also applies to: 233-233, 250-250
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
around lines 219, 233 and 250, the Dropdowns are using the unsupported prop name
"disabled" so they remain interactive; change the prop to "disable" and pass the
same boolean expression (e.g. disable={!cond?.selectedPage?.code}) for each
occurrence to ensure the component correctly disables when prerequisites are not
met.
{selectedFieldObj && selectedFieldObj.format === 'dropdown' ? ( | ||
<Dropdown | ||
label={t('SELECT_VALUE') || 'Select Value'} | ||
option={(selectedFieldObj.enums || []).map((en) => ({ code: en.code, name: en.name }))} | ||
optionKey="code" | ||
name={`valueSelect-${idx}`} | ||
t={t} | ||
select={(e) => updateCondition(idx, { fieldValue: e.code })} | ||
disabled={!cond?.selectedField?.code} | ||
selected={cond.fieldValue} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value dropdown selected
should be an option object, not a code string.
react-components Dropdown mirrors props.selected
into internal state and expects an object when optionKey="code"
. Passing a string breaks display and selected state.
Apply this diff:
- <Dropdown
+ <Dropdown
label={t('SELECT_VALUE') || 'Select Value'}
option={(selectedFieldObj.enums || []).map((en) => ({ code: en.code, name: en.name }))}
optionKey="code"
name={`valueSelect-${idx}`}
t={t}
select={(e) => updateCondition(idx, { fieldValue: e.code })}
- disabled={!cond?.selectedField?.code}
- selected={cond.fieldValue}
+ disable={!cond?.selectedField?.code}
+ selected={(selectedFieldObj.enums || [])
+ .map((en) => ({ code: en.code, name: en.name }))
+ .find((opt) => opt.code === cond.fieldValue) || null}
/>
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
around lines 242 to 252, the Dropdown's selected prop is being passed a code
string but the Dropdown expects the full option object when optionKey="code";
change selected to the matching option object (e.g. derive options =
(selectedFieldObj.enums||[]).map(...) and set selected = options.find(o =>
o.code === cond.fieldValue) || null) while keeping the select handler unchanged
(it can still call updateCondition(idx, { fieldValue: e.code })); ensure you
handle the case where no match exists by passing null/undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 16
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/template_components/RegistrationComponents.js (1)
63-75
: Popup sizing overrides may bypass new modal CSSInline width: "100%" and maxWidth: "100%" force edge-to-edge and ignore the new .digit-popup--centered constraints added in campaign.scss. Prefer using the class to get the min(720px, 92vw) behavior.
- <PopUp - className={"custom-popup-filter"} + <PopUp + className={"custom-popup-filter digit-popup--centered"} type={"default"} heading={headingText} onClose={() => setShowPopUp(false)} - style={{ - width: "100%", - maxWidth: "100%", - height: "auto", - margin: 0, - padding: 0 - }} + style={{}}health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js (3)
40-49
: Forward the selected value from Dropdown; current handler drops it.The Dropdown passes the chosen option to select(val). Wrapping it as select={() => select()} discards the value.
Apply this diff:
- select={() => select()} + select={(val) => select(val)}
66-74
: Undefined identifiers: onChange and rest in TextInput for mobileNumber.onChange is not defined in this scope, and rest?.countryPrefix is also undefined within renderField. Both will throw at runtime.
Apply this diff to make the field read-only preview (consistent with other preview inputs) and avoid undefined refs:
- return ( - <TextInput - type="text" - className="appConfigLabelField-Input" - name={""} - value={field?.value} - onChange={(event) => onChange(event)} - populators={{ prefix: rest?.countryPrefix }} - /> - ); + return ( + <TextInput + type="text" + className="appConfigLabelField-Input" + name="" + value={field?.value || ""} + disabled + /> + );If a prefix is needed, pass it via field.metaData or a safe default available in this scope.
91-106
: Broken MdmsDropdown usage: undefined variables and unused props.
- option={dropDownOptions} references an undefined identifier.
- props={props} references an undefined identifier.
- MdmsDropdown already fetches its own options; passing option is unused.
Apply this diff to fix the case:
case "MdmsDropdown": return ( <MdmsDropdown className="appConfigLabelField-Input" variant={""} t={t} - option={dropDownOptions} - optionKey={"code"} - selected={null} - select={() => {}} - props={props} - moduleName={rest?.schemaCode ? rest.schemaCode.split(".")[0] : rest?.moduleMaster?.moduleName} - masterName={rest?.schemaCode ? rest.schemaCode.split(".")[1] : rest?.moduleMaster?.masterName} - rest={rest} + optionKey="code" + selected={null} + select={() => {}} + moduleName={field?.schemaCode ? field.schemaCode.split(".")[0] : field?.moduleMaster?.moduleName} + masterName={field?.schemaCode ? field.schemaCode.split(".")[1] : field?.moduleMaster?.masterName} /> );Note the use of field instead of rest/props.
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationWrapper.js (1)
529-548
: Event listener effect depends on an unstable function; stabilize handleSubmit or remove it from deps.Because handleSubmit is re-created every render, this effect will register/unregister listeners on every render and may capture stale closures.
Wrap handleSubmit in useCallback with precise deps or use a ref to keep a stable listener. Example:
+ const handleSubmit = useCallback(async (finalSubmit, tabChange) => { + // existing body unchanged + }, [state?.screenData, locState, currentLocale, localisationMutate, onSubmit]); ... - }, [state, locState, handleSubmit]); + }, [state, locState]); // handleSubmit is stable via useCallbackAlternatively, keep the effect empty and reference a ref to the latest handleSubmit in the handlers.
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js (2)
147-156
: Invalid JSON Schema type mapping for “button”.JSON Schema types are: string, number, integer, boolean, object, array, null. Mapping button: "button" produces invalid schemas.
Replace with a valid type or omit non-data UI fields from the schema:
- button: "button" + // UI-only field; represent as string or omit entirely + button: "string"Or skip adding such fields to properties.
29-55
: Dead code: restructure() is currently unused.Consider removing or adding a usage site/tests. Keeping dead code increases maintenance cost.
♻️ Duplicate comments (6)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js (2)
101-107
: Dropdown prop name bug: use “disable”, not “disabled”.react-components Dropdown ignores disabled and expects disable.
- disabled={disabled} + disable={disabled}
127-131
: Avoid volatile keys on Switch; rely on isChecked prop.key={
${opt.code}-${isActive}
} remounts the Switch on every toggle, losing internal state.- <Switch - key={`${opt.code}-${isActive}`} // force re-sync if prefilled + <Switch + key={opt.code} label={t(opt.name)} isChecked={isActive} isCheckedInitially={isActive}health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js (4)
80-97
: Field discovery limited to first card; flatten all cards.getPageObj uses cards[0], which misses fields on subsequent cards. Aggregate across cards.
- const getPageObj = (pageCode) => - currentTemplate.find((p) => p.name === pageCode)?.cards?.[0]; - - const getFieldOptions = (pageCode) => { - const pageObj = getPageObj(pageCode); - if (!pageObj?.fields) return []; - return pageObj.fields + const getPageObj = (pageCode) => currentTemplate.find((p) => p.name === pageCode); + + const getFieldOptions = (pageCode) => { + const pageObj = getPageObj(pageCode); + const allFields = (pageObj?.cards || []).flatMap((c) => c?.fields || []); + if (!allFields.length) return []; + return allFields .filter((f) => f?.type !== "template") .filter((f) => pageCode !== currentPage || f.order < selectedFieldItem?.order) .map((f) => ({ code: f.jsonPath, name: f.jsonPath, label: f.label, format: f.format, type: f.type || f.datatype || f.format || "string", enums: f.dropDownOptions || [], })); };If flatMap is not supported, use reduce.
120-138
: Parsing bug: dot-splitting truncates nested field codes.parseSingle splits on all dots and loses the rest of the path after the first dot.
- const [pageCode = "", fieldCode = ""] = (left || "") - .split(".") - .map((s) => (s || "").trim()); + const lhs = (left || "").trim(); + const dot = lhs.indexOf("."); + const pageCode = dot !== -1 ? lhs.slice(0, dot).trim() : ""; + const fieldCode = dot !== -1 ? lhs.slice(dot + 1).trim() : "";
498-511
: Dropdown API mismatches: use disable prop and pass option object to selected.
- Disabled prop should be disable.
- When optionKey="code", selected must be the full option object, not a string.
Apply these diffs:
Field dropdown:
- disabled={!cond?.selectedPage?.code} + disable={!cond?.selectedPage?.code}Operator dropdown:
- disabled={!cond?.selectedField?.code} + disable={!cond?.selectedField?.code}Value dropdown:
- <Dropdown + <Dropdown option={(selectedFieldObj.enums || []).map((en) => ({ code: en.code, name: en.name, }))} optionKey="code" name={`val-${idx}`} t={t} select={(e) => updateCond(idx, { fieldValue: e.code })} - disabled={!cond?.selectedField?.code} - selected={cond.fieldValue} + disable={!cond?.selectedField?.code} + selected={(selectedFieldObj.enums || []) + .map((en) => ({ code: en.code, name: en.name })) + .find((opt) => `${opt.code}` === `${cond.fieldValue}`) || null} />Also applies to: 519-531, 476-494
57-65
: i18n: Use stable, namespaced keys for operators/logicals.Literal English fallback keys like EQUALS_TO are brittle. Prefer stable, namespaced keys (e.g., HCM_OP_EQUALS, HCM_OP_NOT_EQUALS, HCM_LOGICAL_AND/OR) for easier localization management.
Example:
- { code: "==", name: t("EQUALS_TO") || "equals to" }, + { code: "==", name: t("HCM_OP_EQUALS") || "equals" },And:
- const LOGICALS = [ - { code: "&&", name: t("AND") || "AND" }, - { code: "||", name: t("OR") || "OR" }, - ]; + const LOGICALS = [ + { code: "&&", name: t("HCM_LOGICAL_AND") || "AND" }, + { code: "||", name: t("HCM_LOGICAL_OR") || "OR" }, + ];Also applies to: 47-50
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
health/micro-ui/web/micro-ui-internals/packages/css/package.json
is excluded by!**/*.json
📒 Files selected for processing (10)
health/micro-ui/web/micro-ui-internals/example/public/index.html
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationWrapper.js
(3 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js
(3 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/appConfigHelpers.js
(4 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/template_components/RegistrationComponents.js
(4 hunks)health/micro-ui/web/public/index.html
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js
⚙️ CodeRabbit configuration file
check
Files:
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/template_components/RegistrationComponents.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationWrapper.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/appConfigHelpers.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js
🧠 Learnings (5)
📚 Learning: 2025-06-26T10:21:42.619Z
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Applied to files:
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationWrapper.js
📚 Learning: 2024-11-07T11:02:33.520Z
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#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/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
📚 Learning: 2024-06-10T19:25:42.992Z
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Applied to files:
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js
📚 Learning: 2025-02-05T10:18:29.947Z
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#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/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationWrapper.js
📚 Learning: 2024-06-10T19:25:42.992Z
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#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/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js
🧬 Code graph analysis (6)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js (1)
micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js (1)
Dropdown
(94-281)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationParentLayer.js (1)
masterName
(54-54)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationWrapper.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js (1)
AppPreview
(173-281)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/AppConfigurationParentLayer.js (3)
back
(433-443)localeModule
(66-66)parentState
(60-60)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/appConfigHelpers.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DrawerFieldComposer.js (1)
page
(48-48)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FiltersRenderer.js (3)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DrawerFieldComposer.js (1)
drawerState
(395-397)health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js (1)
Digit
(23-34)micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js (1)
Dropdown
(94-281)
🪛 Biome (2.1.2)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
[error] 358-365: The HTML element with the interactive role "button" is not focusable.
A non-interactive HTML element that is not focusable may not be reachable for users that rely on keyboard navigation, even with an added role like "button".
Add a tabIndex attribute to make this element focusable.
(lint/a11y/useFocusableInteractive)
[error] 359-360: The elements with this role can be changed to the following elements:
For examples and more information, see WAI-ARIA Roles
(lint/a11y/useSemanticElements)
[error] 358-365: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
(lint/a11y/useKeyWithClickEvents)
[error] 559-560: The elements with this role can be changed to the following elements:
For examples and more information, see WAI-ARIA Roles
(lint/a11y/useSemanticElements)
[error] 548-561: The HTML element with the interactive role "button" is not focusable.
A non-interactive HTML element that is not focusable may not be reachable for users that rely on keyboard navigation, even with an added role like "button".
Add a tabIndex attribute to make this element focusable.
(lint/a11y/useFocusableInteractive)
[error] 548-561: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
(lint/a11y/useKeyWithClickEvents)
[error] 393-393: Avoid passing children using a prop
The canonical way to pass children in React is to use JSX elements
(lint/correctness/noChildrenProp)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/appConfigHelpers.js
[error] 294-294: This is an unexpected use of the debugger statement.
Unsafe fix: Remove debugger statement
(lint/suspicious/noDebugger)
🔇 Additional comments (10)
health/micro-ui/web/micro-ui-internals/example/public/index.html (1)
15-15
: Health CSS bump to 0.3.10 — OKVersion pin looks good and aligns with the other index.html in this PR.
health/micro-ui/web/public/index.html (1)
13-13
: Consistent upgrade to @egovernments/digit-ui-health-css@0.3.10 — OKKeeps styling assets in sync across app entry points.
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (2)
104-110
: Fullscreen popup flex/scroll fix — OKUsing flex: 1 1 auto and min-height: 0 with overflow: auto prevents scroll collapse. Good defensive styling.
138-140
: Body scroll lock — OKoverflow: hidden on a body toggle class is the correct pattern. Ensure the portal code adds/removes .body--popup-open on open/close to avoid “stuck” scroll after dismissal.
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/template_components/RegistrationComponents.js (2)
1-6
: Imports updated for SelectionTag — OKThe new component import is expected for the filter UI change.
692-694
: Minor UI polish — OKEllipsis span style cleanup is fine and consistent with the color used elsewhere in the row.
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/appConfigHelpers.js (4)
41-43
: Propagating enums to dropDownOptions — OKThis aligns with consumers expecting dropDownOptions on fields.
207-208
: restructure: dropDownOptions mapped — OKMatches the getter logic and unblocks UI components (e.g., SelectionTag) that consume dropDownOptions.
333-335
: reverseRestructure: optional navigation fields — OKSymmetric with restructure; preserves absence when not configured.
257-259
: No downstream object‐iteration onnavigateTo
—making it optional is safeI verified across the codebase that there are no usages of the
navigateTo
property that assume it’s always an object (for example viaObject.keys(…)
,for…in
, or direct property access). The only occurrences ofnavigateTo
are its definitions inappConfigHelpers.js
and a separate local variable inNagivator.js
, none of which iterate over or destructure it.– No code paths consume
navigateTo
in a way that would break if it’sundefined
.
.popup-portal-overlay { | ||
position: fixed !important; | ||
inset: 0 !important; | ||
z-index: 9999 !important; | ||
display: grid !important; | ||
place-items: center !important; | ||
background: rgba(0,0,0,0.4); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Portal overlay semantics look correct; consider scroll chain containment
The overlay is full-viewport and centered with a high z-index — appropriate for modals. To prevent background scroll chaining on touch devices, add overscroll-behavior: contain to the overlay or its scrolling descendants.
Apply:
.popup-portal-overlay {
position: fixed !important;
inset: 0 !important;
z-index: 9999 !important;
display: grid !important;
place-items: center !important;
background: rgba(0,0,0,0.4);
+ overscroll-behavior: contain;
}
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss
around lines 95 to 103, the full-viewport .popup-portal-overlay can allow touch
scroll chaining to the background; add overscroll-behavior: contain to the
overlay (or to any scrolling descendants) to prevent background scroll
propagation on touch devices so the overlay traps touch scrolls and doesn't pass
them to underlying content.
.digit-popup--centered { | ||
max-width: unquote("min(720px, 92vw)") !important; | ||
width: auto !important; | ||
margin: 2rem auto !important; /* <-- centers horizontally, adds space from top */ | ||
position: absolute !important; | ||
top: auto !important; /* <-- reset */ | ||
transform: none !important; /* <-- reset */ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Centered variant: avoid absolute positioning unless required
Absolute positioning can reintroduce stacking/overflow edge cases within portals. Prefer relying on the overlay container’s centering; drop position/transform overrides unless a specific library behavior requires them.
.digit-popup--centered {
max-width: unquote("min(720px, 92vw)") !important;
width: auto !important;
margin: 2rem auto !important;
- position: absolute !important;
- top: auto !important;
- transform: none !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.
.digit-popup--centered { | |
max-width: unquote("min(720px, 92vw)") !important; | |
width: auto !important; | |
margin: 2rem auto !important; /* <-- centers horizontally, adds space from top */ | |
position: absolute !important; | |
top: auto !important; /* <-- reset */ | |
transform: none !important; /* <-- reset */ | |
} | |
.digit-popup--centered { | |
max-width: unquote("min(720px, 92vw)") !important; | |
width: auto !important; | |
margin: 2rem auto !important; /* <-- centers horizontally, adds space from top */ | |
} |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss
around lines 112 to 119, the .digit-popup--centered class forces absolute
positioning (position: absolute, top: auto, transform: none) which can
reintroduce stacking and overflow issues inside portals; remove the position/
top/ transform overrides so the overlay container can handle centering, retain
the max-width and width rules and change margin to use inline centering only
(e.g., keep margin: 2rem auto !important or switch to margin-block: 2rem auto if
vertical spacing is desired) so the popup is centered without absolute
positioning.
.popup-portal-center { | ||
position: fixed !important; | ||
inset: 0 !important; | ||
z-index: 9999 !important; | ||
display: grid !important; | ||
place-items: center !important; | ||
background: rgba(0,0,0,0.4); | ||
} | ||
|
||
// Keep the dialog readable and prevent clipping / | ||
.popup-portal-center :where(.digit-popup, .digit-popup-wrapper, .digit-popup-container) { | ||
max-height: 85vh !important; | ||
overflow: auto !important; | ||
box-sizing: border-box !important; | ||
max-width: unquote("min(720px, 92vw)") !important; | ||
width: auto !important; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Center overlay — OK; unify constraints with fullscreen overlay
The dedicated .popup-portal-center is consistent. Consider sharing the same size constraints with .popup-portal-overlay to reduce duplication (mixins or a shared class), and add overscroll-behavior.
.popup-portal-center {
position: fixed !important;
inset: 0 !important;
z-index: 9999 !important;
display: grid !important;
place-items: center !important;
background: rgba(0,0,0,0.4);
+ overscroll-behavior: contain;
}
📝 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.
.popup-portal-center { | |
position: fixed !important; | |
inset: 0 !important; | |
z-index: 9999 !important; | |
display: grid !important; | |
place-items: center !important; | |
background: rgba(0,0,0,0.4); | |
} | |
// Keep the dialog readable and prevent clipping / | |
.popup-portal-center :where(.digit-popup, .digit-popup-wrapper, .digit-popup-container) { | |
max-height: 85vh !important; | |
overflow: auto !important; | |
box-sizing: border-box !important; | |
max-width: unquote("min(720px, 92vw)") !important; | |
width: auto !important; | |
} | |
.popup-portal-center { | |
position: fixed !important; | |
inset: 0 !important; | |
z-index: 9999 !important; | |
display: grid !important; | |
place-items: center !important; | |
background: rgba(0,0,0,0.4); | |
overscroll-behavior: contain; | |
} |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss
around lines 121 to 137, the .popup-portal-center block duplicates size/scroll
constraints that exist on .popup-portal-overlay; refactor to extract the shared
constraints (max-height:85vh, max-width:min(720px,92vw), overflow rules,
box-sizing, width:auto) into a mixin or a shared utility class and apply it to
both .popup-portal-center and the overlay selector, and add overscroll-behavior:
contain (or auto as appropriate) to prevent background scroll while keeping
dialog scrollable.
enabled: !!moduleName && !!masterName, | ||
select: (data) => { | ||
return data?.[moduleName]?.[masterName]?.filter((item) => item.active); | ||
}, | ||
}, | ||
{ schemaCode: "MDMSDROPDOWNLIST" } //mdmsv2 | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
MDMS hook gating is correct; minor nit on redundant early-return.
Using enabled: !!moduleName && !!masterName avoids conditional hook calls—good. The subsequent early return when either is falsy is redundant and can be dropped for simplicity since the Dropdown won’t render without data anyway.
Apply this diff to simplify:
- if (!moduleName || !masterName) return null;
+ // Render guard not strictly required since hook is already gated; keep if you prefer explicitness.
Also applies to: 36-37
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js
around lines 28-34 (and similarly lines 36-37), remove the redundant
early-return checks that guard on moduleName/masterName since the hook already
uses enabled: !!moduleName && !!masterName; simply rely on the enabled flag and
delete the extra conditional return statements so the component is simpler and
avoids duplicate guarding logic.
if (isLoading) return <div>Loading...</div>; | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Consistent loader UX.
Prefer the shared Loader over a plain “Loading…” div for consistency across the app.
- if (isLoading) return <div>Loading...</div>;
+ if (isLoading) return <Loader />
📝 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.
if (isLoading) return <div>Loading...</div>; | |
return ( | |
if (isLoading) return <Loader />; | |
return ( |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AppPreview.js
around lines 38-39, the component returns a plain <div>Loading...</div> which
breaks UX consistency; replace this with the project’s shared Loader component:
add the Loader import at the top of the file, return <Loader /> (or <Loader
size="small" className="..." /> to match surrounding layout) instead of the
plain div, and remove the inline text so the shared component handles visuals
and accessibility.
<PopUp | ||
className="digit-popup--fullscreen" | ||
type={"default"} | ||
heading={primaryButtonLabel} | ||
children={[ | ||
<div key="builder" style={{ display: "grid", gap: "1rem" }}> | ||
{conditions.map((cond, idx) => { | ||
const fieldOptions = cond?.selectedPage?.code | ||
? getFieldOptions(cond.selectedPage.code) | ||
: []; | ||
const selectedFieldObj = fieldOptions.find( | ||
(f) => f.code === cond?.selectedField?.code | ||
); | ||
const operatorOptions = getOperatorOptions(selectedFieldObj); | ||
|
||
// Pick full object from operatorOptions by comparing code | ||
const selectedOperator = cond?.comparisonType?.code | ||
? operatorOptions.find((o) => o.code === cond.comparisonType.code) | ||
: undefined; | ||
|
||
|
||
return ( | ||
<div | ||
key={`cond-card-${idx}`} | ||
style={{ | ||
background: "#FAFAFA", | ||
border: "1px solid #F5D8C6", | ||
borderRadius: 8, | ||
padding: "0.75rem", | ||
display: "grid", | ||
gap: "0.5rem", | ||
}} | ||
> | ||
{/* Join-with for items after the first */} | ||
{idx > 0 && ( | ||
<div style={{ display: "flex", alignItems: "center", gap: "0.5rem" }}> | ||
<span style={{ fontWeight: 600 }}>{joinWithLabel}</span> | ||
<div style={{ width: 160, maxWidth: "100%" }}> | ||
<Dropdown | ||
option={LOGICALS} | ||
optionKey="name" | ||
name={`joiner-${idx}`} | ||
t={t} | ||
select={(e) => changeJoiner(idx, e.code)} | ||
selected={cond.joiner} | ||
/> | ||
</div> | ||
</div> | ||
)} | ||
|
||
{/* Single ROW that wraps: Page | Field | Operator | Value | Delete */} | ||
<div | ||
style={{ | ||
display: "flex", | ||
flexWrap: "wrap", | ||
gap: "0.75rem", | ||
alignItems: "flex-end", | ||
}} | ||
> | ||
<div style={{ minWidth: 220, flex: "1 1 240px" }}> | ||
<LabelFieldPair vertical removeMargin> | ||
<p style={{ margin: 0 }}>{selectPageLabel}</p> | ||
<div className="digit-field" style={{ width: "100%" }}> | ||
<Dropdown | ||
option={pageOptions} | ||
optionKey="code" | ||
name={`page-${idx}`} | ||
t={t} | ||
select={(e) => | ||
updateCond(idx, { | ||
selectedPage: e, | ||
selectedField: {}, | ||
fieldValue: "", | ||
comparisonType: {}, | ||
}) | ||
} | ||
selected={cond.selectedPage} | ||
/> | ||
</div> | ||
</LabelFieldPair> | ||
</div> | ||
|
||
<div style={{ minWidth: 260, flex: "1 1 280px" }}> | ||
<LabelFieldPair vertical removeMargin> | ||
<p style={{ margin: 0 }}>{selectFieldLabel}</p> | ||
<div className="digit-field" style={{ width: "100%" }}> | ||
<Dropdown | ||
option={fieldOptions} | ||
optionKey="code" | ||
name={`field-${idx}`} | ||
t={t} | ||
select={(e) => { | ||
const nextOps = getOperatorOptions(e); | ||
const canKeep = | ||
cond?.comparisonType?.code && | ||
nextOps.some((o) => o.code === cond.comparisonType.code); | ||
updateCond(idx, { | ||
selectedField: e, | ||
fieldValue: "", | ||
comparisonType: canKeep ? cond.comparisonType : {}, | ||
}); | ||
}} | ||
selected={cond.selectedField} | ||
disabled={!cond?.selectedPage?.code} | ||
/> | ||
</div> | ||
</LabelFieldPair> | ||
</div> | ||
|
||
<div style={{ minWidth: 220, flex: "0 1 220px" }}> | ||
<LabelFieldPair vertical removeMargin> | ||
<p style={{ margin: 0 }}>{comparisonTypeLabel}</p> | ||
<div className="digit-field" style={{ width: "100%" }}> | ||
<Dropdown | ||
option={operatorOptions} | ||
optionKey="name" | ||
name={`op-${idx}`} | ||
t={t} | ||
select={(e) => updateCond(idx, { comparisonType: e })} | ||
disabled={!cond?.selectedField?.code} | ||
selected={selectedOperator} | ||
/> | ||
</div> | ||
</LabelFieldPair> | ||
</div> | ||
|
||
<div style={{ minWidth: 220, flex: "0 1 220px" }}> | ||
<LabelFieldPair vertical removeMargin> | ||
<p style={{ margin: 0 }}>{selectValueLabel}</p> | ||
<div className="digit-field" style={{ width: "100%" }}> | ||
{selectedFieldObj && selectedFieldObj.format === "dropdown" ? ( | ||
<Dropdown | ||
option={(selectedFieldObj.enums || []).map((en) => ({ | ||
code: en.code, | ||
name: en.name, | ||
}))} | ||
optionKey="code" | ||
name={`val-${idx}`} | ||
t={t} | ||
select={(e) => updateCond(idx, { fieldValue: e.code })} | ||
disabled={!cond?.selectedField?.code} | ||
selected={cond.fieldValue} | ||
/> | ||
) : ( | ||
<TextInput | ||
type="text" | ||
populators={{ name: `text-${idx}` }} | ||
placeholder={enterValueLabel} | ||
value={cond.fieldValue} | ||
onChange={(event) => | ||
updateCond(idx, { fieldValue: event.target.value }) | ||
} | ||
disabled={!cond?.selectedField?.code} | ||
/> | ||
)} | ||
</div> | ||
</LabelFieldPair> | ||
</div> | ||
|
||
<div | ||
style={{ | ||
marginLeft: "auto", | ||
display: "flex", | ||
alignItems: "center", | ||
gap: "0.25rem", | ||
cursor: "pointer", | ||
}} | ||
onClick={() => removeCondition(idx)} | ||
title={removeConditionLabel} | ||
aria-label={removeConditionLabel} | ||
role="button" | ||
> | ||
<SVG.Delete fill={"#C84C0E"} width={"1.25rem"} height={"1.25rem"} /> | ||
<span style={{ color: "#C84C0E", fontSize: "0.875rem", fontWeight: 500 }}> | ||
{removeConditionLabel} | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
})} | ||
|
||
{/* Add condition */} | ||
<div> | ||
<Button | ||
variation="secondary" | ||
label={addConditionLabel} | ||
icon="Add" | ||
onClick={addCondition} | ||
style={{ minWidth: "auto" }} | ||
/> | ||
</div> | ||
</div> | ||
]} | ||
onOverlayClick={closePopup} | ||
onClose={closePopup} | ||
equalWidthButtons={"false"} | ||
footerChildren={[ | ||
<Button | ||
key="close" | ||
type={"button"} | ||
size={"large"} | ||
variation={"secondary"} | ||
label={closeLabel} | ||
onClick={closePopup} | ||
/>, | ||
<Button | ||
key="submit" | ||
type={"button"} | ||
size={"large"} | ||
variation={"primary"} | ||
label={submitLabel} | ||
onClick={closePopup} | ||
/>, | ||
]} | ||
/> | ||
)} | ||
</div> | ||
</LabelFieldPair> | ||
</div> | ||
</BodyPortal> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Prefer JSX children over the non-standard “children” prop.
Passing content via a children prop violates common React patterns and is flagged by static analysis. Inline the JSX inside the PopUp instead.
- <PopUp
- className="digit-popup--fullscreen"
- type={"default"}
- heading={primaryButtonLabel}
- children={[
- <div key="builder" style={{ display: "grid", gap: "1rem" }}>
- ...
- </div>
- ]}
- onOverlayClick={closePopup}
- onClose={closePopup}
- equalWidthButtons={"false"}
- footerChildren={[ ... ]}
- />
+ <PopUp
+ className="digit-popup--fullscreen"
+ type="default"
+ heading={primaryButtonLabel}
+ onOverlayClick={closePopup}
+ onClose={closePopup}
+ equalWidthButtons="false"
+ footerChildren={[ /* unchanged buttons */ ]}
+ >
+ <div style={{ display: "grid", gap: "1rem" }}>
+ { /* unchanged builder content */ }
+ </div>
+ </PopUp>
📝 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.
<PopUp | |
className="digit-popup--fullscreen" | |
type={"default"} | |
heading={primaryButtonLabel} | |
children={[ | |
<div key="builder" style={{ display: "grid", gap: "1rem" }}> | |
{conditions.map((cond, idx) => { | |
const fieldOptions = cond?.selectedPage?.code | |
? getFieldOptions(cond.selectedPage.code) | |
: []; | |
const selectedFieldObj = fieldOptions.find( | |
(f) => f.code === cond?.selectedField?.code | |
); | |
const operatorOptions = getOperatorOptions(selectedFieldObj); | |
// Pick full object from operatorOptions by comparing code | |
const selectedOperator = cond?.comparisonType?.code | |
? operatorOptions.find((o) => o.code === cond.comparisonType.code) | |
: undefined; | |
return ( | |
<div | |
key={`cond-card-${idx}`} | |
style={{ | |
background: "#FAFAFA", | |
border: "1px solid #F5D8C6", | |
borderRadius: 8, | |
padding: "0.75rem", | |
display: "grid", | |
gap: "0.5rem", | |
}} | |
> | |
{/* Join-with for items after the first */} | |
{idx > 0 && ( | |
<div style={{ display: "flex", alignItems: "center", gap: "0.5rem" }}> | |
<span style={{ fontWeight: 600 }}>{joinWithLabel}</span> | |
<div style={{ width: 160, maxWidth: "100%" }}> | |
<Dropdown | |
option={LOGICALS} | |
optionKey="name" | |
name={`joiner-${idx}`} | |
t={t} | |
select={(e) => changeJoiner(idx, e.code)} | |
selected={cond.joiner} | |
/> | |
</div> | |
</div> | |
)} | |
{/* Single ROW that wraps: Page | Field | Operator | Value | Delete */} | |
<div | |
style={{ | |
display: "flex", | |
flexWrap: "wrap", | |
gap: "0.75rem", | |
alignItems: "flex-end", | |
}} | |
> | |
<div style={{ minWidth: 220, flex: "1 1 240px" }}> | |
<LabelFieldPair vertical removeMargin> | |
<p style={{ margin: 0 }}>{selectPageLabel}</p> | |
<div className="digit-field" style={{ width: "100%" }}> | |
<Dropdown | |
option={pageOptions} | |
optionKey="code" | |
name={`page-${idx}`} | |
t={t} | |
select={(e) => | |
updateCond(idx, { | |
selectedPage: e, | |
selectedField: {}, | |
fieldValue: "", | |
comparisonType: {}, | |
}) | |
} | |
selected={cond.selectedPage} | |
/> | |
</div> | |
</LabelFieldPair> | |
</div> | |
<div style={{ minWidth: 260, flex: "1 1 280px" }}> | |
<LabelFieldPair vertical removeMargin> | |
<p style={{ margin: 0 }}>{selectFieldLabel}</p> | |
<div className="digit-field" style={{ width: "100%" }}> | |
<Dropdown | |
option={fieldOptions} | |
optionKey="code" | |
name={`field-${idx}`} | |
t={t} | |
select={(e) => { | |
const nextOps = getOperatorOptions(e); | |
const canKeep = | |
cond?.comparisonType?.code && | |
nextOps.some((o) => o.code === cond.comparisonType.code); | |
updateCond(idx, { | |
selectedField: e, | |
fieldValue: "", | |
comparisonType: canKeep ? cond.comparisonType : {}, | |
}); | |
}} | |
selected={cond.selectedField} | |
disabled={!cond?.selectedPage?.code} | |
/> | |
</div> | |
</LabelFieldPair> | |
</div> | |
<div style={{ minWidth: 220, flex: "0 1 220px" }}> | |
<LabelFieldPair vertical removeMargin> | |
<p style={{ margin: 0 }}>{comparisonTypeLabel}</p> | |
<div className="digit-field" style={{ width: "100%" }}> | |
<Dropdown | |
option={operatorOptions} | |
optionKey="name" | |
name={`op-${idx}`} | |
t={t} | |
select={(e) => updateCond(idx, { comparisonType: e })} | |
disabled={!cond?.selectedField?.code} | |
selected={selectedOperator} | |
/> | |
</div> | |
</LabelFieldPair> | |
</div> | |
<div style={{ minWidth: 220, flex: "0 1 220px" }}> | |
<LabelFieldPair vertical removeMargin> | |
<p style={{ margin: 0 }}>{selectValueLabel}</p> | |
<div className="digit-field" style={{ width: "100%" }}> | |
{selectedFieldObj && selectedFieldObj.format === "dropdown" ? ( | |
<Dropdown | |
option={(selectedFieldObj.enums || []).map((en) => ({ | |
code: en.code, | |
name: en.name, | |
}))} | |
optionKey="code" | |
name={`val-${idx}`} | |
t={t} | |
select={(e) => updateCond(idx, { fieldValue: e.code })} | |
disabled={!cond?.selectedField?.code} | |
selected={cond.fieldValue} | |
/> | |
) : ( | |
<TextInput | |
type="text" | |
populators={{ name: `text-${idx}` }} | |
placeholder={enterValueLabel} | |
value={cond.fieldValue} | |
onChange={(event) => | |
updateCond(idx, { fieldValue: event.target.value }) | |
} | |
disabled={!cond?.selectedField?.code} | |
/> | |
)} | |
</div> | |
</LabelFieldPair> | |
</div> | |
<div | |
style={{ | |
marginLeft: "auto", | |
display: "flex", | |
alignItems: "center", | |
gap: "0.25rem", | |
cursor: "pointer", | |
}} | |
onClick={() => removeCondition(idx)} | |
title={removeConditionLabel} | |
aria-label={removeConditionLabel} | |
role="button" | |
> | |
<SVG.Delete fill={"#C84C0E"} width={"1.25rem"} height={"1.25rem"} /> | |
<span style={{ color: "#C84C0E", fontSize: "0.875rem", fontWeight: 500 }}> | |
{removeConditionLabel} | |
</span> | |
</div> | |
</div> | |
</div> | |
); | |
})} | |
{/* Add condition */} | |
<div> | |
<Button | |
variation="secondary" | |
label={addConditionLabel} | |
icon="Add" | |
onClick={addCondition} | |
style={{ minWidth: "auto" }} | |
/> | |
</div> | |
</div> | |
]} | |
onOverlayClick={closePopup} | |
onClose={closePopup} | |
equalWidthButtons={"false"} | |
footerChildren={[ | |
<Button | |
key="close" | |
type={"button"} | |
size={"large"} | |
variation={"secondary"} | |
label={closeLabel} | |
onClick={closePopup} | |
/>, | |
<Button | |
key="submit" | |
type={"button"} | |
size={"large"} | |
variation={"primary"} | |
label={submitLabel} | |
onClick={closePopup} | |
/>, | |
]} | |
/> | |
)} | |
</div> | |
</LabelFieldPair> | |
</div> | |
</BodyPortal> | |
<PopUp | |
className="digit-popup--fullscreen" | |
type="default" | |
heading={primaryButtonLabel} | |
onOverlayClick={closePopup} | |
onClose={closePopup} | |
equalWidthButtons="false" | |
footerChildren={[ | |
<Button | |
key="close" | |
type="button" | |
size="large" | |
variation="secondary" | |
label={closeLabel} | |
onClick={closePopup} | |
/>, | |
<Button | |
key="submit" | |
type="button" | |
size="large" | |
variation="primary" | |
label={submitLabel} | |
onClick={closePopup} | |
/>, | |
]} | |
> | |
<div key="builder" style={{ display: "grid", gap: "1rem" }}> | |
{conditions.map((cond, idx) => { | |
const fieldOptions = cond?.selectedPage?.code | |
? getFieldOptions(cond.selectedPage.code) | |
: []; | |
const selectedFieldObj = fieldOptions.find( | |
(f) => f.code === cond?.selectedField?.code | |
); | |
const operatorOptions = getOperatorOptions(selectedFieldObj); | |
const selectedOperator = cond?.comparisonType?.code | |
? operatorOptions.find((o) => o.code === cond.comparisonType.code) | |
: undefined; | |
return ( | |
<div | |
key={`cond-card-${idx}`} | |
style={{ | |
background: "#FAFAFA", | |
border: "1px solid #F5D8C6", | |
borderRadius: 8, | |
padding: "0.75rem", | |
display: "grid", | |
gap: "0.5rem", | |
}} | |
> | |
{/* ... the rest of each condition card */} | |
</div> | |
); | |
})} | |
{/* Add condition */} | |
<div> | |
<Button | |
variation="secondary" | |
label={addConditionLabel} | |
icon="Add" | |
onClick={addCondition} | |
style={{ minWidth: "auto" }} | |
/> | |
</div> | |
</div> | |
</PopUp> |
🧰 Tools
🪛 Biome (2.1.2)
[error] 559-560: The elements with this role can be changed to the following elements:
For examples and more information, see WAI-ARIA Roles
(lint/a11y/useSemanticElements)
[error] 548-561: The HTML element with the interactive role "button" is not focusable.
A non-interactive HTML element that is not focusable may not be reachable for users that rely on keyboard navigation, even with an added role like "button".
Add a tabIndex attribute to make this element focusable.
(lint/a11y/useFocusableInteractive)
[error] 548-561: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
(lint/a11y/useKeyWithClickEvents)
[error] 393-393: Avoid passing children using a prop
The canonical way to pass children in React is to use JSX elements
(lint/correctness/noChildrenProp)
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/DependentFieldsWrapper.js
around lines 389 to 606, the PopUp component is being passed its UI via a
non-standard children prop (children=[ ...JSX... ]) instead of using normal JSX
children; replace the children prop with nested JSX between <PopUp>...</PopUp>.
Concretely, remove the children={[ ... ]} prop and move that array/JSX content
to be the PopUp’s inner content, ensuring keys remain on list items and
footerChildren/onOverlayClick/onClose props stay as-is; verify there are no prop
name collisions (e.g., a literal children prop) and run linter/tests.
// Remove this for production | ||
|
||
// if (process.env.NODE_ENV === "development") { | ||
// return ( | ||
// //development mode | ||
// <AppLocalisationWrapperDev | ||
// onSubmit={onSubmit} | ||
// back={back} | ||
// showBack={showBack} | ||
// screenConfig={screenConfig} | ||
// parentDispatch={parentDispatch} | ||
// localeModule={localeModule} | ||
// pageTag={pageTag} | ||
// parentState={parentState} | ||
// /> | ||
// ); | ||
return ( | ||
//development mode | ||
<AppLocalisationWrapperDev | ||
onSubmit={onSubmit} | ||
back={back} | ||
showBack={showBack} | ||
screenConfig={screenConfig} | ||
parentDispatch={parentDispatch} | ||
localeModule={localeModule} | ||
pageTag={pageTag} | ||
parentState={parentState} | ||
/> | ||
); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Development-only wrapper is hardwired; reintroduce environment guard before merging.
Returning AppLocalisationWrapperDev unconditionally means prod builds will ship the dev wrapper and bypass the production wrapper. Add the NODE_ENV guard back or a feature flag.
- return (
- //development mode
- <AppLocalisationWrapperDev
+ if (process.env.NODE_ENV === "development") {
+ return (
+ <AppLocalisationWrapperDev
onSubmit={onSubmit}
back={back}
showBack={showBack}
screenConfig={screenConfig}
parentDispatch={parentDispatch}
localeModule={localeModule}
pageTag={pageTag}
parentState={parentState}
/>
- );
- // }
+ );
+ }
+
+ // Production
+ return (
+ <AppLocalisationWrapper
+ onSubmit={onSubmit}
+ back={back}
+ showBack={showBack}
+ screenConfig={screenConfig}
+ parentDispatch={parentDispatch}
+ localeModule={localeModule}
+ pageTag={pageTag}
+ parentState={parentState}
+ >
+ <AppPreview />
+ </AppLocalisationWrapper>
+ );
Would you like me to open a task to ensure this guard is enforced before release?
Also applies to: 197-213
Action Required: Reintroduce Environment Guard for Development-Only Wrapper
The AppLocalisationWrapperDev
is currently returned unconditionally, which means production bundles will ship the development wrapper and skip the intended production wrapper. To prevent this, wrap the dev component in a process.env.NODE_ENV === "development"
check and restore the production rendering for all other environments.
Please update in
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js
– lines 179–195 & 197–213:
Suggested diff:
// Development-only wrapper
- return (
- <AppLocalisationWrapperDev
+ if (process.env.NODE_ENV === "development") {
+ return (
+ <AppLocalisationWrapperDev
onSubmit={onSubmit}
back={back}
showBack={showBack}
screenConfig={screenConfig}
parentDispatch={parentDispatch}
localeModule={localeModule}
pageTag={pageTag}
parentState={parentState}
/>
- );
+ );
+ }
+
+ // Production wrapper
+ return (
+ <AppLocalisationWrapper
+ onSubmit={onSubmit}
+ back={back}
+ showBack={showBack}
+ screenConfig={screenConfig}
+ parentDispatch={parentDispatch}
+ localeModule={localeModule}
+ pageTag={pageTag}
+ parentState={parentState}
+ >
+ <AppPreview />
+ </AppLocalisationWrapper>
+ );
Would you like me to open a ticket to validate that this guard (or a feature flag) is enforced before the next release?
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/appConfigurationRedesign/ImpelComponentWrapper.js
around lines 179–195 and 197–213, the development-only AppLocalisationWrapperDev
is returned unconditionally; restore the environment guard so production uses
the production wrapper. Wrap the dev JSX return in a conditional check
(process.env.NODE_ENV === "development") and put the original production
rendering in the else branch (or after the conditional) so non-development
builds render the production component; keep all props passed through unchanged
and ensure no dev-only imports remain executed in production.
...ro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/appConfigHelpers.js
Outdated
Show resolved
Hide resolved
const labelText = props.t(props.field.label) || "LABEL"; | ||
const headingText = props.t("SELECT_FILTER"); | ||
|
||
return ( | ||
<div className="digit-search-action"> | ||
<FilterIcon onClick={() => setShowPopUp(true)} /> | ||
<span className="digit-search-text" style={{color: "#C84C0E"}}>{props.t(props.field.label) || "LABEL"}</span> | ||
<span className="digit-search-text" style={{ color: "#C84C0E" }}>{labelText}</span> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Label handling — OK; consider theme token instead of hard-coded color
Using t() for label/heading is correct. For the colored label span, prefer a theme variable over "#C84C0E" for consistency with design tokens.
- <span className="digit-search-text" style={{ color: "#C84C0E" }}>{labelText}</span>
+ <span className="digit-search-text" style={{ color: "var(--digit-primary-600, #C84C0E)" }}>{labelText}</span>
📝 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.
const labelText = props.t(props.field.label) || "LABEL"; | |
const headingText = props.t("SELECT_FILTER"); | |
return ( | |
<div className="digit-search-action"> | |
<FilterIcon onClick={() => setShowPopUp(true)} /> | |
<span className="digit-search-text" style={{color: "#C84C0E"}}>{props.t(props.field.label) || "LABEL"}</span> | |
<span className="digit-search-text" style={{ color: "#C84C0E" }}>{labelText}</span> | |
const labelText = props.t(props.field.label) || "LABEL"; | |
const headingText = props.t("SELECT_FILTER"); | |
return ( | |
<div className="digit-search-action"> | |
<FilterIcon onClick={() => setShowPopUp(true)} /> | |
<span className="digit-search-text" style={{ color: "var(--digit-primary-600, #C84C0E)" }}>{labelText}</span> |
🤖 Prompt for AI Agents
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/template_components/RegistrationComponents.js
around lines 51-58: the label span uses a hard-coded color "#C84C0E" — replace
it with the app's design token/theme variable (e.g., use the theme color prop, a
CSS variable, or a token import) so styling stays consistent; update the span to
reference the theme token (with a safe fallback) or add a CSS class that applies
the token, and remove the inline hex literal.
Feature Request
GITHUB ISSUE ID
#2881
#2888
Module
CONSOLE
Description
SMC Campaign updated Flow:
FieldPropertiesPanelConfig to be added:
Summary by CodeRabbit