Skip to content
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

Admin console Improved performance, sheets freezed, implemented caching, delivery type integarted #790

Merged
merged 2,332 commits into from
Jun 20, 2024

Conversation

jagankumar-egov
Copy link
Contributor

@jagankumar-egov jagankumar-egov commented Jun 20, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new GitHub Actions workflow for building and pushing Docker images for the digit-ui component.
    • Added a Registry class to manage component registrations.
    • Added new customization capabilities for employee applications and public grievance redressal (PGR) systems.
    • Updated CSS styles across multiple components for UI enhancements.
  • Bug Fixes

    • Improved error handling in the CampaignDocumentsPreview and CycleDataPreview components.
  • Documentation

    • Renamed project references from "workbench ui" to "DIGIT ui" in the README.
  • Dependencies

    • Updated various dependencies to newer versions in package.json files.
    • Added new dependency: @egovernments/digit-ui-module-hcmworkbench.
  • Style

    • Added new styles and adjusted existing ones across multiple SCSS files for better UI consistency and error handling.

ashish-egov and others added 30 commits May 21, 2024 17:37
* fixes-> cyclenumber issue, hover issue, dropdown height issue,

* css

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Copy link
Contributor

coderabbitai bot commented Jun 20, 2024

Warning

Review failed

Failed to post review comments.

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 3e8a3ec and e9433be.

