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

Hlm 6407 template #1154

Open
wants to merge 26 commits into
base: test-campaign-changes
Choose a base branch
from
Open

Conversation

Priyanka-eGov
Copy link
Contributor

No description provided.

nitish-egov and others added 12 commits July 24, 2024 13:35
…smc (#1137)

* some changes related to generate boundary template

* updated logic for making configurable target acc to delivery only for smc

* refactored code for including dynamic target columns for specific types according to configs array
* Action column fixes, date editable logic change

* added roles for dss

---------

Co-authored-by: nabeelmd-eGov <[email protected]>
* Update constants.ts

* Update processTrackUtils.ts
* Action column fixes, date editable logic change

* added roles for dss

* update dates fixes

---------

Co-authored-by: nabeelmd-eGov <[email protected]>
Copy link
Contributor

coderabbitai bot commented Jul 25, 2024

Warning

Rate limit exceeded

@Priyanka-eGov has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 2 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 7555191 and bc55bf3.

Walkthrough

Walkthrough

The recent changes enhance the application's configuration and functionality by simplifying schema calls and adding robust checks for Kafka broker availability. New properties and functions were introduced to streamline data handling and improve error management, particularly for message processing in the Kafka messaging system. Additionally, numerous utility functions were refined, ensuring more accurate validation and processing. Overall, these modifications aim to bolster the reliability and efficiency of data operations within the project.

Changes

Files Change Summary
.../campaignApis.ts Modified processCreate function to simplify schema handling for "facilityMicroplan" type.
.../config/index.ts Added KAFKA_TEST_TOPIC property for Kafka testing; adjusted formatting in configuration object.
.../kafka/Listener.ts Replaced KAFKA_PROCESS_CAMPAIGN_MAPPING_TOPIC with KAFKA_TEST_TOPIC in topicNames.
.../kafka/Producer.ts Introduced checkBrokerAvailability function for verifying Kafka broker connectivity before operations.
.../utils/generateUtils.ts Added checks in areBoundariesSame function to ensure valid input before comparison.
.../utils/genericUtils.ts Simplified parameters in createFacilitySheet, impacting schema retrieval for "microplan".
.../utils/targetUtils.ts Modified generateDynamicTargetHeaders to remove the first element based on project type conditions.
.../utils/excelUtils.ts Removed two empty row inserts from formatWorksheet for cleaner output.
.../utils/campaignMappingUtils.ts Updated processMapping function to enhance parameter naming and logging consistency.
.../validators/campaignValidators.ts Aligned delivery rules validation with project type using isDynamicTargetTemplateForProjectType.
.../service/dataManageService.ts Enhanced getBoundaryDataService with caching options using Redis to optimize data retrieval.
.../myCampaignConfig.js Added new configuration entries for campaign actions in myCampaignConfig.
.../SetupCampaign.js Introduced a new action bar with options for managing campaign states.
.../UploadData.js Commented out header validation checks, altering error handling during uploads.

Sequence Diagram(s)

sequenceDiagram
    participant Producer
    participant Broker
    Producer->>Broker: checkBrokerAvailability()
    alt Broker is available
        Broker-->>Producer: Confirm message received
        Producer->>Producer: Proceed with sending messages
    else Broker not available
        Broker-->>Producer: Error: broker not available
        Producer->>Producer: Handle error and shut down
    end
Loading

🐰 In fields of code where changes flow,
Rabbits leap and data grow!
Kafka sings with topics bright,
Schemas dance in data's light.
Boundaries checked, errors tamed,
In this land of code, we're all acclaimed!
🌟


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 Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7e1d3b9 and 232f6b2.

Files selected for processing (7)
  • utilities/project-factory/src/server/api/campaignApis.ts (1 hunks)
  • utilities/project-factory/src/server/config/index.ts (2 hunks)
  • utilities/project-factory/src/server/kafka/Listener.ts (1 hunks)
  • utilities/project-factory/src/server/kafka/Producer.ts (1 hunks)
  • utilities/project-factory/src/server/utils/generateUtils.ts (2 hunks)
  • utilities/project-factory/src/server/utils/genericUtils.ts (1 hunks)
  • utilities/project-factory/src/server/utils/targetUtils.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • utilities/project-factory/src/server/config/index.ts
Additional context used
Biome
utilities/project-factory/src/server/kafka/Producer.ts

[error] 26-26: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

Additional comments not posted (6)
utilities/project-factory/src/server/kafka/Producer.ts (1)

41-41: LGTM!

The integration of checkBrokerAvailability within the producer.on('ready', ...) event listener is appropriate.

utilities/project-factory/src/server/kafka/Listener.ts (1)

21-21: LGTM!

The addition of KAFKA_TEST_TOPIC to the topicNames array is appropriate.

utilities/project-factory/src/server/utils/generateUtils.ts (1)

17-17: LGTM!

The addition of the conditional check to validate the presence of existingBoundaries and currentBoundaries enhances the robustness of the function.

utilities/project-factory/src/server/utils/targetUtils.ts (1)

19-19: Verify the impact of removing the first element from headerColumnsAfterHierarchy.

The line headerColumnsAfterHierarchy.shift(); removes the first element from the array. Ensure this change does not unintentionally alter the expected headers, especially in downstream processing.

utilities/project-factory/src/server/api/campaignApis.ts (1)

875-875: Verify the impact of the modified parameters for callMdmsTypeSchema.

The change simplifies the parameters passed to callMdmsTypeSchema. Ensure this does not unintentionally alter the schema retrieval logic, particularly for the "facilityMicroplan" type.

utilities/project-factory/src/server/utils/genericUtils.ts (1)

471-471: Verify the impact of the modified parameters for callMdmsTypeSchema.

The change simplifies the parameters passed to callMdmsTypeSchema. Ensure this does not unintentionally alter the schema retrieval logic, particularly for the "microplan" source.


producer.send(payloads, (err, data) => {
if (err) {
if (err.message && err.message.toLowerCase().includes('broker not available')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use optional chaining for error message check.

To prevent potential undefined errors, use optional chaining when accessing the error message.

- if (err.message && err.message.toLowerCase().includes('broker not available')) {
+ if (err.message?.toLowerCase().includes('broker not available')) {
Committable suggestion

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

Suggested change
if (err.message && err.message.toLowerCase().includes('broker not available')) {
if (err.message?.toLowerCase().includes('broker not available')) {
Tools
Biome

[error] 26-26: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

ashish-egov and others added 12 commits July 25, 2024 15:09
* Update Listener.ts

* added new branch

* Update Listener.ts

* fixed mapping kafka error

* mapping kafka fixed

* fix kafka

* fix kafka

* Update publishProjectFactory.yml
)

* updated readmeconfig for sheet

* added cache for generating target template when only delivery conditions change

* added cache time in config

* refactored caching code in generate flow for boundary sheet

* refactored callGenerate function
* Update Listener.ts

* added new branch

* Update Listener.ts

* fixed mapping kafka error

* mapping kafka fixed

* fix kafka

* fix kafka

* Removing foreign key constraint

* Update publishProjectFactory.yml
* Action column fixes, date editable logic change

* added roles for dss

* update dates fixes

* HCMPRE-154 update dates bug fixes, Added toast for error

* code clean

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundaryWithDate.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding date bug

* date fix

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DateWithBoundary.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DateWithBoundary.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: nabeelmd-eGov <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Jagankumar <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 12

Outside diff range, codebase verification and nitpick comments (2)
utilities/project-factory/src/server/utils/genericUtils.ts (1)

Verify the function usage in the codebase.

The function processGenerate has been updated to include a new parameter enableCaching. Ensure that all calls to this function pass the correct number of arguments.

  • In utilities/project-factory/src/server/service/dataManageService.ts, the calls to processGenerate do not include the new enableCaching parameter:
    • Line 7: await processGenerate(request);

Please update these calls to match the new function signature.

Analysis chain

Line range hint 830-840:
Verify the function usage in the codebase.

The function processGenerate has been updated to include a new parameter enableCaching. Ensure that all calls to this function pass the correct number of arguments.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `processGenerate` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type typescript -A 5 $'processGenerate'

Length of output: 78


Script:

#!/bin/bash
# Description: Verify all function calls to `processGenerate` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type ts -A 5 $'processGenerate'

Length of output: 6840

utilities/project-factory/src/server/utils/campaignUtils.ts (1)

592-592: Ensure the existingCampaignDetails parameter is always passed.

The function now relies on the existingCampaignDetails parameter. Ensure that all calls to this function provide this parameter to avoid runtime errors.

  • File: utilities/project-factory/src/server/utils/campaignUtils.ts
  • Lines: 592, 595
Analysis chain

Ensure the existingCampaignDetails parameter is always passed.

The function now relies on the existingCampaignDetails parameter. Ensure that all calls to this function provide this parameter to avoid runtime errors.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `enrichAndPersistCampaignForUpdate` provide the `existingCampaignDetails` parameter.

# Test: Search for the function usage. Expect: Only occurrences with the new parameter.
rg --type typescript -A 5 $'enrichAndPersistCampaignForUpdate'

Length of output: 96


Script:

#!/bin/bash
# Description: Verify all function calls to `enrichAndPersistCampaignForUpdate` provide the `existingCampaignDetails` parameter.

# Test: Search for the function usage. Expect: Only occurrences with the new parameter.
rg --type ts -A 5 $'enrichAndPersistCampaignForUpdate'

Length of output: 2019

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 232f6b2 and 7555191.

Files ignored due to path filters (6)
  • micro-ui/web/micro-ui-internals/example/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/css/package.json is excluded by !**/*.json
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json is excluded by !**/*.json
  • micro-ui/web/package.json is excluded by !**/*.json
  • micro-ui/web/workbench/package.json is excluded by !**/*.json
Files selected for processing (29)
  • micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundaryWithDate.js (7 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js (2 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DSSCard.js (3 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DateWithBoundary.js (8 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineComponent.js (5 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (3 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/UICustomizations.js (4 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js (2 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js (4 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (7 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/UpdateDatesWithBoundaries.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (1 hunks)
  • micro-ui/web/public/index.html (1 hunks)
  • utilities/project-factory/migration/main/V20240725155100__remove_constraint_process_details.sql (1 hunks)
  • utilities/project-factory/src/server/api/genericApis.ts (2 hunks)
  • utilities/project-factory/src/server/config/constants.ts (1 hunks)
  • utilities/project-factory/src/server/config/index.ts (3 hunks)
  • utilities/project-factory/src/server/kafka/Listener.ts (5 hunks)
  • utilities/project-factory/src/server/service/dataManageService.ts (2 hunks)
  • utilities/project-factory/src/server/utils/campaignMappingUtils.ts (1 hunks)
  • utilities/project-factory/src/server/utils/campaignUtils.ts (3 hunks)
  • utilities/project-factory/src/server/utils/excelUtils.ts (1 hunks)
  • utilities/project-factory/src/server/utils/generateUtils.ts (3 hunks)
  • utilities/project-factory/src/server/utils/genericUtils.ts (9 hunks)
  • utilities/project-factory/src/server/utils/processTrackUtils.ts (2 hunks)
  • utilities/project-factory/src/server/utils/targetUtils.ts (5 hunks)
  • utilities/project-factory/src/server/validators/campaignValidators.ts (2 hunks)
Files skipped from review due to trivial changes (4)
  • micro-ui/web/micro-ui-internals/example/public/index.html
  • micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss
  • micro-ui/web/public/index.html
  • utilities/project-factory/migration/main/V20240725155100__remove_constraint_process_details.sql
Files skipped from review as they are similar to previous changes (3)
  • utilities/project-factory/src/server/config/index.ts
  • utilities/project-factory/src/server/kafka/Listener.ts
  • utilities/project-factory/src/server/utils/targetUtils.ts
Additional context used
Path-based instructions (12)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js (1)

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

Biome
utilities/project-factory/src/server/service/dataManageService.ts

[error] 46-46: Unsafe usage of optional chaining.

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

(lint/correctness/noUnsafeOptionalChaining)

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

[error] 41-41: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)

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

[error] 86-86: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 107-107: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 138-138: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 169-169: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)

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

[error] 93-93: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)


[error] 291-296: Missing key property for this element in iterable.

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

(lint/correctness/useJsxKeyInIterable)

Additional comments not posted (61)
utilities/project-factory/src/server/utils/generateUtils.ts (2)

17-17: Improvement in robustness.

The new conditional check ensures that both existingBoundaries and currentBoundaries are present before proceeding with the comparison, preventing potential errors or unexpected behavior.


Line range hint 65-79:
Conditional caching parameter added.

The addition of the enableCaching parameter to the callGenerate function allows for conditional caching based on the input, enhancing flexibility.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js (3)

67-67: Ensure action bar visibility for ongoing campaigns.

The URL construction for "CAMPAIGN_ONGOING" includes the actionBar parameter set to true, ensuring that the action bar is displayed when navigating to ongoing campaigns.


74-74: Ensure action bar visibility for upcoming campaigns.

The URL construction for "CAMPAIGN_UPCOMING" includes the actionBar parameter set to true, ensuring that the action bar is displayed when navigating to upcoming campaigns.


78-80: Ensure draft and boundary information visibility for draft campaigns.

The URL construction for "CAMPAIGN_DRAFTS" includes the draftBoundary and fetchBoundary parameters set to true, ensuring that the draft and boundary information is fetched and displayed when navigating to draft campaigns.

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

36-39: Enhance user input validation.

The validation check ensures that the formData object contains a non-empty dateWithBoundary property before proceeding, improving the robustness of the form submission logic.

utilities/project-factory/src/server/service/dataManageService.ts (5)

12-13: Import statements look good.

The new imports for Redis utilities and configuration are appropriate for the caching logic introduced later.


44-44: Function signature change is appropriate.

The addition of the enableCaching parameter allows for optional caching, enhancing the function's flexibility.


51-67: Caching logic is well-implemented.

The function appropriately checks for a cache key, retrieves cached data if available, and logs cache hits and misses.


80-82: Return statement and caching of response data are appropriate.

Caching the boundary file details in Redis when caching is enabled improves performance.


Line range hint 83-88:
Error handling is appropriate.

The error handling logs the error and rethrows it, ensuring that errors are logged for debugging purposes.

Tools
Biome

[error] 46-46: Unsafe usage of optional chaining.

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

(lint/correctness/noUnsafeOptionalChaining)

utilities/project-factory/src/server/config/constants.ts (1)

129-139: New exported constant is appropriate.

The new processTrackForUi constant provides a consolidated list of process tracks for the UI, enhancing functionality.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundaryWithDate.js (5)

5-5: Import statement looks good.

The import of DustbinIcon is necessary for the new delete functionality.


7-7: New props added correctly.

The new props canDelete and onDeleteCard are added correctly to support the delete functionality.


13-14: State initialization improvements are correct.

The default values for startDate and endDate now handle undefined values appropriately.


18-24: useEffect hook updates are correct.

The useEffect hook has been updated to handle undefined values for startDate and endDate properly.


68-75: JSX structure improvements are correct.

The new JSX structure includes conditional rendering for the delete icon, enhancing the user interface.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/TimelineComponent.js (4)

Line range hint 1-11: No changes to import statements.

No action needed for import statements.


40-40: New state variable baseTimeOut is correctly implemented.

The use of a custom hook to fetch baseTimeOut is appropriate and enhances the flexibility of the component.


94-108: Conditional refetching logic is correctly implemented.

The new useEffect hook improves the efficiency of the component by avoiding unnecessary refetching.


214-223: Button rendering improvements are correct.

The changes ensure consistent rendering of the Button for downloading user credentials, enhancing the user interface.

utilities/project-factory/src/server/utils/excelUtils.ts (2)

74-75: Commenting out lines is acceptable.

The commented-out lines alter the visual structure of the worksheet but do not affect the core logic of data processing.


Line range hint 76-101: Core logic remains intact.

The core logic of the formatWorksheet function remains unchanged and is intact.

utilities/project-factory/src/server/utils/processTrackUtils.ts (7)

5-5: Ensure the correct import of processTrackForUi.

The import statement for processTrackForUi is correct and necessary for the new functionality.


35-35: Efficiently create the uiSet.

The creation of uiSet using processTrackForUi is efficient and ensures quick membership checks.


41-41: New property showInUi added to the return object.

The showInUi property is correctly added to the return object and is determined by checking if the type exists in the uiSet.


Line range hint 54-54:
Ensure campaignId is provided.

The check for campaignId ensures that the function does not proceed without a valid campaign ID.


Line range hint 61-61:
Handle different track statuses.

The function correctly differentiates between error and non-error types, calling appropriate handlers.


Line range hint 78-78:
Filter process details based on status.

The function correctly filters inProgress, toBeCompleted, and failed statuses from the process details.


Line range hint 88-88:
Update or create new process details.

The function correctly updates or creates new process details based on the current status.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DSSCard.js (3)

62-66: Additional role checks for supervisors.

The additional role checks ensure that only authorized users can access the DSSCard component.


77-86: Conditional rendering based on role checks.

The conditional rendering ensures that the component is only rendered if the user has the necessary permissions.


221-221: Export DSSCard and NDSSCard.

The export statement correctly exports the DSSCard and NDSSCard components.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/DateWithBoundary.js (4)

112-115: Optimize lowestHierarchy computation.

The use of useMemo to compute lowestHierarchy optimizes performance by memoizing the result.


156-159: Auto-hide toast messages.

The useEffect hook for auto-hiding toast messages enhances the user experience by providing timely feedback.


225-227: Display feedback for boundary selection.

The showToast state provides immediate feedback to the user when attempting to delete a boundary without selection.


236-241: Handle boundary deletion.

The onDeleteBoundary function correctly dispatches the "DELETE_BOUNDARY" action to the reducer.

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

246-251: Simplified conditional rendering logic.

The changes simplify the conditional rendering logic for cardSecondaryAction. This improves readability and reduces complexity.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/myCampaignConfig.js (2)

254-259: Avoid potential duplication of configuration entries.

The new configuration entries are identical and added at two different locations. Ensure that this duplication is intentional and does not lead to any unintended side effects.


659-664: Avoid potential duplication of configuration entries.

The new configuration entries are identical and added at two different locations. Ensure that this duplication is intentional and does not lead to any unintended side effects.

utilities/project-factory/src/server/utils/campaignMappingUtils.ts (2)

418-434: Ensure consistent usage of the renamed parameter.

The function parameter has been renamed from messageObject to mappingObject. Ensure that all references to the old parameter name have been updated correctly.


429-434: Ensure campaign status and message production logic is correct.

The campaign status is set to inprogress and a message is produced. Verify that this logic aligns with the intended workflow.

micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/UICustomizations.js (4)

253-253: Initialize state variable timeLine correctly.

The state variable timeLine is initialized correctly using React.useState(false).


254-263: Ensure proper handling of onActionSelect function.

The onActionSelect function handles different actions based on the value.code. Ensure that the setTimeline function is correctly updating the state.


618-618: Initialize state variable timeLine correctly.

The state variable timeLine is initialized correctly using React.useState(false).


619-628: Ensure proper handling of onActionSelect function.

The onActionSelect function handles different actions based on the value.code. Ensure that the setTimeline function is correctly updating the state.

utilities/project-factory/src/server/api/genericApis.ts (1)

883-884: Ensure proper handling of asynchronous processing with processMapping.

The processMapping function is now handling the processing asynchronously. Ensure that the function is correctly processing the mappingObject.

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

540-541: Add a check for empty jsonData.

The new check for empty jsonData ensures that only non-empty data is processed further.

utilities/project-factory/src/server/utils/genericUtils.ts (3)

Line range hint 810-821:
Verify the function usage in the codebase.

The function updateAndPersistGenerateRequest has been updated to include a new parameter enableCaching. Ensure that all calls to this function pass the correct number of arguments.

Verification successful

Verification successful: The function updateAndPersistGenerateRequest is correctly called with the updated signature, including the new enableCaching parameter.

  • utilities/project-factory/src/server/utils/genericUtils.ts: The function call matches the new signature.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `updateAndPersistGenerateRequest` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type typescript -A 5 $'updateAndPersistGenerateRequest'

Length of output: 94


Script:

#!/bin/bash
# Description: Verify all function calls to `updateAndPersistGenerateRequest` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg 'updateAndPersistGenerateRequest'

Length of output: 462


Line range hint 364-377:
Verify the function usage in the codebase.

The function fullProcessFlowForNewEntry has been updated to include a new parameter enableCaching. Ensure that all calls to this function pass the correct number of arguments.

Verification successful

Verify the function usage in the codebase.

The function fullProcessFlowForNewEntry has been updated to include a new parameter enableCaching. The search results confirm that all calls to this function within the same file pass the correct number of arguments.

  • utilities/project-factory/src/server/utils/genericUtils.ts:
    • Line: await fullProcessFlowForNewEntry(newEntryResponse, generatedResource, request, enableCaching, filteredBoundary);
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `fullProcessFlowForNewEntry` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type typescript -A 5 $'fullProcessFlowForNewEntry'

Length of output: 89


Script:

#!/bin/bash
# Description: Verify all function calls to `fullProcessFlowForNewEntry` match the new signature.

# Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new signature.
rg 'fullProcessFlowForNewEntry' --glob '*.ts' -A 5

Length of output: 1927

Tools
Biome

[error] 366-366: Unsafe usage of optional chaining.

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

(lint/correctness/noUnsafeOptionalChaining)


788-790: Verify the function usage in the codebase.

The function processGenerateForNew has been updated to include a new parameter enableCaching. Ensure that all calls to this function pass the correct number of arguments.

Verification successful

Let's correct the file type and re-run the script to verify all calls to processGenerateForNew.


To ensure comprehensive verification, let's search for processGenerateForNew usage across the entire codebase.


All calls to processGenerateForNew match the new signature.

The function processGenerateForNew has been updated correctly, and all usages in the codebase reflect the new parameter enableCaching.

  • utilities/project-factory/src/server/utils/genericUtils.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `processGenerateForNew` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type typescript -A 5 $'processGenerateForNew'

Length of output: 84


Script:

#!/bin/bash
# Description: Verify all function calls to `processGenerateForNew` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type ts -A 5 $'processGenerateForNew'

Length of output: 1285


Script:

#!/bin/bash
# Description: Verify all function calls to `processGenerateForNew` match the new signature across the entire codebase.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg 'processGenerateForNew'

Length of output: 396

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

1-12: LGTM!

The new imports for Menu, ActionBar, and SubmitBar enhance the UI capabilities of the component.


260-260: LGTM!

The new state variable actionBar is correctly initialized based on URL search parameters.


269-269: LGTM!

The new state variable displayMenu is correctly initialized.


497-497: LGTM!

The logic for updating URL parameters has been refined for clarity.


1441-1442: LGTM!

The logic for handling campaign date validation has been improved for clarity.


1532-1546: LGTM!

The new function onActionSelect correctly handles actions selected from the new action bar.


1592-1597: LGTM!

The new action bar with Menu and SubmitBar components enhances the user experience by providing additional options.

utilities/project-factory/src/server/validators/campaignValidators.ts (2)

23-23: Import statement added correctly.

The import statement for isDynamicTargetTemplateForProjectType is correctly added and necessary for the new condition.


223-223: Improved condition for validating delivery rules.

The new condition using isDynamicTargetTemplateForProjectType improves clarity and maintainability by directly linking the validation to the project type.

utilities/project-factory/src/server/utils/campaignUtils.ts (1)

Line range hint 1453-1457:
Verify the correctness of the dynamic target template check.

The function now uses isDynamicTargetTemplateForProjectType to check if dynamic target templates are enabled. Ensure that this function correctly identifies the project types that support dynamic templates.

Verification successful

The dynamic target template check is correctly implemented.

The isDynamicTargetTemplateForProjectType function correctly identifies project types that support dynamic templates by checking against the enableDynamicTemplateFor configuration.

  • utilities/project-factory/src/server/utils/targetUtils.ts:
    function isDynamicTargetTemplateForProjectType(projectType: string) {
        const projectTypesFromConfig = config?.enableDynamicTemplateFor;
        return projectTypesFromConfig?.includes(projectType) ?? false;
    }
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of `isDynamicTargetTemplateForProjectType` function.

# Test: Search for the function implementation. Expect: Correct logic to identify project types.
rg --type typescript -A 5 $'isDynamicTargetTemplateForProjectType'

Length of output: 100


Script:

#!/bin/bash
# Description: Verify the correctness of `isDynamicTargetTemplateForProjectType` function.

# Test: Search for the function implementation. Expect: Correct logic to identify project types.
rg --type ts -A 5 $'isDynamicTargetTemplateForProjectType'

Length of output: 5266

Comment on lines +594 to +598
if (existingCampaignDetails) {
if (areBoundariesSame(existingCampaignDetails?.boundaries, request?.body?.CampaignDetails?.boundaries)) {
updateTargetColumnsIfDeliveryConditionsDifferForSMC(request);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Optimize boundary comparison and target column update logic.

The current logic checks if existingCampaignDetails is present and then compares boundaries. If the boundaries are the same, it updates target columns if delivery conditions differ. This can be optimized by combining the checks to reduce nested conditions.

if (existingCampaignDetails && areBoundariesSame(existingCampaignDetails?.boundaries, request?.body?.CampaignDetails?.boundaries)) {
    updateTargetColumnsIfDeliveryConditionsDifferForSMC(request);
}

Comment on lines +91 to +93
case "DELETE_BOUNDARY":
return state.filter((item) => item?.id !== action?.item?.id);
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unreachable code.

The break statement after the return statement is unreachable and should be removed.

-    break;
Committable suggestion

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

Suggested change
case "DELETE_BOUNDARY":
return state.filter((item) => item?.id !== action?.item?.id);
break;
case "DELETE_BOUNDARY":
return state.filter((item) => item?.id !== action?.item?.id);
Tools
Biome

[error] 93-93: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)

@@ -76,7 +83,7 @@ const BoundaryWithDate = ({ project, props, onSelect, dateReducerDispatch }) =>
withoutLabel={true}
type="date"
value={startDate}
nonEditable={today >= startDate ? true : false}
nonEditable={startDate?.length > 0 && today > startDate ? true : false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Simplify boolean literals in conditional expression.

Unnecessary use of boolean literals in the conditional expression.

- nonEditable={startDate?.length > 0 && today > startDate ? true : false}
+ nonEditable={startDate?.length > 0 && today > startDate}
Committable suggestion

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

Suggested change
nonEditable={startDate?.length > 0 && today > startDate ? true : false}
nonEditable={startDate?.length > 0 && today > startDate}
Tools
Biome

[error] 86-86: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)

@@ -131,7 +135,7 @@
<FieldV1
withoutLabel={true}
type="date"
nonEditable={today >= item?.startDate ? true : false}
nonEditable={item?.startDate?.length > 0 && today > item?.startDate ? true : false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Simplify boolean literals in conditional expression.

Unnecessary use of boolean literals in the conditional expression.

- nonEditable={item?.startDate?.length > 0 && today > item?.startDate ? true : false}
+ nonEditable={item?.startDate?.length > 0 && today > item?.startDate}
Committable suggestion

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

Suggested change
nonEditable={item?.startDate?.length > 0 && today > item?.startDate ? true : false}
nonEditable={item?.startDate?.length > 0 && today > item?.startDate}
Tools
Biome

[error] 138-138: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)

@@ -97,19 +104,16 @@
withoutLabel={true}
type="date"
value={endDate}
nonEditable={today >= endDate ? true : false}
nonEditable={endDate?.length > 0 && today > endDate ? true : false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Simplify boolean literals in conditional expression.

Unnecessary use of boolean literals in the conditional expression.

- nonEditable={endDate?.length > 0 && today > endDate ? true : false}
+ nonEditable={endDate?.length > 0 && today > endDate}
Committable suggestion

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

Suggested change
nonEditable={endDate?.length > 0 && today > endDate ? true : false}
nonEditable={endDate?.length > 0 && today > endDate}
Tools
Biome

[error] 107-107: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)

try {
const { hierarchyType, campaignId } = request?.query;
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix unsafe usage of optional chaining.

The usage of optional chaining here can lead to a TypeError if request.query is undefined.

- const { hierarchyType, campaignId } = request?.query;
+ const { hierarchyType, campaignId } = request.query || {};
Committable suggestion

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

Suggested change
const { hierarchyType, campaignId } = request?.query;
const { hierarchyType, campaignId } = request.query || {};
Tools
Biome

[error] 46-46: Unsafe usage of optional chaining.

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

(lint/correctness/noUnsafeOptionalChaining)

name: "timeline",
sections: [
{
? {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unused isPreview variable.

The isPreview variable is defined but not used in the component.

- const isPreview = searchParams.get("preview");

Committable suggestion was skipped due to low confidence.

Comment on lines +291 to +296
<BoundaryWithDate
project={item}
dateReducerDispatch={dateReducerDispatch}
canDelete={dateReducer?.length > 1}
onDeleteCard={() => onDeleteBoundary(item, index)}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add missing key property in iterable.

The BoundaryWithDate component instances in the iterable should have a unique key property.

-        dateReducer?.map((item, index) => (
+        dateReducer?.map((item, index) => (
+          <BoundaryWithDate
+            key={item.id}
+            project={item}
+            dateReducerDispatch={dateReducerDispatch}
+            canDelete={dateReducer?.length > 1}
+            onDeleteCard={() => onDeleteBoundary(item, 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.

Suggested change
<BoundaryWithDate
project={item}
dateReducerDispatch={dateReducerDispatch}
canDelete={dateReducer?.length > 1}
onDeleteCard={() => onDeleteBoundary(item, index)}
/>
<BoundaryWithDate
key={item.id}
project={item}
dateReducerDispatch={dateReducerDispatch}
canDelete={dateReducer?.length > 1}
onDeleteCard={() => onDeleteBoundary(item, index)}
/>
Tools
Biome

[error] 291-296: Missing key property for this element in iterable.

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

(lint/correctness/useJsxKeyInIterable)

Comment on lines +478 to +490

// for (const header of mdmsHeaders) {
// if (!expectedHeaders.includes(t(header))) {
// const errorMessage = t("HCM_BOUNDARY_INVALID_SHEET");
// setErrorsType((prevErrors) => ({
// ...prevErrors,
// [type]: errorMessage,
// }));
// setIsError(true);
// isValid = false;
// break;
// }
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Re-enable header validation checks.

The validation checks for headers have been commented out, which may introduce risks related to data integrity. Consider re-enabling these checks to ensure the headers are valid.

-    // for (const header of mdmsHeaders) {
-    //   if (!expectedHeaders.includes(t(header))) {
-    //     const errorMessage = t("HCM_BOUNDARY_INVALID_SHEET");
-    //     setErrorsType((prevErrors) => ({
-    //       ...prevErrors,
-    //       [type]: errorMessage,
-    //     }));
-    //     setIsError(true);
-    //     isValid = false;
-    //     break;
-    //   }
-    // }

Committable suggestion was skipped due to low confidence.

Comment on lines +38 to +42
{
path: pathVar === "update-dates-boundary" ? "" : `/${window?.contextPath}/employee/campaign/my-campaign`,
content: t("UPDATE_DATE_CHANGE"),
show: pathVar === "update-dates-boundary" ? true: false,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

New breadcrumb item is appropriate.

The new breadcrumb item for "UPDATE_DATE_CHANGE" enhances navigation by providing an additional context-specific link.

Simplify the ternary operator usage.

The ternary operator usage here is unnecessary and can be simplified.

- show: pathVar === "update-dates-boundary" ? true: false,
+ show: pathVar === "update-dates-boundary",
Committable suggestion

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

Suggested change
{
path: pathVar === "update-dates-boundary" ? "" : `/${window?.contextPath}/employee/campaign/my-campaign`,
content: t("UPDATE_DATE_CHANGE"),
show: pathVar === "update-dates-boundary" ? true: false,
},
{
path: pathVar === "update-dates-boundary" ? "" : `/${window?.contextPath}/employee/campaign/my-campaign`,
content: t("UPDATE_DATE_CHANGE"),
show: pathVar === "update-dates-boundary",
},
Tools
Biome

[error] 41-41: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)

…-template

# Conflicts:
#	utilities/project-factory/src/server/api/campaignApis.ts
#	utilities/project-factory/src/server/utils/campaignUtils.ts
#	utilities/project-factory/src/server/utils/genericUtils.ts
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.

6 participants