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

Feat : added target sum mapping #825

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Feat : added target sum mapping #825

merged 2 commits into from
Jun 10, 2024

Conversation

ashish-egov
Copy link
Contributor

No description provided.

Copy link
Contributor

coderabbitai bot commented Jun 10, 2024

Walkthrough

Walkthrough

A new function, getTargetSheetDataAfterCode, has been added to the genericApis.ts to enhance data retrieval and processing from target sheets by summing integer values based on a specified code column. This function is now utilized in campaignUtils.ts, replacing a previous function. Additionally, validation logic in campaignValidators.ts has been updated to include checks for an activeColumnName field, ensuring its presence and validity.

Changes

File Path Change Summary
.../src/server/api/genericApis.ts Added getTargetSheetDataAfterCode function to retrieve and sum data based on a code column.
.../src/server/utils/campaignUtils.ts Replaced function call with getTargetSheetDataAfterCode and passed an additional argument.
.../src/server/utils/genericUtils.ts Added createAndSearch import and hideUniqueIdentifierColumn function.
.../src/server/validators/campaignValidators.ts Updated validateViaSchema to include validation checks for the activeColumnName field.

Poem

In code's vast realm, a new function was spun,
To sum the integers, our task is done.
Validations now check if "Active" aligns,
With columns and rows, our data shines.
A rabbit's joy, in bytes and more,
We hop through changes, code we adore!
🐇✨


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.

@jagankumar-egov jagankumar-egov merged commit 7cb44e1 into campaign Jun 10, 2024
2 of 3 checks passed
@jagankumar-egov jagankumar-egov deleted the mappingBySum branch June 10, 2024 12:11
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

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

18-18: Consider using a more specific import statement.

Using a default import for createAndSearch might lead to confusion or errors if the module exports more than one entity. It's generally a good practice to use named imports when the module exports multiple entities, which can help avoid potential naming conflicts and improve code clarity.

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

Line range hint 67-69: Consider using optional chaining for safer code
The code could benefit from using optional chaining to prevent runtime errors due to undefined or null values. This would make the code more robust and easier to maintain.

- const localizedMainSheet = getLocalizedName(mainSheetName, localizationMap);
- if (!workbook.getWorksheet(localizedMainSheet)) {
+ const localizedMainSheet = getLocalizedName(mainSheetName, localizationMap);
+ if (!workbook?.getWorksheet(localizedMainSheet)) {

Line range hint 555-555: Use strict equality for reliable comparisons
Using != can lead to unexpected type coercion. Replace it with !== for a strict equality check to ensure more predictable and reliable comparisons.

- if (grandParentCode != null && grandParentCode != undefined) {
+ if (grandParentCode !== null && grandParentCode !== undefined) {

Line range hint 569-569: Remove unnecessary continue statement
The continue statement in this context is unnecessary as it is the last statement in the loop. Removing it will clean up the code and reduce confusion.

- continue;

Line range hint 641-659: Omit redundant else clauses
The else clauses here are unnecessary because the preceding if statements always end with a return or throw, making the else redundant. Removing these will simplify the code and improve readability.

- else {
-   // code
- }

Also applies to: 656-658


Line range hint 247-247: Use 'string' instead of 'String' for type annotations
In TypeScript, it's recommended to use lowercase 'string' instead of 'String' to refer to the primitive type rather than the constructor function. This is a best practice for type safety and consistency.

- idFormat: String,
+ idFormat: string,
- idFormat: String,
+ idFormat: string,

Also applies to: 288-288

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

Line range hint 115-115: Avoid assignments within expressions for clarity.

It's generally a good practice to avoid assignments within expressions as it can lead to code that is difficult to read and maintain. Consider refactoring this to separate the assignment and the expression.

Tools
Biome

[error] 337-337: 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] 337-337: 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] 344-344: 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 ===


Line range hint 117-117: Use strict equality checks.

Using == can lead to unexpected type coercion. Use === for comparisons to avoid this issue. Here's a suggested change:

- if (condition == "value")  // existing line
+ if (condition === "value") // suggested change

Also applies to: 118-118, 328-328, 344-344, 442-442, 490-490, 493-493, 532-532

Tools
Biome

[error] 337-337: 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] 337-337: 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] 344-344: 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 ===


Line range hint 215-215: Replace hasOwnProperty with Object.hasOwn.

Using Object.prototype.hasOwnProperty directly can lead to issues if the object's prototype chain has been modified. Use Object.hasOwn() instead, which is safer and recommended by modern JavaScript practices.

Also applies to: 406-406, 416-416, 431-431

Tools
Biome

[error] 337-337: 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] 337-337: 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] 344-344: 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 ===


Line range hint 293-293: Declare variables at the top of their scope.

For clarity and to avoid potential hoisting issues, declare all var variables at the top of their enclosing function scope.

Tools
Biome

[error] 337-337: 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] 337-337: 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] 344-344: 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 ===


Line range hint 295-295: Use strict inequality checks.

Using != can lead to unexpected type coercion. Use !== for comparisons to avoid this issue. Here's a suggested change:

- if (condition != "value")  // existing line
+ if (condition !== "value") // suggested change

Also applies to: 337-337, 485-485

Tools
Biome

[error] 337-337: 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] 337-337: 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] 344-344: 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 ===


Line range hint 393-393: Handle potential undefined values safely.

Using optional chaining (?.) can lead to undefined values that might not be handled, leading to runtime errors. Ensure that the code gracefully handles cases where the chained operation could evaluate to undefined.

Also applies to: 441-441

Tools
Biome

[error] 337-337: 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] 337-337: 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] 344-344: 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 ===

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1ba2098 and ff8826d.

Files selected for processing (4)
  • utilities/project-factory/src/server/api/genericApis.ts (2 hunks)
  • utilities/project-factory/src/server/utils/campaignUtils.ts (2 hunks)
  • utilities/project-factory/src/server/utils/genericUtils.ts (3 hunks)
  • utilities/project-factory/src/server/validators/campaignValidators.ts (1 hunks)
Additional context used
Biome
utilities/project-factory/src/server/utils/genericUtils.ts

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

Unsafe fix: Omit the else clause.


[error] 61-61: 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] 154-154: 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] 338-338: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


[error] 361-361: 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] 361-361: 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] 506-506: 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] 529-529: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


[error] 546-546: 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] 553-556: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 658-658: 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] 661-661: 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] 674-674: The comma operator is disallowed. (lint/style/noCommaOperator)

Its use is often confusing and obscures side effects.


[error] 727-727: 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] 750-750: 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] 757-757: 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] 758-758: 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] 760-760: 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] 760-760: 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] 776-776: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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

utilities/project-factory/src/server/api/genericApis.ts

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

Unsafe fix: Change to an optional chain.


[error] 555-555: 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] 569-569: Unnecessary continue statement (lint/correctness/noUnnecessaryContinue)

Unsafe fix: Delete the unnecessary continue statement


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

Unsafe fix: Omit the else clause.


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

Unsafe fix: Omit the else clause.


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

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


[error] 824-824: 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] 830-830: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


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

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


[error] 836-836: 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] 924-924: 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] 925-925: 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] 247-247: Don't use 'String' as a type. (lint/complexity/noBannedTypes)

Use lowercase primitives for consistency.
Safe fix: Use 'string' instead


[error] 288-288: Don't use 'String' as a type. (lint/complexity/noBannedTypes)

Use lowercase primitives for consistency.
Safe fix: Use 'string' instead

utilities/project-factory/src/server/validators/campaignValidators.ts

[error] 115-115: The assignment should not be in an expression. (lint/suspicious/noAssignInExpressions)

The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.


[error] 117-117: 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] 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 ===


[error] 215-215: 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] 293-293: 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] 295-295: 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] 328-328: 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] 337-337: 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] 337-337: 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] 344-344: 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] 393-393: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


[error] 406-406: 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] 416-416: 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] 431-431: 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] 441-441: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


[error] 442-442: 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] 485-485: 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] 490-490: 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] 493-493: 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] 532-532: 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 ===

utilities/project-factory/src/server/utils/campaignUtils.ts

[error] 399-399: 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] 435-435: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


[error] 442-442: 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] 452-452: 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] 482-482: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)

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


[error] 512-512: 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] 524-524: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


[error] 533-533: 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] 546-546: 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] 553-553: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


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

Unsafe fix: Use an undefined assignment instead.


[error] 571-571: 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] 585-585: 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] 591-591: Avoid the delete operator which can impact performance. (lint/performance/noDelete)

Unsafe fix: Use an undefined assignment instead.


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

Unsafe fix: Use an undefined assignment instead.


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

Unsafe fix: Use an undefined assignment instead.


[error] 608-611: 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] 625-625: 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] 645-645: 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] 649-649: 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 ===

Additional comments not posted (3)
utilities/project-factory/src/server/utils/genericUtils.ts (1)

592-592: Verify the usage of createAndSearch in the context of hiding columns.

This script will help confirm that the createAndSearch configuration is being used correctly and is properly defined in the context where it's being used.

Verification successful

The search results indicate that the createAndSearch configuration is used extensively across multiple files, including the file in question (genericUtils.ts). The specific usage of createAndSearch for hiding columns appears to be consistent with its usage in other parts of the codebase.

  • utilities/project-factory/src/server/utils/genericUtils.ts: hideUniqueIdentifierColumn(facilitySheet, createAndSearch?.["facility"]?.uniqueIdentifierColumn);

This line shows that the createAndSearch configuration is being used to hide the unique identifier column for the "facility" resource. This usage aligns with other instances where createAndSearch is used to access configuration details for various resources.

Given the extensive and consistent usage of createAndSearch across the codebase, it appears that the configuration is being used correctly in the context of hiding columns.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of `createAndSearch` configuration for hiding columns.

# Test: Search for the configuration usage. Expect: Proper configuration in the context where it's used.
rg --type typescript $'createAndSearch'

Length of output: 73



Script:

#!/bin/bash
# Description: Verify the usage of `createAndSearch` configuration for hiding columns.

# Test: Search for the configuration usage. Expect: Proper configuration in the context where it's used.
rg --type ts 'createAndSearch'

Length of output: 22592

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

7-7: Consider moving the variable declaration to the top of the function to improve readability and maintainability.

- import { getCampaignNumber, createAndUploadFile, getSheetData, createExcelSheet, getAutoGeneratedBoundaryCodesHandler, createBoundaryEntities, createBoundaryRelationship, getMDMSV1Data, callMdmsV2Data, getTargetSheetDataAfterCode } from "../api/genericApis";
+ var getCampaignNumber, createAndUploadFile, getSheetData, createExcelSheet, getAutoGeneratedBoundaryCodesHandler, createBoundaryEntities, createBoundaryRelationship, getMDMSV1Data, callMdmsV2Data, getTargetSheetDataAfterCode;
+ import { getCampaignNumber, createAndUploadFile, getSheetData, createExcelSheet, getAutoGeneratedBoundaryCodesHandler, createBoundaryEntities, createBoundaryRelationship, getMDMSV1Data, callMdmsV2Data, getTargetSheetDataAfterCode } from "../api/genericApis";

Likely invalid or redundant comment.


1235-1236: Replace == with === to avoid potential issues due to type coercion.

- if (boundaryResponse?.TenantBoundary?.[0]?.boundary?.[0]) {
+ if (boundaryResponse?.TenantBoundary?.[0]?.boundary?.[0] === undefined) {

Likely invalid or redundant comment.

Comment on lines +141 to +201
const getTargetSheetDataAfterCode = async (
fileUrl: string,
getRow = false,
getSheetName = false,
codeColumnName = "Boundary Code",
localizationMap?: any
) => {
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 });

// Find the target column index where the first row value matches codeColumnName
const firstRow = sheetData[1];
let targetColumnIndex = -1;
for (let colIndex = 1; colIndex < firstRow.length; colIndex++) {
if (firstRow[colIndex] === codeColumnName) {
targetColumnIndex = colIndex;
break;
}
}

if (targetColumnIndex === -1) {
console.warn(`Column "${codeColumnName}" not found in sheet "${sheetName}".`);
continue;
}

// Process data from sheet
const processedData = sheetData.map((row: any, rowIndex: any) => {
if (rowIndex === 0) return null; // Skip header row

let rowData = getJsonData([row], getRow, getSheetName, sheetName)[0];
if (!rowData) return null;

// Add integer values in the target column for the current row
let sum = 0;
for (let colIndex = targetColumnIndex + 1; colIndex < row.length; colIndex++) {
const value = row[colIndex];
if (typeof value === 'number' && Number.isInteger(value)) {
sum += value;
}
}

// Add the sum to the row data
rowData['Target at the Selected Boundary level'] = sum;
return rowData;
}).filter(Boolean); // Remove null entries

workbookData[sheetName] = processedData;
}

return workbookData;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Add comprehensive error handling in getTargetSheetDataAfterCode
The function getTargetSheetDataAfterCode lacks comprehensive error handling. While there is a console warning when a column is not found, it would be beneficial to handle potential errors that could arise from asynchronous operations such as file reading or data processing. Consider adding try-catch blocks around these operations to ensure that any exceptions are caught and handled gracefully.

Comment on lines +570 to +574
function hideUniqueIdentifierColumn(sheet: any, column: any) {
if (column) {
sheet.getColumn(column).hidden = true
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure that the hideUniqueIdentifierColumn function handles potential errors gracefully.

-  if (column) {
+  if (column && sheet.getColumn(column)) {
     sheet.getColumn(column).hidden = true
   }

This change ensures that the function checks whether the column exists before attempting to hide it, preventing runtime errors if the column is not present.

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
function hideUniqueIdentifierColumn(sheet: any, column: any) {
if (column) {
sheet.getColumn(column).hidden = true
}
}
function hideUniqueIdentifierColumn(sheet: any, column: any) {
if (column && sheet.getColumn(column)) {
sheet.getColumn(column).hidden = true
}
}

Comment on lines +1235 to +1236
const targetData = await getTargetSheetDataAfterCode(fileResponse?.fileStoreIds?.[0]?.url, true, true, codeColumnName);
const boundaryTargetMapping: any = {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using the delete operator for performance reasons. Consider setting the property to undefined instead.

- delete request.body.ExistingCampaignDetails;
+ request.body.ExistingCampaignDetails = undefined;

Committable suggestion was skipped due to low confidence.


Ensure proper error handling for potential undefined values when using optional chaining.

- const targetData = await getTargetSheetDataAfterCode(fileResponse?.fileStoreIds?.[0]?.url, true, true, codeColumnName);
+ if (!fileResponse?.fileStoreIds?.[0]?.url) {
+     throw new Error("URL is undefined");
+ }
+ const targetData = await getTargetSheetDataAfterCode(fileResponse.fileStoreIds[0].url, true, true, codeColumnName);
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 targetData = await getTargetSheetDataAfterCode(fileResponse?.fileStoreIds?.[0]?.url, true, true, codeColumnName);
const boundaryTargetMapping: any = {};
if (!fileResponse?.fileStoreIds?.[0]?.url) {
throw new Error("URL is undefined");
}
const targetData = await getTargetSheetDataAfterCode(fileResponse.fileStoreIds[0].url, true, true, codeColumnName);
const boundaryTargetMapping: any = {};

jagankumar-egov added a commit that referenced this pull request Jun 26, 2024
* Updates the delivery rules logic for gender

* * info message for status creating (#644)

* success message if user cred sheet
* send id with key resourceid
* Send variant in sku also

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

* Feat : added boundary validation (#643)

Co-authored-by: Jagankumar <[email protected]>

* Update campaignValidators.ts (#645)

* added delay in download (#646)

* Update campaignValidators.ts (#647)

* fixes (#649)

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

* fixed header validation (#648)

* change in filter recursive (#650)

* Update genericUtils.ts (#652)

* fix (#651)

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

* updated lowest level hierarchy validation for target HLM -5948 (#654)

* Update campaignValidators.ts (#655)

* fixes-> cyclenumber issue, hover issue, dropdown height issue,

* css

* fixes-> cyclenumber issue, hover issue, dropdown height issue, (#656)

* fixes-> cyclenumber issue, hover issue, dropdown height issue,

* css

---------

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

* 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 <[email protected]>

* 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 <[email protected]>

* Fixed HLM-5988_warning message (#689)

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

* download filename fixes (#693)

* download button fixes in summary

* download filename with custom name changes added

---------

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

* 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 <[email protected]>

* 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 <[email protected]>

* HLM-5718 changes (#703)

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

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update genericUtils.ts (#733)

* Create CHANGELOG.md (#717)

* Update request.ts (#735)

* fixed generate api issue (#734)

Co-authored-by: Jagankumar <[email protected]>

* Create CHANGELOG.md

* gate fixes (#736)

* gate fixes validation, ui ux

* gate fix

---------

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

* added loader in the selecting boundaries (#737)

* Update createAndSearch.ts (#738)

* fix (#739)

* fix

* fix

---------

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

* Patch 3 (#740)

* change in filter recursive

* lowest level

* trimmed underscore and empty spaces

* boundary fix (#742)

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

* 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 <[email protected]>

* core -update (#751)

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

* fixed stepper issue (#752)

* fixed stepper issue

* Update index.html

* Feat : added user validation via individual (#753)

* fixes (#754)

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

* code fix nabeel (#756)

* fixes

* fix

---------

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

* 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 <[email protected]>

* css update (#780)

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

* HLM-6179 and HLM-6180 (#777)

* HLM-6179 and HLM-6180

* campaign name changes

---------

Co-authored-by: Jagankumar <[email protected]>

* 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 <[email protected]>
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 <[email protected]>

* added error button styles (#807)

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

* 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 <[email protected]>

* 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 <[email protected]>

* Target columns (#830)

* change in filter recursive

* lowest level

* commit

* Feat : target flow fixed for LLIN-mz

* uat to dev

---------

Co-authored-by: admin1 <[email protected]>

* 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 <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* fixed error message issue (#941)

* Redis integration (#940)

* Feat : added redis

* Feat : added redis retry

* removed templates folder

* updated the folder structure for health ui and removed utilties

* Update publishAllPackages.yml

* Update buildWorkbenchUI.yml

---------

Co-authored-by: nabeelmd-eGov <[email protected]>
Co-authored-by: nabeelmd-eGov <[email protected]>
Co-authored-by: ashish-egov <[email protected]>
Co-authored-by: Bhavya-egov <[email protected]>
Co-authored-by: nitish-egov <[email protected]>
Co-authored-by: Bhavya-egov <[email protected]>
Co-authored-by: ashish-egov <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Swathi-eGov <[email protected]>
Co-authored-by: admin1 <[email protected]>
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.

2 participants