Files ignored due to path filters (2)
  • health-services/project-factory/package-lock.json is excluded by !**/package-lock.json
  • health-services/project-factory/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing (57)
  • .github/workflows/buildWorkbenchUI.yml (1 hunks)
  • .github/workflows/publishProjectFactory.yml (1 hunks)
  • frontend/micro-ui/README.md (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/package.json (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/src/ComponentRegistry.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/src/complaintConfig.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/src/components/SelectName.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/src/fsm.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/src/pgr.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/package.json (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/css/package.json (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaignCycle.scss (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss (6 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BulkUpload.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDocumentsPreview.js (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js (9 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (5 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js (3 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js (12 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (28 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js (6 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/baseTimeOut.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (6 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/index.js (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useGenerateIdCampaign.js (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useParallelSearch.js (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js (5 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AddProduct.js (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js (3 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (28 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js (4 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/MultiTabcontext.js (2 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (8 hunks)
  • frontend/micro-ui/web/package.json (1 hunks)
  • frontend/micro-ui/web/public/index.html (1 hunks)
  • frontend/micro-ui/web/workbench/inter-package.json (2 hunks)
  • frontend/micro-ui/web/workbench/package.json (2 hunks)
  • health-services/project-factory/migration/Dockerfile (1 hunks)
  • health-services/project-factory/migration/migrate.sh (1 hunks)
  • health-services/project-factory/package.json (2 hunks)
  • health-services/project-factory/src/server/api/campaignApis.ts (19 hunks)
  • health-services/project-factory/src/server/api/genericApis.ts (16 hunks)
  • health-services/project-factory/src/server/app.ts (3 hunks)
  • health-services/project-factory/src/server/config/constants.ts (4 hunks)
  • health-services/project-factory/src/server/config/createAndSearch.ts (1 hunks)
  • health-services/project-factory/src/server/config/dbPoolConfig.ts (1 hunks)
  • health-services/project-factory/src/server/config/index.ts (6 hunks)
  • health-services/project-factory/src/server/kafka/Listener.ts (3 hunks)
  • health-services/project-factory/src/server/service/dataManageService.ts (3 hunks)
  • health-services/project-factory/src/server/tracing.ts (1 hunks)
Files not processed due to max files limit (11)
  • health-services/project-factory/src/server/utils/campaignMappingUtils.ts
  • health-services/project-factory/src/server/utils/campaignUtils.ts
  • health-services/project-factory/src/server/utils/excelUtils.ts
  • health-services/project-factory/src/server/utils/genericUtils.ts
  • health-services/project-factory/src/server/utils/processTrackUtils.ts
  • health-services/project-factory/src/server/utils/redisUtils.ts
  • health-services/project-factory/src/server/utils/request.ts
  • health-services/project-factory/src/server/utils/transforms/projectTypeUtils.ts
  • health-services/project-factory/src/server/utils/transforms/searchResponseConstructor.ts
  • health-services/project-factory/src/server/validators/campaignValidators.ts
  • health-services/project-factory/src/server/validators/genericValidator.ts
Additional context used
Learnings (2)
frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useGenerateIdCampaign.js (1)
User: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/hooks/index.js:19-19
Timestamp: 2024-05-21T16:49:54.360Z
Learning: The `useGenerateIdCampaign` hook is planned to be used in the Upload section in the future.
frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (3)
User: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#845
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:460-461
Timestamp: 2024-06-12T08:18:44.708Z
Learning: Error handling for Shapefile parsing in `Upload.js` is managed commonly and is handled elsewhere in the codebase, as clarified by the user.
User: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:0-0
Timestamp: 2024-03-13T05:11:36.400Z
Learning: A more detailed message for file parsing errors in the `Upload.js` file is displayed elsewhere in the code, as clarified by the user.
User: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:468-481
Timestamp: 2024-03-13T07:33:45.211Z
Learning: The error message in the `checkForErrorInUploadedFile` function within `Upload.js` is being localized and improved for better user experience, as clarified by the user.
Shellcheck
health-services/project-factory/migration/migrate.sh

[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)

Biome
frontend/micro-ui/web/micro-ui-internals/example/src/components/SelectName.js

[error] 5-5: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead

health-services/project-factory/src/server/config/dbPoolConfig.ts

[error] 9-9: Use Number.parseInt instead of the equivalent global. (lint/style/useNumberNamespace)

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

health-services/project-factory/src/server/tracing.ts

[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

health-services/project-factory/src/server/app.ts

[error] 13-13: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 13-13: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 37-37: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js

[error] 20-100: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js

[error] 9-9: Do not shadow the global "Error" property. (lint/suspicious/noShadowRestrictedNames)

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.


[error] 63-63: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 70-74: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 4-4: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 18 to the max allowed complexity 15.


[error] 82-82: This let declares a variable that is only assigned once. (lint/style/useConst)

'retryInterval' is never reassigned.

Safe fix: Use const instead.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDocumentsPreview.js

[error] 41-41: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 38-38: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 16 to the max allowed complexity 15.


[error] 17-17: This let declares a variable that is only assigned once. (lint/style/useConst)

'acc' is never reassigned.

Safe fix: Use const instead.


[error] 40-40: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 75-83: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useParallelSearch.js

[error] 54-54: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 57-85: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 62-85: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)


[error] 68-85: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)


[error] 82-82: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 2-2: This let declares a variable that is only assigned once. (lint/style/useConst)

'cacheData' is never reassigned.

Safe fix: Use const instead.


[error] 7-7: This let declares a variable that is only assigned once. (lint/style/useConst)

'missingCodes' is never reassigned.

Safe fix: Use const instead.

health-services/project-factory/src/server/service/dataManageService.ts

[error] 33-33: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 44-44: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 49-49: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 54-54: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 58-58: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 66-66: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 82-82: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

health-services/project-factory/src/server/kafka/Listener.ts

[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 42-42: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 44-44: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 75-75: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 75-75: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AddProduct.js

[error] 23-25: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 43-45: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 53-55: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.

health-services/project-factory/src/server/config/constants.ts

[error] 1-1: Do not shadow the global "Error" property. (lint/suspicious/noShadowRestrictedNames)

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.


[error] 3-3: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 62-62: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 72-72: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 89-89: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 96-96: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 104-104: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 118-118: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js

[error] 61-77: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 100-137: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 106-106: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 104-104: Avoid passing children using a prop (lint/correctness/noChildrenProp)

The canonical way to pass children in React is to use JSX elements


[error] 105-105: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 113-123: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 124-134: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js

[error] 39-39: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 44-49: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 15-15: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 57-65: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 64-64: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 99-99: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BulkUpload.js

[error] 128-135: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 190-196: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 130-130: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 183-183: Avoid passing children using a prop (lint/correctness/noChildrenProp)

The canonical way to pass children in React is to use JSX elements

health-services/project-factory/src/server/config/createAndSearch.ts

[error] 2-2: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 103-103: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 131-131: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/MultiTabcontext.js

[error] 170-176: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 135-135: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 170-176: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 177-177: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 197-197: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.

health-services/project-factory/src/server/config/index.ts

[error] 15-15: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 73-73: Use Number.parseInt instead of the equivalent global. (lint/style/useNumberNamespace)

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js

[error] 23-23: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 163-169: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 163-169: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 170-170: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 211-211: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js

[error] 44-44: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 16 to the max allowed complexity 15.


[error] 229-229: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 269-269: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 292-292: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 315-315: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 346-346: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 356-356: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 363-363: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 370-370: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 380-380: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 204-204: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 18 to the max allowed complexity 15.


[error] 400-400: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 41-41: This let declares a variable that is only assigned once. (lint/style/useConst)

'newArray' is never reassigned.

Safe fix: Use const instead.


[error] 214-214: This let declares a variable that is only assigned once. (lint/style/useConst)

'temp' is never reassigned.

Safe fix: Use const instead.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

[error] 51-51: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 51-51: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 54-54: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 88-88: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 121-129: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 89-89: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 27 to the max allowed complexity 15.


[error] 136-136: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 52-52: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 25 to the max allowed complexity 15.


[error] 153-153: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 157-157: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 157-157: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 157-157: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 211-211: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 244-252: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 212-212: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 27 to the max allowed complexity 15.


[error] 358-372: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause. (lint/correctness/noSwitchDeclarations)

The declaration is defined in this switch clause:

Unsafe fix: Wrap the declaration in a block.


[error] 375-378: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause. (lint/correctness/noSwitchDeclarations)

The declaration is defined in this switch clause:

Unsafe fix: Wrap the declaration in a block.


[error] 377-377: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 377-377: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 382-393: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause. (lint/correctness/noSwitchDeclarations)

The declaration is defined in this switch clause:

Unsafe fix: Wrap the declaration in a block.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js

[error] 30-31: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 298-298: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.


[error] 311-314: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 355-363: The call chain .map().flat() can be replaced with a single .flatMap() call. (lint/complexity/useFlatMap)

Safe fix: Replace the chain with .flatMap().


[error] 359-361: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 369-369: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 277-277: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 31 to the max allowed complexity 15.


[error] 403-403: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 420-420: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 430-430: The call chain .map().flat() can be replaced with a single .flatMap() call. (lint/complexity/useFlatMap)

Safe fix: Replace the chain with .flatMap().


[error] 443-443: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 494-527: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 500-500: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 310-310: This let declares a variable that is only assigned once. (lint/style/useConst)

'res' is never reassigned.

Safe fix: Use const instead.


[error] 417-417: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 441-441: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 484-484: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 498-498: Avoid passing children using a prop (lint/correctness/noChildrenProp)

The canonical way to pass children in React is to use JSX elements


[error] 499-499: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 507-515: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js

[error] 25-25: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 152-152: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


[error] 153-153: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


[error] 185-185: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 247-260: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 382-382: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 642-654: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 671-674: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 725-725: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 744-744: Unexpected empty object pattern. (lint/correctness/noEmptyPattern)


[error] 71-71: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. (lint/suspicious/noGlobalIsNan)

See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.


[error] 104-104: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. (lint/suspicious/noGlobalIsNan)

See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.


[error] 300-300: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. (lint/suspicious/noGlobalIsNan)

See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.


[error] 332-332: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. (lint/suspicious/noGlobalIsNan)

See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.


[error] 528-528: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 544-544: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


[error] 692-700: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 729-729: Avoid passing children using a prop (lint/correctness/noChildrenProp)

The canonical way to pass children in React is to use JSX elements


[error] 795-795: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.

health-services/project-factory/src/server/api/genericApis.ts

[error] 16-16: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 19-19: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 39-39: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 40-40: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 44-44: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 39-39: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 27 to the max allowed complexity 15.


[error] 64-64: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 64-64: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 64-64: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 66-68: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 78-78: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 99-99: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 104-104: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 106-106: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 121-121: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 125-125: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 130-130: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 145-145: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 149-149: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 154-154: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

health-services/project-factory/src/server/api/campaignApis.ts

[error] 22-22: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 27-27: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 33-33: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 33-33: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 33-33: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 37-37: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 39-42: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 51-51: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 64-64: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 82-82: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 82-82: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 84-84: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 95-95: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 113-113: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 113-113: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 115-115: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 137-137: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 137-137: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 172-172: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 172-172: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js

[error] 103-103: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


[error] 152-152: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 169-169: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


[error] 144-144: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 28 to the max allowed complexity 15.


[error] 174-174: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 308-308: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 24 to the max allowed complexity 15.


[error] 337-344: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 359-359: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 421-421: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 24 to the max allowed complexity 15.


[error] 448-450: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 461-461: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 22 to the max allowed complexity 15.


[error] 608-617: This var should be declared at the root of the enclosing function. (lint/correctness/noInnerDeclarations)

The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.


[error] 637-637: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 685-685: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 691-691: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 595-595: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 83 to the max allowed complexity 15.


[error] 759-759: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 807-842: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 813-841: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 816-816: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 27 to the max allowed complexity 15.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js

[error] 301-301: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 363-363: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 364-364: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 341-341: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 22 to the max allowed complexity 15.


[error] 499-499: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 500-500: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 509-509: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 89 to the max allowed complexity 15.


[error] 583-785: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 584-584: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 25 to the max allowed complexity 15.


[error] 658-658: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 32 to the max allowed complexity 15.


[error] 760-760: Avoid the delete operator which can impact performance. (lint/performance/noDelete)


[error] 761-761: Avoid the delete operator which can impact performance. (lint/performance/noDelete)


[error] 715-715: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 46 to the max allowed complexity 15.


[error] 791-791: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 889-889: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 16 to the max allowed complexity 15.


[error] 841-841: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 16 to the max allowed complexity 15.


[error] 933-933: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 934-934: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 935-935: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 936-936: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

LanguageTool
frontend/micro-ui/README.md

[uncategorized] ~12-~12: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...g/ for more details. DIGIT platform is microservices based API platform enabling quick rebundling ...


[uncategorized] ~60-~60: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...o your .env file REACT_APP_PROXY_API :: {{server url}} REACT_APP_GLOBAL ...


[uncategorized] ~62-~62: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ... {{server url}} REACT_APP_GLOBAL :: {{server url}} `REACT_APP_PROXY_AS...


[uncategorized] ~64-~64: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...erver url}} REACT_APP_PROXY_ASSETS :: {{server url}} REACT_APP_USER_TYP...


[uncategorized] ~66-~66: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...{{server url}} REACT_APP_USER_TYPE :: {{EMPLOYEE||CITIZEN}} SKIP_PREFLI...


[uncategorized] ~68-~68: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...YEE||CITIZEN}} SKIP_PREFLIGHT_CHECK::true` [sample .env file](https://git...

Markdownlint
frontend/micro-ui/README.md

2-2: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


15-15: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


74-74: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


123-123: Expected: 0 or 2; Actual: 4 (MD009, no-trailing-spaces)
Trailing spaces


14-14: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


17-17: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


24-24: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


55-55: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


90-90: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


95-95: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


100-100: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


105-105: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


117-117: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


34-34: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


129-129: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


10-10: null (MD034, no-bare-urls)
Bare URL used


103-103: null (MD034, no-bare-urls)
Bare URL used


108-108: Expected: fenced; Actual: indented (MD046, code-block-style)
Code block style

Additional comments not posted (34)
health-services/project-factory/migration/Dockerfile (1)

1-9: Dockerfile setup looks good and is well-structured for the intended migration operations.

frontend/micro-ui/web/micro-ui-internals/example/src/ComponentRegistry.js (1)

1-11: The Registry class implementation is clean and follows good practices for encapsulation.

frontend/micro-ui/web/micro-ui-internals/example/src/pgr.js (1)

7-9: Confirm if returning an empty object from getComplaintDetailsTableRows is intentional or if it requires implementation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useGenerateIdCampaign.js (1)

1-1: Consider changing the default value of forceUpdate from "true" (string) to true (boolean) for clarity and proper usage in conditional checks.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/index.js (1)

10-10: The addition of useParallelSearch to the hooks index is well-integrated and follows best practices for modularity and reusability.

Also applies to: 27-27

frontend/micro-ui/web/micro-ui-internals/example/package.json (1)

12-17: Ensure that the updates to @egovernments dependencies are aligned with changes mentioned in their respective changelogs, especially for beta versions where changes can be significant.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json (1)

21-26: Confirm that the updates to dependencies in the campaign manager's package.json are necessary and do not introduce breaking changes, particularly given the beta status of many packages.

Verification successful

The executed scripts provided comprehensive information about the usage of the updated dependencies within the campaign manager module. The results indicate that the updated dependencies are indeed utilized in various parts of the codebase.

  • The commit history did not provide explicit justifications for the dependency updates, but the extensive usage of these dependencies throughout the module suggests that the updates are necessary.
  • The usage of the updated dependencies was confirmed across multiple files, which implies that they are integral to the functionality of the campaign manager module.

Given these findings, it is reasonable to conclude that the dependency updates are necessary and should not introduce breaking changes, as they are actively used within the codebase.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the necessity and impact of dependency updates in the campaign manager module.

# Test: Review commit messages related to these updates and test the campaign manager functionalities. Expect: Justification for updates and stable functionality.
git log --oneline | grep -i 'update dependencies'

Length of output: 51



Script:

#!/bin/bash
# Description: Verify the necessity and impact of dependency updates in the campaign manager module.

# Test 1: Review commit messages related to these updates in the entire git history.
git log --grep='update' --grep='dependencies' --grep='deps' --oneline

# Test 2: Verify if the updated dependencies are used within the campaign manager module.
# Searching for usage of @egovernments/digit-ui-react-components
rg '@egovernments/digit-ui-react-components' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/

# Searching for usage of @egovernments/digit-ui-components
rg '@egovernments/digit-ui-components' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/

# Searching for usage of @rjsf/core
rg '@rjsf/core' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/

# Searching for usage of @rjsf/utils
rg '@rjsf/utils' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/

# Searching for usage of @rjsf/validator-ajv8
rg '@rjsf/validator-ajv8' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/

# Searching for usage of ajv
rg 'ajv' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/

Length of output: 128156

frontend/micro-ui/web/micro-ui-internals/packages/css/package.json (1)

3-3: Version update noted.

This update is consistent with the changes described in the AI-generated summary.

frontend/micro-ui/web/micro-ui-internals/example/public/index.html (1)

17-19: CSS link updates noted.

These updates are consistent with the changes described in the AI-generated summary.

frontend/micro-ui/web/micro-ui-internals/package.json (3)

45-45: Pinning the ajv version to 8.12.0 is a good practice for ensuring consistency.


48-48: Update to @egovernments/digit-ui-react-components version 1.8.2-beta.6 should bring new features or fixes. Ensure to test their integration thoroughly.


49-49: Update to @egovernments/digit-ui-components version 0.0.2-beta.1 should include improvements or bug fixes. Verify the integration of these changes.

frontend/micro-ui/web/workbench/inter-package.json (2)

49-49: Update to @egovernments/digit-ui-react-components version 1.8.2-beta.1 should bring new features or fixes. Ensure to test their integration thoroughly.


50-50: Update to @egovernments/digit-ui-components version 0.0.2-beta.1 should include improvements or bug fixes. Verify the integration of these changes.

frontend/micro-ui/web/public/index.html (2)

14-14: Included new CSS link for the hcm-workbench module. Ensure this integrates well with existing styles and does not cause any visual regressions.


11-12: Updated CSS links to newer versions. Verify the visual aspects to ensure the styles are applied correctly.

frontend/micro-ui/web/micro-ui-internals/example/src/fsm.js (1)

1-38: The fsmCustomizations configuration provides flexible field management for employee applications. Consider adding more detailed comments or documentation to enhance clarity and maintainability.

+  // Detailed comments explaining each configuration option
+  // Example:
+  // allFields: true - Include all fields by default. Use `fieldsOrder` to specify the order of a subset of fields.

Likely invalid or redundant comment.

frontend/micro-ui/web/package.json (1)

19-22: Ensure that the updated versions of the dependencies are compatible with each other and with the project's existing codebase.

.github/workflows/publishProjectFactory.yml (1)

6-7: LGTM! Ensure that no other directories should trigger this workflow that are not included.

Verification successful

The script output shows several other workflows that have paths: defined:

  • .github/workflows/publishProjectFactory.yml
  • .github/workflows/buildWorkbenchUI.yml
  • .github/workflows/publishAllPackages.yml
  • .github/workflows/publishAllPackagesRelease.yml
  • .github/workflows/build_egov-mdms-services.yml

To ensure that no other directories should trigger the publishProjectFactory.yml workflow, we need to examine these workflows and determine if any directories overlap or if there are other directories relevant to the project-factory service that should be included.

Next, we will inspect the paths defined in each of these workflows to identify any potential overlaps or missing directories.


The inspection of the paths defined in each workflow file reveals no overlap with the utilities/project-factory/** path specified in publishProjectFactory.yml. Each workflow is correctly scoped to its respective directory, ensuring that no unrelated directories will trigger the publishProjectFactory.yml workflow.

  • .github/workflows/buildWorkbenchUI.yml: micro-ui/web/micro-ui-internals/**
  • .github/workflows/build_egov-mdms-services.yml: core-services/egov-mdms-service/**
  • .github/workflows/publishAllPackages.yml: micro-ui/web/micro-ui-internals/**
  • .github/workflows/publishAllPackagesRelease.yml: micro-ui/web/micro-ui-internals/**
  • .github/workflows/publishProjectFactory.yml: utilities/project-factory/**

Given these findings, the paths specified in publishProjectFactory.yml are correctly scoped and no other directories need to be included.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if any other directories should trigger the workflow.

# Test: Search for other directories that might need to trigger the workflow.
rg --type yaml -g '*.yml' 'paths:' .github/workflows/

Length of output: 327



Script:

#!/bin/bash
# Description: Inspect the paths defined in each workflow to identify any potential overlaps or missing directories.

# List the paths defined in each relevant workflow file.
for file in .github/workflows/*.yml; do
  echo "Paths in $file:"
  rg --type yaml -g '*.yml' 'paths:' -A 5 $file
  echo
done

Length of output: 1964

frontend/micro-ui/web/workbench/package.json (1)

15-20: Ensure that the updated dependencies are compatible and tested thoroughly to avoid runtime issues.

frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss (1)

170-170: Ensure that the z-index value does not cause overlapping issues with other components. It's set quite high, which might lead to unexpected layering in the UI.

frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaignCycle.scss (1)

268-270: Ensure consistent font weight across similar components for a uniform user interface.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js (1)

Line range hint 1-253: Ensure that all necessary fields are properly configured and that the configuration aligns with the requirements.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js (1)

82-83: Verify the necessity of optional chaining in this context to prevent potential runtime errors.

Verification successful

The optional chaining in the provided code snippet is used to safely access deeply nested properties that may not exist. This prevents potential runtime errors that would occur if any part of the chain is null or undefined.

The broader search results indicate multiple instances of optional chaining in the file, all of which are used to prevent errors from accessing properties on potentially null or undefined objects.

  • saved?.cycleConfgureDate?.cycle
  • filteredDeliveryConfig?.cycleConfig?.cycle
  • Digit.SessionStorage.get("HCM_CAMPAIGN_MANAGER_FORM_DATA")?.HCM_CAMPAIGN_TYPE?.projectType?.code
  • temp?.find((i) => i?.projectType === selectedProjectType)
  • and others

Given the context and the consistent use of optional chaining throughout the file, it is clear that the optional chaining in the provided snippet is necessary to prevent potential runtime errors.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check for any potential null references in the use of optional chaining in CycleConfiguration.js

# Test: Search for the use of optional chaining in CycleConfiguration.js. Expect: Proper null checks before usage.
rg --type js '?.refetch' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js

Length of output: 227



Script:

#!/bin/bash
# Description: Check for any potential null references in the use of optional chaining in CycleConfiguration.js

# Test: Search for the use of optional chaining in CycleConfiguration.js. Expect: Proper null checks before usage.
rg --type js '\?\.\refetch' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js

Length of output: 145



Script:

#!/bin/bash
# Description: Search for any optional chaining usage in CycleConfiguration.js and examine the surrounding context.

# Test: Search for the use of optional chaining in CycleConfiguration.js. Expect: Proper null checks before usage.
rg --type js '\?\.' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js

# Retrieve the surrounding lines around the provided snippet to understand the context.
rg --type js -A 10 -B 10 'HCM_CAMPAIGN_MANAGER_FORM_DATA' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js

Length of output: 5955

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js (1)

356-356: Check and handle the potential for undefined values due to unsafe optional chaining.

Also applies to: 363-363, 370-370

Verification successful

The search results indicate that the optional chaining usage involving deliveryRules is followed by appropriate null checks. Specifically, the code checks if data?.[0]?.deliveryRules is truthy before proceeding with operations such as map and Math.max.

  • data?.[0]?.deliveryRules && data?.[0]?.deliveryRules.map((item) => item.cycleNumber)?.length > 0
  • data?.[0]?.deliveryRules && data?.[0]?.deliveryRules.map((item) => item.deliveryNumber)?.length > 0

These checks ensure that deliveryRules is defined and has items before performing further operations.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the safe usage of optional chaining in CampaignSummary.js

# Test: Search for unsafe optional chaining usage. Expect: Proper null checks before usage.
rg --type js '?.deliveryRules?' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js

Length of output: 234



Script:

#!/bin/bash
# Description: Verify the safe usage of optional chaining in CampaignSummary.js

# Test: Search for unsafe optional chaining usage. Expect: Proper null checks before usage.
rg --type js '\?.deliveryRules' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js

Length of output: 631

Tools
Biome

[error] 356-356: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (1)

21-22: Please verify the use of URLSearchParams with the location object.

Verification successful

The DeliverySetup function uses the URLSearchParams with location.search, and it appears that location is directly used within this function without any prior definition or import. This suggests that location is being assumed to be globally available, which is typical in a browser environment.

  • location is a global object in the browser, so its usage here should be valid.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify if `location` is properly defined and accessible in this context.
ast-grep --lang javascript --pattern $'function DeliverySetup($_, $_) {
  $$$
  new URLSearchParams(location.search);
  $$$
}'

Length of output: 127



Script:

#!/bin/bash
# Identify the function where the snippet is located.
rg -A 10 'const searchParams = new URLSearchParams(location.search);' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

Length of output: 187



Script:

#!/bin/bash
# Identify the function where the snippet is located.
rg -A 10 'const searchParams = new URLSearchParams(location.search);' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

Length of output: 187



Script:

#!/bin/bash
# Identify the function or component where the snippet is located.
rg -B 10 'const searchParams = new URLSearchParams(location.search);' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

Length of output: 187



Script:

#!/bin/bash
# Search for all function definitions in the specified file to identify the function or component where the snippet is located.
rg 'function ' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

Length of output: 285



Script:

#!/bin/bash
# Check the content of the DeliverySetup function to verify the use of location.
rg -A 20 'function DeliverySetup' frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

Length of output: 1458

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js (1)

2-2: Ensure that all necessary imports are present and correctly used.

Verification successful

All the components imported from @egovernments/digit-ui-react-components in SelectingBoundaries.js are used in the file.

  • CardText is used.
  • LabelFieldPair is used.
  • Card is used.
  • Header is used.
  • CardLabel is used.
  • LoaderWithGap is used.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify if all components imported are used and necessary.
ast-grep --lang javascript --pattern $'import { $_ } from "@egovernments/digit-ui-react-components"'

Length of output: 4124



Script:

#!/bin/bash
# Locate the SelectingBoundaries.js file and analyze the usage of imported components.

# Step 1: Locate the SelectingBoundaries.js file
file_path=$(fd SelectingBoundaries.js)

# Step 2: Extract the import statements from the file
imports=$(grep -oP 'import \{.*\} from "@egovernments/digit-ui-react-components";' "$file_path")

# Step 3: Check the usage of each imported component within the file
echo "$imports" | grep -oP '\w+' | while read -r component; do
  if [[ "$component" != "import" && "$component" != "from" ]]; then
    echo "Checking usage of component: $component"
    grep -q "$component" "$file_path" && echo "$component is used." || echo "$component is NOT used."
  fi
done

Length of output: 4557

health-services/project-factory/src/server/api/campaignApis.ts (2)

157-170: The commented-out function changeBodyViaSearchFromSheet may be obsolete or pending deletion. Please confirm its status.

Verification successful

The search results confirm that the function changeBodyViaSearchFromSheet is not actively used anywhere in the codebase; all occurrences are commented out.

  • health-services/project-factory/src/server/api/campaignApis.ts: The function definition and its invocation are both commented out.

This suggests that the function is indeed obsolete or pending deletion.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify if the function `changeBodyViaSearchFromSheet` is used elsewhere in the codebase.
rg --type ts 'changeBodyViaSearchFromSheet'

Length of output: 371



Script:

#!/bin/bash
# Verify if the function `changeBodyViaSearchFromSheet` is used elsewhere in the codebase without being commented out.
rg --type ts --fixed-strings 'changeBodyViaSearchFromSheet' | grep -v '^\s*//'

Length of output: 406


909-914: The function projectCreate logs detailed debug information which might expose sensitive data. Ensure that sensitive information is not logged.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (1)

144-171: The function convertIntoSchema is marked by static analysis as excessively complex. Consider breaking it down into smaller, more manageable functions that handle specific parts of the schema conversion process.
[REFACTOR_SUGRESSION]

Tools
Biome

[error] 152-152: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


[error] 169-169: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


[error] 144-144: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 28 to the max allowed complexity 15.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (4)

Line range hint 301-301: Directly assign the result without using a ternary operator for better performance and readability.
[REFACTOR_SUGGESTion]

- const enabled = fetchUpload || (fetchBoundary && currentKey > 3) ? true : false;
+ const enabled = fetchUpload || (fetchBoundary && currentKey > 3);

Line range hint 583-785: Remove unnecessary else clauses to simplify control flow and enhance readability.
[REFACTOR_SUGGESTion]

if (condition) {
   // code
} else {
   // more code
}
// Simplify to:
if (condition) {
   // code
   return;
}
// more code
Tools
Biome

[error] 760-760: Avoid the delete operator which can impact performance. (lint/performance/noDelete)


260-263: Simplify boolean expressions for better readability and performance.

- const [targetEnabled, setTargetEnabled] = useState(false);
- const [facilityEnabled, setFacilityEnabled] = useState(false);
- const [userEnabled, setUserEnabled] = useState(false);
- const [active, setActive] = useState(0);
+ const [targetEnabled, setTargetEnabled, facilityEnabled, setFacilityEnabled, userEnabled, setUserEnabled, active, setActive] = useState(false);

Likely invalid or redundant comment.


236-236: Consider initializing summaryErrors directly in the useState call to simplify the code.

- const [summaryErrors, setSummaryErrors] = useState({});
+ const [summaryErrors, setSummaryErrors] = useState(null);

Likely invalid or redundant comment.

Comments failed to post (76)
frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js

21-21: Consider adding a title element or aria-label to the SVG for accessibility.

- <svg width="12" height="16" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="12" height="16" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Dustbin Icon">

Committable suggestion was skipped due to low confidence.

health-services/project-factory/src/server/tracing.ts

25-25: Replace any type with specific types for better type safety.

- export const tracingMiddleware = (req: any, res: any, next: any) => {
+ export const tracingMiddleware = (req: Request, res: Response, next: NextFunction) => {

Note: You will need to import Request, Response, and NextFunction from express.

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

frontend/micro-ui/web/micro-ui-internals/example/src/setupProxy.js

20-100: Consider refactoring the function expression to use an arrow function for better readability and consistency with modern JavaScript practices.

- module.exports = function (app) {
+ module.exports = (app) => {
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.

module.exports = (app) => {
  ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy));
  [
    "/access/v1/actions/mdms",
    "/egov-mdms-service",
    "/mdms-v2",
    "/egov-idgen",
    "/egov-location",
    "/localization",
    "/egov-workflow-v2",
    "/pgr-services",
    "/filestore",
    "/egov-hrms",
    "/user-otp",
    "/user",
    "/fsm",
    "/billing-service",
    "/collection-services",
    "/pdf-service",
    "/pg-service",
    "/vehicle",
    "/vendor",
    "/property-services",
    "/fsm-calculator/v1/billingSlab/_search",
    "/pt-calculator-v2",
    "/dashboard-analytics",
    "/echallan-services",
    "/egov-searcher/bill-genie/mcollectbills/_get",
    "/egov-searcher/bill-genie/billswithaddranduser/_get",
    "/egov-searcher/bill-genie/waterbills/_get",
    "/egov-searcher/bill-genie/seweragebills/_get",
    "/egov-pdf/download/UC/mcollect-challan",
    "/egov-hrms/employees/_count",
    "/tl-services/v1/_create",
    "/tl-services/v1/_search",
    "/egov-url-shortening/shortener",
    "/inbox/v1/_search",
    "/inbox/v2/_search",
    "/tl-services",
    "/tl-calculator",
    "/org-services",
    "/edcr",
    "/bpa-services",
    "/noc-services",
    "/egov-user-event",
    "/egov-document-uploader",
    "/egov-pdf",
    "/egov-survey-services",
    "/ws-services",
    "/sw-services",
    "/ws-calculator",
    "/sw-calculator/",
    "/egov-searcher",
    "/report",
    "/inbox/v1/dss/_search",
    "/loi-service",
    "/project/v1/",
    "/estimate-service",
    "/loi-service",
    "/works-inbox-service/v2/_search",
    "/egov-pdf/download/WORKSESTIMATE/estimatepdf",
    "/muster-roll",
    "/individual",
    "/mdms-v2",
    "/hcm-moz-impl",
    "/project",
    "/project/staff/v1/_search",
    "/project/v1/_search",
    "/facility/v1/_search",
    "/product/v1/_search",
    "/product/variant/v1/_search",
    "/hcm-bff/bulk/_transform",
    "/hcm-bff/hcm/_processmicroplan",
    "/health-hrms",
    "/project-factory",
    "/boundary-service",
    "/product",
  ].forEach((location) => app.use(location, createProxy));
  ["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy));
  ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy));
};
Tools
Biome

[error] 20-100: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

health-services/project-factory/src/server/app.ts

28-34: Ensure the proxy target URL is configurable and not hardcoded.

-       target: 'http://localhost:16686',
+       target: config.tracingUrl,

Add a new configuration for the tracing URL in your configuration file to avoid hardcoding values.

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.

    this.app.use('/tracing', createProxyMiddleware({
      target: config.tracingUrl,
      changeOrigin: true,
      pathRewrite: {
        '^/tracing': '/',
      },
    }));
frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AddProduct.js

94-94: Consider using a more descriptive variable name than sku.

Using more descriptive names can improve code readability. For instance, productSKU might convey the purpose more clearly than sku.


142-142: Ensure consistent naming conventions for CSS classes.

The class name addProductActionClass could be more descriptive and consistent with other naming conventions in the project. Consider using BEM (Block Element Modifier) or another systematic approach for CSS class names to enhance maintainability.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js

93-98: The translation of schema properties is a crucial step for internationalization. However, consider caching the results of t(key) and t(schema.properties[key].name) if these translations are used multiple times elsewhere in the application to avoid redundant operations.


152-152: There's an unsafe usage of optional chaining here. This could lead to a TypeError if it short-circuits with 'undefined'. Ensure that the properties being accessed are guaranteed to be present or handle the potential undefined scenario gracefully.

Tools
Biome

[error] 152-152: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


308-324: This function seems to have a high complexity due to multiple nested conditions and operations. Consider refactoring it to simplify the logic, possibly by breaking down the error handling into separate functions or by using a more streamlined approach to formatting error messages.

Tools
Biome

[error] 308-308: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 24 to the max allowed complexity 15.


421-442: This segment of validation error formatting is marked by static analysis as overly complex. Consider simplifying it by abstracting some of the repeated logic into helper functions or by reorganizing the code to avoid deep nesting.

Tools
Biome

[error] 421-421: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 24 to the max allowed complexity 15.


174-174: Use strict equality === instead of == to avoid potential bugs from type coercion. This is a common best practice in JavaScript to ensure type safety.

- if (uploadedFile.length == 0) {
+ if (uploadedFile.length === 0) {
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    if (uploadedFile.length === 0) {
Tools
Biome

[error] 174-174: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


169-169: Avoid using the delete operator as it can lead to performance issues due to object shape changes in JavaScript engines. Consider setting the property to undefined instead if you need to remove a property from an object.

- delete newData.campaignType;
+ newData.campaignType = undefined;
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.

    newData.campaignType = undefined;
Tools
Biome

[error] 169-169: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


608-617: The variable declaration within this loop can lead to confusion and potential bugs due to its function-wide scope. Consider declaring this variable at the function level instead.

+ var jsonData;
  jsonData = sheetData.map((row, index) => {
    const rowData = {};
    if (Object.keys(row).length > 0) {
      Object.keys(row).forEach((key) => {
        rowData[key] = row[key] === undefined || row[key] === "" ? "" : row[key];
      });
      rowData["!row#number!"] = index + 1; // Adding row number
      return rowData;
    }
  });
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.

          var jsonData;
          jsonData = sheetData.map((row, index) => {
            const rowData = {};
            if (Object.keys(row).length > 0) {
              Object.keys(row).forEach((key) => {
                rowData[key] = row[key] === undefined || row[key] === "" ? "" : row[key];
              });
              rowData["!row#number!"] = index + 1; // Adding row number
              return rowData;
            }
          });
Tools
Biome

[error] 608-617: This var should be declared at the root of the enclosing function. (lint/correctness/noInnerDeclarations)

The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js

156-156: Ensure consistent handling of optional chaining to prevent runtime errors.

- deliveryType: item?.deliveryType,
+ deliveryType: item.deliveryType ?? null,
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.

      deliveryType: item.deliveryType ?? null,
frontend/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js

118-118: Ensure consistency in naming color variables.

The variable name error-v2 could be more descriptive or consistent with existing naming conventions. Consider renaming it to align with other color variables.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js

82-82: Since 'retryInterval' is never reassigned, use 'const' instead of 'let' for better code clarity and to prevent accidental reassignment.

- let retryInterval = Math.min(baseDelay * jsonDataLength, maxTime);
+ const retryInterval = Math.min(baseDelay * jsonDataLength, maxTime);
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 retryInterval = Math.min(baseDelay * jsonDataLength , maxTime);
Tools
Biome

[error] 82-82: This let declares a variable that is only assigned once. (lint/style/useConst)

'retryInterval' is never reassigned.

Safe fix: Use const instead.


9-9: Avoid using "Error" as a variable name as it shadows the global "Error" object, which can lead to confusion and potential bugs.

- let Error = {
+ let errorDetails = {
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.

  let errorDetails = {
Tools
Biome

[error] 9-9: Do not shadow the global "Error" property. (lint/suspicious/noShadowRestrictedNames)

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.


63-63: Use optional chaining to simplify the error handling logic and improve code safety.

- if (error?.response && error?.response?.data) {
+ if (error?.response?.data) {
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 (error?.response?.data) {
Tools
Biome

[error] 63-63: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js

15-15: Avoid using the index of an array as a key in React components. Consider using a more stable identifier.

Tools
Biome

[error] 15-15: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


57-65: Each element in a list should have a unique key prop. Add a key to the InfoCard and its children for better performance and predictability.

- <InfoCard
+ <InfoCard key={`info-card-${i.id}`}
- additionalElements={[<Button className={"error"} label={i?.button} onClick={i.onClick} />]}
+ additionalElements={[<Button key={`button-${i.id}`} className={"error"} label={i?.button} onClick={i.onClick} />]}
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.

        <InfoCard
          key={`info-card-${i.id}`}
          populators={{
            name: "infocard",
          }}
          variant="error"
          text={t(i?.error ? i?.error : i?.message)}
          hasAdditionalElements={true}
          additionalElements={[<Button key={`button-${i.id}`} className={"error"} label={i?.button} onClick={i.onClick} />]}
        />
Tools
Biome

[error] 57-65: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 64-64: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/MultiTabcontext.js

177-177: Add a key property to the <span> element in the iterable context to help React identify which items have changed.

- <span style={{ color: "#505A5F" }}>
+ <span key="campaignInfoText" style={{ color: "#505A5F" }}>
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.

          <span key="campaignInfoText" style={{ color: "#505A5F" }}>
Tools
Biome

[error] 177-177: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


170-176: JSX elements without children should be self-closing. Also, add a key property for elements in iterable contexts.

- <img className="whoLogo"
-   src="https://cdn.worldvectorlogo.com/logos/world-health-organization-logo-1.svg"
-   alt="WHO Logo"
-   width="164"
-   height="90"
- ></img>
+ <img className="whoLogo" key="whoLogo"
+   src="https://cdn.worldvectorlogo.com/logos/world-health-organization-logo-1.svg"
+   alt="WHO Logo"
+   width="164"
+   height="90"
+   style={{ display: "block", userSelect: "none", margin: "auto", cursor: "zoom-in", backgroundColor: "hsl(0, 0%, 90%)", transition: "background-color 300ms" }}
+ />
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.

          <img className="whoLogo" key="whoLogo"
            src="https://cdn.worldvectorlogo.com/logos/world-health-organization-logo-1.svg"
            alt="WHO Logo"
            width="164"
            height="90"
            style={{ display: "block", userSelect: "none", margin: "auto", cursor: "zoom-in", backgroundColor: "hsl(0, 0%, 90%)", transition: "background-color 300ms" }}
          />
Tools
Biome

[error] 170-176: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 170-176: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/example/src/components/SelectName.js

5-5: Convert the JSX element to self-closing format for cleaner code.

-  return <FormStep config={config} onSelect={onSelect} t={t}></FormStep>;
+  return <FormStep config={config} onSelect={onSelect} t={t} />;
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 <FormStep config={config} onSelect={onSelect} t={t} />;
Tools
Biome

[error] 5-5: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead

health-services/project-factory/package.json

25-25: Consider locking down the version numbers for dependencies to avoid potential incompatibilities due to unexpected updates.

-    "ajv-errors": "^3.0.0",
+    "ajv-errors": "3.0.0",
-    "body-parser": "^1.20.2",
+    "body-parser": "1.20.2",
-    "express": "^4.19.2",
+    "express": "4.19.2",
-    "http-proxy-middleware": "^3.0.0",
+    "http-proxy-middleware": "3.0.0",
-    "ioredis": "^5.4.1",
+    "ioredis": "5.4.1",
-    "jaeger-client": "^3.19.0",
+    "jaeger-client": "3.19.0",
-    "opentracing": "^0.14.7",
+    "opentracing": "0.14.7",

Also applies to: 27-27, 29-35, 41-41, 42-42


52-52: Consider locking down the version numbers for devDependencies as well.

-    "@types/http-proxy-middleware": "^1.0.0",
+    "@types/http-proxy-middleware": "1.0.0",
-    "@types/jaeger-client": "^3.18.7",
+    "@types/jaeger-client": "3.18.7",
-    "ajv": "^8.16.0",
+    "ajv": "8.16.0",

Also applies to: 54-54, 55-55, 62-62

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js

106-106: Use template literals instead of string concatenation.

- <CardText style={{ margin: 0 }}>{t("ES_CAMPAIGN_UPDATE_TYPE_MODAL_TEXT") + " "}</CardText>
+ <CardText style={{ margin: 0 }}>{`${t("ES_CAMPAIGN_UPDATE_TYPE_MODAL_TEXT")} `}</CardText>

Using template literals enhances readability and maintainability of the 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.

              <CardText style={{ margin: 0 }}>{`${t("ES_CAMPAIGN_UPDATE_TYPE_MODAL_TEXT")} `}</CardText>
Tools
Biome

[error] 106-106: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


100-137: Use self-closing tags for JSX elements without children.

- <PopUp ...>
- </PopUp>
+ <PopUp ... />

Using self-closing tags for JSX elements without children simplifies the code and improves readability.

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 100-137: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 106-106: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 104-104: Avoid passing children using a prop (lint/correctness/noChildrenProp)

The canonical way to pass children in React is to use JSX elements


[error] 105-105: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 113-123: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 124-134: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


61-77: Add keyboard accessibility for interactive elements.

+ onKeyUp={(e) => {
+   if (e.key === "Enter" && props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate) {
+     setShowPopUp(true);
+     return;
+   }
+   return;
+ }}

Adding onKeyUp event handlers ensures that the component is accessible via keyboard, complying with accessibility standards.

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.

        <div
          className="campaign-type-wrapper"
          onClick={(e) => {
            if (props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate) {
              setShowPopUp(true);
              return;
            }
            return;
          }}
          onFocus={(e) => {
            if (props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate) {
              setShowPopUp(true);
              return;
            }
            return;
          }}
          onKeyUp={(e) => {
            if (e.key === "Enter" && props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate) {
              setShowPopUp(true);
              return;
            }
            return;
          }}
        >
Tools
Biome

[error] 61-77: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/CycleConfiguration.js

4-4: Consider removing commented-out imports to clean the code.


163-169: Elements in an iterable should have a unique key prop to maintain proper state and avoid potential issues during re-renders.

- <img className="whoLogo"
+ <img key="whoLogo" className="whoLogo"
- <span style={{ color: "#505A5F" }}>{t(
+ <span key="infoText" style={{ color: "#505A5F" }}>{t(

Also applies to: 170-170

Tools
Biome

[error] 163-169: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 163-169: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


JSX elements without children should be self-closing for cleaner code.

- <img className="whoLogo"
-   src="https://cdn.worldvectorlogo.com/logos/world-health-organization-logo-1.svg"
-   alt="WHO Logo"
-   width="164"
-   height="90"
- ></img>
+ <img className="whoLogo" src="https://cdn.worldvectorlogo.com/logos/world-health-organization-logo-1.svg" alt="WHO Logo" width="164" height="90" />
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.

          <img className="whoLogo" src="https://cdn.worldvectorlogo.com/logos/world-health-organization-logo-1.svg" alt="WHO Logo" width="164" height="90" />
Tools
Biome

[error] 163-169: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 163-169: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

health-services/project-factory/src/server/config/dbPoolConfig.ts

9-9: Use Number.parseInt for parsing integers to align with modern JavaScript standards.

-    port: parseInt(config.DB_CONFIG.DB_PORT),
+    port: Number.parseInt(config.DB_CONFIG.DB_PORT),
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.

    port: Number.parseInt(config.DB_CONFIG.DB_PORT),
Tools
Biome

[error] 9-9: Use Number.parseInt instead of the equivalent global. (lint/style/useNumberNamespace)

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BulkUpload.js

130-130: Avoid using the index of an array as a key in React components. Consider using a more stable identifier.

Tools
Biome

[error] 130-130: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.


128-135: Ensure keyboard accessibility by adding corresponding keyboard events for actions triggered by mouse events.

- onClick={(e) => {
+ onClick={(e) => {
+ onKeyUp={(e) => {

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 128-135: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.


[error] 130-130: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)

This is the source of the key value.

The order of the items may change, and this also affects performances and component state.
Check the React documentation.

health-services/project-factory/src/server/config/index.ts

15-15: Replace == with === to avoid potential issues with type coercion.

- return dbSchema ? (dbSchema == "egov" ? "public" : dbSchema) : "public";
+ return dbSchema ? (dbSchema === "egov" ? "public" : dbSchema) : "public";
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 dbSchema ? (dbSchema === "egov" ? "public" : dbSchema) : "public";
Tools
Biome

[error] 15-15: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===

health-services/project-factory/src/server/api/genericApis.ts

140-197: The function getTargetSheetDataAfterCode is complex and uses any type extensively. Consider breaking it down and using more specific types.

- const getTargetSheetDataAfterCode = async (
-   fileUrl: string,
-   getRow = false,
-   getSheetName = false,
-   codeColumnName = "Boundary Code",
-   localizationMap?: any
- ) => {
+ const getTargetSheetDataAfterCode = async (
+   fileUrl: string,
+   getRow = false,
+   getSheetName = false,
+   codeColumnName = "Boundary Code",
+   localizationMap?: LocalizationMap
+ ): Promise<WorkbookData> => {

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 145-145: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 149-149: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 154-154: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


19-26: Consider replacing the any type for workbook with a more specific type to enhance type safety and code maintainability.

- const workbook: any = await getExcelWorkbookFromFileURL(fileUrl, "");
+ const workbook: Workbook = await getExcelWorkbookFromFileURL(fileUrl, ""); // Assuming Workbook is a valid type from a library like ExcelJS.
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 workbook: Workbook = await getExcelWorkbookFromFileURL(fileUrl, "");

  // Get the main sheet name (assuming it's the second sheet)
  const mainSheetName = workbook.getWorksheet(1).name;
  const localizedMainSheet = getLocalizedName(mainSheetName, localizationMap);

  // Check if the main sheet exists in the workbook
  if (!workbook.getWorksheet(localizedMainSheet)) {
Tools
Biome

[error] 19-19: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


123-138: Consider refactoring getTargetSheetData to reduce complexity and enhance readability. Also, replace any with more specific types.

- const getTargetSheetData = async (
-   fileUrl: string,
-   getRow = false,
-   getSheetName = false,
-   localizationMap?: any
- ) => {
+ const getTargetSheetData = async (
+   fileUrl: string,
+   getRow = false,
+   getSheetName = false,
+   localizationMap?: LocalizationMap
+ ): Promise<WorkbookData> => {
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 workbook = await getTargetWorkbook(fileUrl, localizationMap);
  const sheetNames: string[] = [];
  workbook.eachSheet((worksheet: any) => {
    sheetNames.push(worksheet.name);
  });
  const localizedSheetNames = getLocalizedHeaders(sheetNames, localizationMap);

  const workbookData: { [key: string]: any[] } = {}; // Object to store data from each sheet

  for (const sheetName of localizedSheetNames) {
    const worksheet = workbook.getWorksheet(sheetName);
    const sheetData = worksheet.getSheetValues({ includeEmpty: true });
    workbookData[sheetName] = getJsonData(sheetData, getRow, getSheetName, sheetName);
  }
  return workbookData;
};

const getTargetSheetData = async (
  fileUrl: string,
  getRow = false,
  getSheetName = false,
  localizationMap?: LocalizationMap
): Promise<WorkbookData> => {
Tools
Biome

[error] 125-125: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 130-130: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


95-115: The function getSheetData is using any extensively. Consider specifying more detailed types to improve code clarity and error checking.

- const getSheetData = async (
-   fileUrl: string,
-   sheetName: string,
-   getRow = false,
-   createAndSearchConfig?: any,
-   localizationMap?: { [key: string]: string }
- ) => {
+ const getSheetData = async (
+   fileUrl: string,
+   sheetName: string,
+   getRow = false,
+   createAndSearchConfig?: CreateAndSearchConfig,
+   localizationMap?: LocalizationMap
+ ): Promise<JsonData[]> => {
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 getSheetData = async (
  fileUrl: string,
  sheetName: string,
  getRow = false,
  createAndSearchConfig?: CreateAndSearchConfig,
  localizationMap?: LocalizationMap
): Promise<JsonData[]> => {
  // Retrieve workbook using the getTargetWorkbook function
  const localizedSheetName = getLocalizedName(sheetName, localizationMap);
  const workbook: any = await getExcelWorkbookFromFileURL(fileUrl, localizedSheetName);

  const worksheet: any = workbook.getWorksheet(localizedSheetName);


  // If parsing array configuration is provided, validate first row of each column
  validateFirstRowColumn(createAndSearchConfig, worksheet, localizationMap);

  const sheetData = worksheet.getSheetValues({ includeEmpty: true });
  const jsonData = getJsonData(sheetData, getRow);
  return jsonData;
}
Tools
Biome

[error] 99-99: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 104-104: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 106-106: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


39-62: This function has a high cognitive complexity and uses any type extensively, which could be improved for better maintainability and type safety.

Consider breaking down this function into smaller functions to handle specific parts of the logic, and replace any with more specific types.

- function getJsonData(sheetData: any, getRow = false, getSheetName = false, sheetName = "sheet1") {
+ function getJsonData(sheetData: SheetData[], getRow = false, getSheetName = false, sheetName = "sheet1"): JsonData[] {

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 39-39: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 40-40: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 44-44: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


[error] 39-39: Excessive complexity detected. (lint/complexity/noExcessiveCognitiveComplexity)

Please refactor this function to reduce its complexity score from 27 to the max allowed complexity 15.

frontend/micro-ui/web/micro-ui-internals/example/src/complaintConfig.js

22-23: Consider relaxing the validation constraints for the 'Apartment' field to accommodate a broader range of input values.

-            minLength: 6,
-            maxLength: 7,
+            minLength: 3,
+            maxLength: 50,
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.

            minLength: 3,
            maxLength: 50,
frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss

119-119: Avoid using !important in CSS as it makes styles hard to override and maintain. Consider using more specific class names or CSS specificity.

Also applies to: 155-155


304-308: Ensure error styles are consistent and managed through a central theme or style guide.

- color: #d4351c;
+ color: var(--error-color);
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.

    color: var(--error-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;

281-296: Use consistent color variables from a central theme to ensure maintainability and prevent hard-coded values.

- background-color: #d4351c !important;
+ background-color: var(--error-color) !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-infobanner-wrap.error {
    margin-left: 0;
    margin-bottom: 1.5rem;
    min-width: 100%;
    .digit-button-primary {
      height: 1.5rem;
      background-color: var(--error-color) !important;
      .icon-label-container.primary.large {
        font-size: 14px;
        .digit-button-label {
          font-size: 14px;
          color: #ffffff;
        }
      }
    }
  }
frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useParallelSearch.js

7-7: Use const instead of let for missingCodes as it is not reassigned.

- let missingCodes = [];
+ const missingCodes = [];
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 missingCodes = [];
Tools
Biome

[error] 7-7: This let declares a variable that is only assigned once. (lint/style/useConst)

'missingCodes' is never reassigned.

Safe fix: Use const instead.


82-82: Avoid unsafe optional chaining to prevent potential TypeError.

- const setcacheData = { ...cacheData, [targetedData]: cacheData?.targetedData ? [...cacheData?.targetedData, ...newData] : [...newData] };
+ const setcacheData = { ...cacheData, [targetedData]: cacheData[targetedData] ? [...cacheData[targetedData], ...newData] : [...newData] };
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 setcacheData = { ...cacheData, [targetedData]: cacheData[targetedData] ? [...cacheData[targetedData], ...newData] : [...newData] };
Tools
Biome

[error] 82-82: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


54-54: Unsafe usage of optional chaining could lead to TypeError if evaluation short-circuits with undefined.

- const setcacheData = { ...cacheData, [targetedData]: cacheData?.[targetedData] ? [...cacheData?.[targetedData], ...newData] : [...newData] };
+ const setcacheData = { ...cacheData, [targetedData]: cacheData[targetedData] ? [...cacheData[targetedData], ...newData] : [...newData] };
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 setcacheData = { ...cacheData, [targetedData]: cacheData[targetedData] ? [...cacheData[targetedData], ...newData] : [...newData] };
Tools
Biome

[error] 54-54: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:


2-2: Consider using const for cacheData since it's not reassigned.

- let cacheData = window.Digit.SessionStorage.get("HCM_CAMPAIGN_BOUNDARY_DATA") ? window.Digit.SessionStorage.get("HCM_CAMPAIGN_BOUNDARY_DATA") : {};
+ const cacheData = window.Digit.SessionStorage.get("HCM_CAMPAIGN_BOUNDARY_DATA") ? window.Digit.SessionCache.get("HCM_CAMPAIGN_BOUNDARY_DATA") : {};

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 2-2: This let declares a variable that is only assigned once. (lint/style/useConst)

'cacheData' is never reassigned.

Safe fix: Use const instead.


57-85: The else clauses can be omitted as previous branches break early, simplifying the control flow.

- } else if (
+ if (
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 (cacheData?.[targetedData]?.length > parentArray?.length && checkParentCodePresence(cacheData?.[targetedData], parentArray)) {
    removeData = removeMissingParentCodes(cacheData?.[targetedData], parentArray);
    const setcacheData = { ...cacheData, [targetedData]: [...removeData] };
    // window.Digit.SessionStorage.set("HCM_CAMPAIGN_BOUNDARY_DATA", setcacheData);
    return setcacheData?.[targetedData];
  } if (
    parentArray?.length === cacheData?.[targetedData]?.length &&
    !checkremoveMissingParentCodes(cacheData?.[targetedData], parentArray)?.length &&
    findMissingCodes(parentArray, cacheData?.[targetedData])?.length === 0
  ) {
    return cacheData?.[targetedData];
  } else {
    const requests = parentArray.map((parentCode) => {
      return Digit.CustomService.getResponse({
        url: "/boundary-service/boundary-relationships/_search",
        params: {
          tenantId: tenantId,
          hierarchyType: hierarchy,
          boundaryType: boundaryType,
          parent: parentCode,
        },
        body: {},
      }).then((boundaryTypeData) => ({ parentCode, boundaryTypeData }));
    });
    const newData = await Promise.all(requests);
    const setcacheData = { ...cacheData, [targetedData]: cacheData?.targetedData ? [...cacheData?.targetedData, ...newData] : [...newData] };
    window.Digit.SessionStorage.set("HCM_CAMPAIGN_BOUNDARY_DATA", setcacheData);
    return setcacheData?.[targetedData];
  }
Tools
Biome

[error] 57-85: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 62-85: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)


[error] 68-85: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)


[error] 82-82: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDocumentsPreview.js

75-83: Each element in a list should have a unique 'key' prop. Add a key to the InfoCard component to prevent potential issues with component state and re-rendering.

- <InfoCard
+ <InfoCard key={`error-${index}`}
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.

              <InfoCard
                key={`error-${index}`}
                populators={{
                  name: "infocard",
                }}
                variant="error"
                text={t(i?.error ? i?.error : i?.message)}
                hasAdditionalElements={true}
                // additionalElements={[<Button label={i?.button} onClick={i.onClick} />]}
              />
Tools
Biome

[error] 75-83: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

frontend/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss

80-108: > [!TIP]

Codebase Verification

The search results indicate that the new CSS classes are only found within the CSS files and not in any HTML or React components. This suggests that these classes might not be used in the corresponding components.

  • Ensure that the new CSS classes introduced are consistent with the existing naming conventions.
  • Verify that these classes are used appropriately in the corresponding HTML or React components.
Analysis chain

Ensure that the new CSS classes introduced are consistent with the existing naming conventions and are used appropriately in the corresponding HTML or React components.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the new CSS classes are used in the corresponding HTML or React components.

# Test: Search for the new CSS classes in the HTML or React components.
rg --type css $'\.infoClass' -g '*.jsx'
rg --type css $'\.headerWrapperClassName' -g '*.jsx'
rg --type css $'\.popup-close-svg' -g '*.jsx'
rg --type css $'\.whoLogo' -g '*.jsx'
rg --type css $'\.digit-popup-wrapper' -g '*.jsx'

Length of output: 976



Script:

#!/bin/bash
# Description: Verify that the new CSS classes are used in the corresponding HTML or React components.

# Test: Search for the new CSS classes in the HTML or React components.
rg '\.infoClass' -g '*.jsx' -g '*.js'
rg '\.headerWrapperClassName' -g '*.jsx' -g '*.js'
rg '\.popup-close-svg' -g '*.jsx' -g '*.js'
rg '\.whoLogo' -g '*.jsx' -g '*.js'
rg '\.digit-popup-wrapper' -g '*.jsx' -g '*.js'

Length of output: 226



Script:

#!/bin/bash
# Description: Verify that the new CSS classes are used in the corresponding HTML or React components.

# Test: Search for the new CSS classes in the entire codebase.
rg '\.infoClass'
rg '\.headerWrapperClassName'
rg '\.popup-close-svg'
rg '\.whoLogo'
rg '\.digit-popup-wrapper'

Length of output: 780

health-services/project-factory/src/server/api/campaignApis.ts

324-324: The function matchUserValidation seems to perform multiple responsibilities. Consider applying the Single Responsibility Principle for clearer, more maintainable code.

Split this function into smaller functions, each handling a specific part of the user validation process.


14-14: Consider adding a unit test for the getExcelWorkbookFromFileURL function.

Would you like me to help by creating a unit test for this function or should I open an issue to track this?


299-299: The function getUserWithMobileNumbers could benefit from breaking down into smaller sub-functions to improve readability and maintainability.

Consider refactoring to separate the logic for creating batches and processing them.


634-646: The function enrichDataToCreateForUser uses a reduce operation that could be simplified or documented for better readability.

Consider adding a comment explaining the purpose of the reduce operation or refactoring for clarity.


658-686: The function handleUserProcess is complex and handles multiple conditions and side effects. Refactoring into smaller, purpose-specific functions could enhance testability and readability.

Consider breaking down this function to isolate the conditional logic and network request handling into separate functions.


702-702: The function performAndSaveResourceActivity is highly complex and could benefit from decomposition into smaller, more manageable functions.

Consider breaking this function into smaller parts, each handling a specific aspect of the resource activity process.


748-776: Error handling in handleResouceDetailsError could be improved by centralizing and abstracting common logic.

Consider creating a utility function to handle the conversion of errors to a standardized format, which can be reused across different parts of the application.


802-802: The function processAfterValidation is handling too many responsibilities. Splitting it into smaller functions would improve maintainability.

Refactor to separate the data conversion, validation, and persistence logic into distinct functions.


688-699: The function enrichAlreadyExsistingUser contains a typo in its name and can be optimized by using a map instead of a loop for checking conditions.

- async function enrichAlreadyExsistingUser(request: any) {
+ async function enrichAlreadyExistingUser(request: any) {
   if (request.body.ResourceDetails.type == "user" && request?.body?.mobileNumberUuidsMapping) {
-    for (const employee of request.body.dataToCreate) {
-      if (request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber]) {
+    request.body.dataToCreate.forEach(employee => {
+      const mapping = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber];
+      if (mapping) {
         employee.uuid = mapping.userUuid;
         employee.code = mapping.code;
         employee.user.userName = mapping.code;
         employee.user.password = config.user.userDefaultPassword;
       }
-    }
+    });
   }
 }
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.

async function enrichAlreadyExistingUser(request: any) {
  if (request.body.ResourceDetails.type == "user" && request?.body?.mobileNumberUuidsMapping) {
    request.body.dataToCreate.forEach(employee => {
      const mapping = request?.body?.mobileNumberUuidsMapping[employee?.user?.mobileNumber];
      if (mapping) {
        employee.uuid = mapping.userUuid;
        employee.code = mapping.code;
        employee.user.userName = mapping.code;
        employee.user.password = config.user.userDefaultPassword;
      }
    });
  }
}

246-268: Error handling in getUuidsError can be improved by centralizing error logging and response management.

- logger.info(`User with mobileNumber ${user?.mobileNumber} doesn't have userUuid`)
- errors.push({ status: "INVALID", rowNumber: mobileNumberRowNumberMapping[user?.mobileNumber], errorDetails: `User with mobileNumber ${user?.mobileNumber} doesn't have userUuid` })
+ handleError(user, 'userUuid', mobileNumberRowNumberMapping);

Consider adding a helper function handleError to simplify error management.

Committable suggestion was skipped due to low confidence.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js

54-54: > [!TIP]

Codebase Verification

The search for the localization key HCM_CAMPAIGN_NAME_EXAMPLE across all file types only found its usage in the CampaignName.js file and did not find any definition or localization for it.

  • Please ensure that the localization key HCM_CAMPAIGN_NAME_EXAMPLE is defined in the appropriate translation files.
Analysis chain

Ensure that the placeholder text is appropriately localized and reflects the intended use of the campaign name field.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the localization of the placeholder text.

# Test: Search for the localization key in the translation files.
rg --type json $'HCM_CAMPAIGN_NAME_EXAMPLE' -g '*.json'

Length of output: 54



Script:

#!/bin/bash
# Description: Verify the localization of the placeholder text.

# Test: Search for the localization key in all file types.
rg 'HCM_CAMPAIGN_NAME_EXAMPLE'

Length of output: 191

health-services/project-factory/src/server/service/dataManageService.ts

49-49: Avoid using any type to ensure type safety and better code maintainability.

- const boundarySheetData: any = await getBoundarySheetData(request, localizationMap);
+ const boundarySheetData: BoundarySheetData = await getBoundarySheetData(request, localizationMap);
- const BoundaryFileDetails: any = await createAndUploadFile(workbook, request);
+ const BoundaryFileDetails: BoundaryFileDetails = await createAndUploadFile(workbook, request);
- catch (e: any) {
+ catch (e: Error) {

Also applies to: 54-54, 58-58, 66-66, 82-82

Tools
Biome

[error] 49-49: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.


33-33: Use template literals for better readability and performance.

- logger.error("No data of type  " + type + " with status Completed or with given id presnt in db ")
+ logger.error(`No data of type ${type} with status Completed or with given id present in db`)
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.

        logger.error(`No data of type ${type} with status Completed or with given id present in db`)
Tools
Biome

[error] 33-33: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


44-44: Unsafe usage of optional chaining could lead to TypeError if evaluation short-circuits with undefined.

- const { hierarchyType } = request?.query;
+ const { hierarchyType } = request.query;

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 44-44: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/baseTimeOut.js

1-5: Consider renaming the baseTimeOut property inside the object to avoid naming confusion with the exported constant.

  export const baseTimeOut = 
      {
-       baseTimeOut: 100,
+       initialTimeOut: 100,
        maxTime: 5000
      };
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.

export const baseTimeOut = 
    {
      initialTimeOut: 100,
      maxTime: 5000
    };
.github/workflows/buildWorkbenchUI.yml

36-36: Consider updating the echo statement to correctly reflect the checked directory.

- echo "This modified file is under the 'digit_ui' folder."
+ echo "This modified file is under the 'micro-ui' folder."
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.

              echo "This modified file is under the 'micro-ui' folder."
health-services/project-factory/migration/migrate.sh

3-3: Ensure to double-quote shell variables to prevent globbing and word splitting.

- flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true migrate
+ flyway -url="$DB_URL" -table="$SCHEMA_TABLE" -user="$FLYWAY_USER" -password="$FLYWAY_PASSWORD" -locations="$FLYWAY_LOCATIONS" -baselineOnMigrate=true -outOfOrder=true migrate
Tools
Shellcheck

[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)


[info] 3-3: Double quote to prevent globbing and word splitting. (SC2086)

health-services/project-factory/src/server/kafka/Listener.ts

38-38: Avoid using any type to improve type safety. Specify concrete types for better code maintainability.

- const messageObject: any = JSON.parse(message.value?.toString() || '{}');
+ const messageObject: MessageObject = JSON.parse(message.value?.toString() || '{}');
- catch (error: any) {
+ catch (error: Error) {
- async function produceModifiedMessages(modifiedMessages: any[], topic: any) {
+ async function produceModifiedMessages(modifiedMessages: ModifiedMessage[], topic: string) {

Also applies to: 44-44, 75-75, 75-75

Tools
Biome

[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js

51-51: Simplify the ternary operation for clarity.

- active: activeCycle == tabIndex + 1 ? true : tabIndex === 0 ? true : false,
+ active: activeCycle === tabIndex + 1 || tabIndex === 0,
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        active: activeCycle === tabIndex + 1 || tabIndex === 0,
Tools
Biome

[error] 51-51: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 51-51: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


Replace == with === to ensure strict equality check.

- active: activeCycle == tabIndex + 1 ? true : tabIndex === 0 ? true : false,
+ active: activeCycle === tabIndex + 1 ? true : tabIndex === 0 ? true : false,
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        active: activeCycle === tabIndex + 1 ? true : tabIndex === 0 ? true : false,
Tools
Biome

[error] 51-51: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 51-51: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


154-159: Use strict equality checks and simplify the conditional logic.

- active: activeCycle ? (activeCycle == n + 1 ? true : false) : n === 0 ? true : false,
+ active: activeCycle ? (activeCycle === n + 1) : n === 0,
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      return saved.map((i, n) => {
        return {
          ...i,
          active: activeCycle ? (activeCycle === n + 1) : n === 0,
        };
      });
Tools
Biome

[error] 157-157: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with


[error] 157-157: Use === instead of ==.
== is only allowed when comparing against null (lint/suspicious/noDoubleEquals)

== is only allowed when comparing against null

Using == may be unsafe if you are relying on type coercion
Unsafe fix: Use ===


[error] 157-157: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with

frontend/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js

79-106: This complex sorting logic could be simplified or documented for better maintainability.

// Consider abstracting this sorting logic into a separate function or utility.

47-47: Use optional chaining to safely access deeply nested properties.

- const lowestChild = hierarchyTypeDataresult?.boundaryHierarchy.filter((item) => item.parentBoundaryType === lowestBoundary)?.[0]?.boundaryType;
+ const lowestChild = hierarchyTypeDataresult?.boundaryHierarchy?.find((item) => item.parentBoundaryType === lowestBoundary)?.boundaryType;
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 lowestChild = hierarchyTypeDataresult?.boundaryHierarchy?.find((item) => item.parentBoundaryType === lowestBoundary)?.boundaryType;

23-23: Initialize targetedData with a default state if applicable.

- const [targetedData, setTargetedData] = useState();
+ const [targetedData, setTargetedData] = useState(defaultValue); // Replace defaultValue with actual default

Committable suggestion was skipped due to low confidence.


403-403: JSX elements without children should be self-closing.

- {loaderEnabled && <LoaderWithGap text={"CAMPAIGN_BOUNDARY_PLEASE_WAIT"}></LoaderWithGap>}
+ {loaderEnabled && <LoaderWithGap text={"CAMPAIGN_BOUNDARY_PLEASE_WAIT"} />}
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.

      {loaderEnabled && <LoaderWithGap text={"CAMPAIGN_BOUNDARY_PLEASE_WAIT"} />}
Tools
Biome

[error] 403-403: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


494-527: The PopUp component should use JSX children directly instead of through props.

- <PopUp
-   className={"boundaries-pop-module"}
-   type={"default"}
-   heading={t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_HEADER")}
-   children={[
-     <div>
-       <CardText style={{ margin: 0 }}>{t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_TEXT") + " "}</CardText>
-     </div>,
-   ]}
-   onOverlayClick={() => {
-     setShowPopUp(false);
-   }}
-   footerChildren={[
-     <Button
-       type={"button"}
-       size={"large"}
-       variation={"secondary"}
-       label={t("ES_CAMPAIGN_BOUNDARY_MODAL_BACK")}
-       onClick={() => {
-         checkDataPresent({ action: false });
-       }}
-     />,
-     <Button
-       type={"button"}
-       size={"large"}
-       variation={"primary"}
-       label={t("ES_CAMPAIGN_BOUNDARY_MODAL_SUBMIT")}
-       onClick={() => {
-         checkDataPresent({ action: true });
-       }}
-     />,
-   ]}
-   sortFooterChildren={true}
- ></PopUp>
+ <PopUp
+   className={"boundaries-pop-module"}
+   type={"default"}
+   heading={t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_HEADER")}
+   onOverlayClick={() => {
+     setShowPopUp(false);
+   }}
+   sortFooterChildren={true}
+ >
+   <div>
+     <CardText style={{ margin: 0 }}>{t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_TEXT") + " "}</CardText>
+   </div>
+   <Button
+     type={"button"}
+     size={"large"}
+     variation={"secondary"}
+     label={t("ES_CAMPAIGN_BOUNDARY_MODAL_BACK")}
+     onClick={() => {
+       checkDataPresent({ action: false });
+     }}
+   />
+   <Button
+     type={"button"}
+     size={"large"}
+     variation={"primary"}
+     label={t("ES_CAMAIGN_BOUNDARY_MODAL_SUBMIT")}
+     onClick={() => {
+       checkDataPresent({ action: true });
+     }}
+   />
+ </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={"boundaries-pop-module"}
          type={"default"}
          heading={t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_HEADER")}
          onOverlayClick={() => {
            setShowPopUp(false);
          }}
          sortFooterChildren={true}
        >
          <div>
            <CardText style={{ margin: 0 }}>{t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_TEXT") + " "}</CardText>
          </div>
          <Button
            type={"button"}
            size={"large"}
            variation={"secondary"}
            label={t("ES_CAMPAIGN_BOUNDARY_MODAL_BACK")}
            onClick={() => {
              checkDataPresent({ action: false });
            }}
          />
          <Button
            type={"button"}
            size={"large"}
            variation={"primary"}
            label={t("ES_CAMPAIGN_BOUNDARY_MODAL_SUBMIT")}
            onClick={() => {
              checkDataPresent({ action: true });
            }}
          />
        </PopUp>
Tools
Biome

[error] 494-527: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead


[error] 500-500: Template literals are preferred over string concatenation. (lint/style/useTemplate)

Unsafe fix: Use a template literal.


[error] 498-498: Avoid passing children using a prop (lint/correctness/noChildrenProp)

The canonical way to pass children in React is to use JSX elements


[error] 499-499: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


[error] 507-515: Missing key property for this element in iterable. (lint/correctness/useJsxKeyInIterable)

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.


208-236: The commented code should be removed if it is no longer needed.

- // for (const parentCode of parentArray) {
- //   const reqCriteriaBoundaryTypeSearch = Digit.CustomService.getResponse({
- //     url: "/boundary-service/boundary-relationships/_search",
- //     params: {
- //       tenantId: tenantId,
- //       hierarchyType: hierarchy,
- //       boundaryType: boundaryType,
- //       parent: parentCode,
- //     },
- //     body: {},
- //   });
- //   // setShowToast({ key: "info", label: t("HCM_PLEASE_WAIT_LOADING_BOUNDARY") });
- //   setLoaderEnabled(true);
- //   const boundaryTypeData = await reqCriteriaBoundaryTypeSearch;
- //   newData.push({ parentCode, boundaryTypeData });
- // }
+ setLoaderEnabled(true);
+ const temp = await Digit.Hooks.campaign.useParallelSearch({
+   parentArray: parentArray,
+   tenantId: tenantId,
+   boundaryType: boundaryType,
+   hierarchy: hierarchy,
+   targetedData: targetedData,
+ });
+ const newDataArray = [...newData, ...temp];
+ setBoundaryTypeDataresult(newDataArray);
+ setTimeout(() => {
+   setLoaderEnabled(false);
+ }, 100);

Committable suggestion was skipped due to low confidence.

Walkthrough

The changes primarily involve adding and updating GitHub Actions workflows, refining multiple UI components and configurations within the micro-UI framework, introducing new CSS styles, updated dependencies, and adding new React components and classes for better state management and customization. The updates enhance the consistency, maintainability, and functionality across various components of the DIGIT UI application.

Changes

File(s) Change Summary
.github/.../buildWorkbenchUI.yml, .github/.../publishProjectFactory.yml Introduced new workflows for CI, Docker image building/pushing, trigger conditions based on modified paths.
frontend/.../README.md Renamed project to "DIGIT ui." Removed image reference.
frontend/.../example/package.json, frontend/.../internals/package.json Updated multiple @egovernments dependencies, added new hcmworkbench dependency, and revised versions for ajv.
frontend/.../public/index.html Updated links to new CSS versions and introduced new CSS file.
frontend/.../example/src/ComponentRegistry.js Added Registry class to manage component registrations.
frontend/.../example/src/complaintConfig.js Introduced config object for complaint submission flow.
frontend/.../example/src/components/SelectName.js Added a React component SelectName for form steps.
frontend/.../example/src/fsm.js Customized employee application fields and configuration.
frontend/.../example/src/pgr.js Added customizations for PGR system and complaint detail table rows generation.
frontend/.../example/src/setupProxy.js Configured proxy middleware for various API endpoints.
frontend/.../packages/css/... Added new styles and CSS classes for campaign and employee pages.
frontend/.../packages/css/tailwind.config.js Introduced new error-v2 color variable.
frontend/.../campaign-manager/... Updated @egovernments dependencies, added event parameters in onClick handlers, error handling in components, placeholders, and enhanced the UI logic for boundaries selection.

Poem

In lines of code so clear and bright,
New workflows rise to take their flight.
With DIGIT's UI, now streamlined and new,
Components fresh, and updates too.
So raise a toast to changes vast,
For digit's future, bold and fast!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

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

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kavi-egov kavi-egov merged commit 6caaf27 into master Jun 20, 2024
2 of 3 checks passed
kavi-egov added a commit that referenced this pull request Jun 27, 2024
* HLM Health-HRMS bug fix, user was set to null in hrms update as the t… (#761)

* HLM Health-HRMS bug fix, user was set to null in hrms update as the tenantid was not provided during internal search

* HLM updated hrms user type

* updated type from individual create

* Addressed code review comments

* Added code comments and fixme todo as per code review comments

* HLM updated flyway migration docker version

* Revert "HLM updated flyway migration docker version"

This reverts commit 1f1167e.

* Updated code comments on EmployeeService update method

* Update EmployeeService.java

* Updated code comments on EmployeeService, added changes for NPE handling

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>

* HLM-6185: Added null check for the project task resources list (#767)

* HLM-6185: Added null check for the project task resources list

* HLM-6185: updated transformer logic for project task with beneficiary task and status population

* microplan-ui (#782)

* microplan-ui

* adding HLM-6172 changes

* hiding unique identifier column

* Update build-config.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* adding digti frontend pr 934 changes

* Update build-config.yml

* removing pl tl and template files

* removed unnecessary code

* Delete frontend/microplan-ui/Jenkinsfile

* updating operation to match api changes

* updating operation to match api changes

* Update README.md

* Update README.md

* microplan-ui adding uploadguidelines and removing unnecessary files

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: SriPadma8997-egov <112681948+SriPadma8997-egov@users.noreply.github.com>

* Admin console Improved performance, sheets freezed, implemented caching, delivery type integarted (#790)

* 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)

* updated the folder structure

* Create CHANGELOG.md (#717)

* updated the versions

* Update .gitignore

* 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

* updated migration

* fixed

* updated migration

* Delete .vscode/launch.json

* Delete .vscode/settings.json

---------

Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-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: nitish-egov <137176807+nitish-egov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
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>

* Master flyway imageupdate (#794)

* flyway base image updated

* reverted product changes and removed duplicate attendance code (#768)

* flyway version update

* updated psql version for core services and facility

* flyway update

* HLM throwing custom exception when boundary service call throw an error (#775)

* HLM-6196: Search failing, updated GenericQueryBuilder.java, added changes to get all … (#769)

* HLM Health-HRMS bug fix, user was set to null in hrms update as the t… (#761)

* HLM Health-HRMS bug fix, user was set to null in hrms update as the tenantid was not provided during internal search

* HLM updated hrms user type

* updated type from individual create

* Addressed code review comments

* Added code comments and fixme todo as per code review comments

* HLM updated flyway migration docker version

* Revert "HLM updated flyway migration docker version"

This reverts commit 1f1167e.

* Updated code comments on EmployeeService update method

* Update EmployeeService.java

* Updated code comments on EmployeeService, added changes for NPE handling

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>

* HLM-6196: updated GenericQueryBuilder.java, added changes to get all the fields except Object class

* hlm-6196: update common library reference for dev testing"

* HLM-6196: updated health-service-common version to 1.0.17-SNAPSHOT and added default for included deleted

* HLM-6196: updated genericrepository

* HLM-6196: fixed testcases

* HLM-6196: fixed individual search query error

* taskresource additional fields column added

* HLM-6196: updated health services models TaskResource, added AdditionalField

* HLM-6196: hfreferral, referral, sideeffect - edge case fix

* HLM-6196: removed todo from urlparams

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>
Co-authored-by: Vishal <sarasani.vishalreddy@egovernments.org>

* Hlm 6196 hrms employee search by names fix (#785)

* HLM-6196: updated @component in validators for client reference id validation

* HLM-6196: fixed testcases for stock and individual

* HLM-6196: added missing migration file

* HLM-6196: updated IndividualSearch model, added exclude annotation on individual name

* HLM-6196: rectifying egov-hrms individual search object commit

* HLM-6196: updated health services common for model exclude field fix

* Revert "HLM-6196: updated @component in validators for client reference id validation"

This reverts commit 6e915a0.

* Revert "HLM-6196: fixed testcases for stock and individual"

This reverts commit ce90104.

* HLM-6196: added comments as per code review

* Update IndividualSearch.java

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>

* HLM-6196: updated @component in validators for client reference id va… (#781)

* HLM-6196: updated @component in validators for client reference id validation

* HLM-6196: fixed testcases for stock and individual

* HLM-6196: added missing migration file

* HLM-6196: updated IndividualSearch model, added exclude annotation on individual name

* HLM-6196: rectifying egov-hrms individual search object commit

* HLM-6196: updated health services common for model exclude field fix

* Revert "HLM-6196: updated @component in validators for client reference id validation"

This reverts commit 6e915a0.

* Revert "HLM-6196: fixed testcases for stock and individual"

This reverts commit ce90104.

* Revert "Revert "HLM-6196: updated @component in validators for client reference id validation""

This reverts commit 2218ad3.

* Revert "Revert "HLM-6196: fixed testcases for stock and individual""

This reverts commit 083c516.

* HLM-6196: replaced RuntimeException with CustomException

* HLM-6196: updated to get only message from exception

* HLM-6196: updated individual search as it was with exclude annotation

* Update core-services/egov-hrms/src/main/java/org/egov/hrms/web/validator/EmployeeValidator.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* updated changelog for HCM v1.4 release

* updated changelog for HCM v1.4 release

* Update health-services/product/CHANGELOG.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/TaskResource.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* HLM added error stack strace whenever custom exception is thrown while validation duplicate entry

---------

Co-authored-by: kavi_elrey <25226238+kavi-egov@users.noreply.github.com>
Co-authored-by: Vishal <sarasani.vishalreddy@egovernments.org>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding plan-service folder for master merge (#783)

* Adding plan-service folder for master merge

* code review comment.

---------

Co-authored-by: devdatta-egov <nilesh.s@egovernments.org>

* Microplan UI (#793)

* microplan-ui

* adding HLM-6172 changes

* hiding unique identifier column

* Update build-config.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* adding digti frontend pr 934 changes

* Update build-config.yml

* removing pl tl and template files

* removed unnecessary code

* Delete frontend/microplan-ui/Jenkinsfile

* updating operation to match api changes

* updating operation to match api changes

* Update README.md

* Update README.md

* microplan-ui adding uploadguidelines and removing unnecessary files

* adding microplan to micro-ui

* adding microplan folder in microui/web

* Update setupProxy.js

* review changes

* adding review changes

* review changes

* Update Mapping.js

* Update Upload.js

* Update geojsonValidations.js

* Update CreateMicroplan.js

* Update MicroplanPreview.js

* Update MicroplanPreview.js

* Update CreateMicroplan.js

* adding review comments, updage campaign service, removed hardcoded tenent and removed logout util

* removing microplan-ui folder

* Update index.js

* adding review changes, reducing functional complexcity

* updaing microplan css pkg version

* Update jsonToExcelBlob.js

* Update MicroplanCreatedScreen.js

* Update UICustomizations.js

* Update uploadUtils.js

* Update build-config.yml

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: SriPadma8997-egov <112681948+SriPadma8997-egov@users.noreply.github.com>

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>
Co-authored-by: siddhant-nawale-egov <162107530+siddhant-nawale-egov@users.noreply.github.com>
Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: SriPadma8997-egov <112681948+SriPadma8997-egov@users.noreply.github.com>
Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-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: nitish-egov <137176807+nitish-egov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
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>
Co-authored-by: Vishal <sarasani.vishalreddy@egovernments.org>
Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com>
Co-authored-by: devdatta-egov <nilesh.s@egovernments.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants