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

Adding resource-estimation-service folder for master merge #784

Merged
merged 14 commits into from
Jun 27, 2024

Conversation

Priyanka-eGov
Copy link
Collaborator

@Priyanka-eGov Priyanka-eGov commented Jun 18, 2024

Summary by CodeRabbit

  • New Features

    • Introduced Resource Estimation Service with comprehensive documentation.
    • Added Excel and GeoJSON file parsing capabilities for campaign resource estimation.
    • Integrated campaign details and boundary management.
    • Implemented file store utility for file operations.
    • Added utility methods for calculation and MDMS data handling.
    • Introduced campaign models including boundaries and additional campaign details.
  • Updates

    • Updated Maven settings for resource estimation service.
    • Enhanced spring boot app configurations.
    • Added constants for service error messages and data handling.

Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Walkthrough

The introduction of the Resource Estimation Service Documentation, Maven configuration, and various Java service classes implements a comprehensive system for processing multiple file formats to estimate resources and manage campaign plans. It includes file parsing, data integration, and communication with other services, enhancing the efficiency and accuracy of resource estimation and campaign planning.

Changes

File(s) Change Summary
README.md Introduces Resource Estimation Service Documentation outlining service functionalities.
pom.xml Configures Maven settings for the project, including dependencies, repositories, and build parameters.
src/main/.../Main.java Sets up Spring Boot application, enabling component scanning and importing configurations.
src/main/.../ExcelParser.java, .../GeoJsonParser.java, .../ShapeFileParser.java Adds services for parsing and processing Excel, GeoJSON, and Shape files, respectively.
src/main/.../ResourceEstimationService.java Introduces a service class to estimate resources and process files.
src/main/.../CalculationUtil.java, .../CampaignIntegrationUtil.java, .../FilestoreUtil.java, .../MdmsUtil.java Provides utility methods for calculations, campaign integration, file handling, and fetching MDMS data.
src/main/.../boundary/EnrichedBoundary.java, .../campaignManager/Boundary.java, .../Campaign.java, .../CycleConfigureDate.java Adds models for managing campaign boundaries, details, and configuration.
src/main/.../ServiceConstants.java Defines string constants related to service error messages, file handling, and MDMS data.

Poem

In the meadow, a rabbit gleams 🐇
With data streams and coding beams 💻
Estimations clear and thorough,
Through files they burrow. 📊
Boundaries set, campaigns anew,
Resource plans brought into view. 🌟
Code Rabbit hops with pride,
Innovation as its guide. 🚀


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.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 3d000ed and b9accbf.

Files selected for processing (56)
  • health-services/resource-estimation-service/README.md (1 hunks)
  • health-services/resource-estimation-service/pom.xml (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/Main.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/config/Configuration.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/config/MainConfiguration.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/config/ServiceConstants.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/PlanConsumer.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/Producer.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/repository/ServiceRequestRepository.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/FileParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/GeoJsonParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ResourceEstimationService.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/FilestoreUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/MdmsUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/ParsingUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/PlanConfigurationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/PlanUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/controllers/FileController.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Activity.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Assumption.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Condition.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/File.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/MetricDetail.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Operation.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Plan.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfiguration.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationRequest.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationResponse.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationSearchCriteria.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationSearchRequest.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanRequest.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Resource.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/ResourceMapping.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Target.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/BoundarySearchResponse.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/EnrichedBoundary.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/HierarchyRelation.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/AdditionalDetails.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Boundary.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Campaign.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignCondition.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignDetails.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignRequest.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignResources.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignResponse.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignSearchRequest.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleConfigureDate.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleData.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/DeliveryRule.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Product.java (1 hunks)
  • health-services/resource-estimation-service/src/main/resources/application.properties (1 hunks)
Files not processed due to max files limit (2)
  • health-services/resource-estimation-service/src/main/resources/db/Dockerfile
  • health-services/resource-estimation-service/src/main/resources/db/migrate.sh
Additional context used
Learnings (1)
health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationSearchCriteria.java (1)
User: Priyanka-eGov
PR: egovernments/health-campaign-services#737
File: health-services/plan-service/src/main/java/digit/web/models/PlanConfigurationSearchCriteria.java:31-32
Timestamp: 2024-05-16T06:28:58.358Z
Learning: In the `PlanConfigurationSearchCriteria` class, the `executionPlanId` field can be empty, and no validation constraints are required for this field.
LanguageTool
health-services/resource-estimation-service/README.md

[misspelling] ~13-~13: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...gfox/springfox) Start your server as an simple java application You can view...

Markdownlint
health-services/resource-estimation-service/README.md

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


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


6-6: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


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


18-18: null (MD047, single-trailing-newline)
Files should end with a single newline character

Additional comments not posted (60)
health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/Producer.java (1)

14-19: Ensure that @Autowired is appropriate here for dependency injection considering Spring's recommendation to use constructor injection for mandatory dependencies for better testability and reliability.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Product.java (1)

13-31: Ensure that all fields are appropriately validated. Consider adding custom validation messages for better user feedback.

health-services/resource-estimation-service/src/main/java/org/egov/processor/Main.java (1)

10-18: This setup looks correct for initializing the Spring Boot application. Ensure that all necessary configurations are included in the ComponentScan.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/AdditionalDetails.java (1)

13-32: Ensure that the CycleData class is properly validated and consider enhancing the model with more specific annotations or custom validators if complex validation logic is needed.

Verification successful

The CycleData class is found and it includes validation annotations for its fields. The @Valid annotation is present, which ensures that the fields are properly validated.

  • cycleData: Annotated with @Valid, ensuring validation of the list elements.
  • cycleConfigureDate: Annotated with @Valid, ensuring validation of the CycleConfigureDate object.

This confirms that the CycleData class is properly validated as required.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if `CycleData` has proper validation annotations.

# Test: Search for `CycleData` class definition and its annotations.
rg --type java 'class CycleData' 'src/main/java/org/egov/processor'

Length of output: 140



Script:

#!/bin/bash
# Description: Find the `CycleData` class definition and its annotations in the repository.

# Locate the file containing the `CycleData` class definition.
cycle_data_file=$(rg --files-with-matches --type java 'class CycleData')

# If the file is found, display the class definition and annotations.
if [[ -n "$cycle_data_file" ]]; then
  rg --type java --context 10 'class CycleData' $cycle_data_file
else
  echo "CycleData class not found."
fi

Length of output: 898

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanRequest.java (1)

1-30: The PlanRequest class is well-structured with appropriate use of Lombok annotations for simplification and validation annotations to ensure data integrity.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignRequest.java (1)

1-27: The CampaignRequest class is correctly structured with proper use of Lombok for boilerplate code reduction and validation annotations for ensuring data integrity.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignSearchRequest.java (1)

1-28: The CampaignSearchRequest class is appropriately structured with correct use of Lombok annotations and validation checks.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignResponse.java (2)

17-21: The usage of Lombok and Jackson annotations is consistent and appropriate for a simple data model class.


24-30: Ensure that the @Valid annotation is effectively utilized by checking if the Campaign class has constraints that are validated.

Verification successful

The Campaign class does have validation constraints like @NotNull and @Size, which confirms that the @Valid annotation in CampaignResponse is effectively utilized.

  • @NotNull and @Size(min = 2, max = 64) annotations are present in the Campaign class.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the Campaign class has appropriate validation constraints.

# Test: Search for the Campaign class and check for validation constraints.
rg --type java "class Campaign" -A 20 | grep -i "@NotNull\|@Size\|@Pattern"

Length of output: 1667

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationRequest.java (2)

15-19: The class is well-annotated with Lombok and validation annotations, which simplifies the data structure and ensures basic validation.


21-27: Check that the PlanConfiguration class has appropriate validation constraints to fully utilize the @Valid annotation.

Verification successful

The PlanConfiguration class does indeed have several validation constraints such as @NotNull, @Size, and @Pattern, which are appropriate for utilizing the @Valid annotation.

  • @Size(min = 2, max = 64)
  • @NotNull
  • `@Pattern(regexp = "^(?!\p{Punct}+$).*$", message = "Name must not contain only special characters")
  • Additional constraints for various fields ensuring proper validation.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the PlanConfiguration class has appropriate validation constraints.

# Test: Search for the PlanConfiguration class and check for validation constraints.
rg --type java "class PlanConfiguration" -A 20 | grep -i "@NotNull\|@Size\|@Pattern"

Length of output: 1619

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignDetails.java (2)

17-21: The class uses Lombok and Jackson annotations appropriately to reduce boilerplate code and handle JSON serialization.


24-31: The validation annotations on tenantId and ids are correctly applied to ensure the data adheres to specified constraints.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/HierarchyRelation.java (2)

19-23: The class is appropriately annotated with Lombok and Jackson annotations for simplification and JSON handling.


26-34: The fields tenantId, hierarchyType, and boundary are well-defined. However, ensure that the EnrichedBoundary class has appropriate validation constraints to utilize the @Valid annotation effectively.

Verification successful

The EnrichedBoundary class contains validation constraints such as @NotNull on the code field and @Valid on the children field. This ensures that the @Valid annotation in HierarchyRelation is utilized effectively.

  • EnrichedBoundary class in the same package as HierarchyRelation has appropriate validation constraints.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the EnrichedBoundary class has appropriate validation constraints.

# Test: Search for the EnrichedBoundary class and check for validation constraints.
rg --type java "class EnrichedBoundary" -A 20 | grep -i "@NotNull\|@Size\|@Pattern"

Length of output: 332



Script:

#!/bin/bash
# Description: Verify the import statement for EnrichedBoundary in HierarchyRelation.java to identify the correct class.

# Test: Search for the import statement of EnrichedBoundary in HierarchyRelation.java.
rg --type java "import .*EnrichedBoundary" health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/HierarchyRelation.java

Length of output: 164



Script:

#!/bin/bash
# Description: List all import statements in HierarchyRelation.java to identify any issues with the EnrichedBoundary import.

# Test: List all import statements in HierarchyRelation.java.
rg --type java "^import " health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/HierarchyRelation.java

Length of output: 425



Script:

#!/bin/bash
# Description: Search for the definition of EnrichedBoundary within the package or related packages.

# Test: Search for the definition of EnrichedBoundary in the relevant directories.
rg --type java "class EnrichedBoundary" health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/

Length of output: 290



Script:

#!/bin/bash
# Description: Review the EnrichedBoundary class to ensure that relevant fields are annotated with validation constraints.

# Test: List the contents of the EnrichedBoundary class to verify the presence of validation constraints.
rg --type java "class EnrichedBoundary" -A 50 health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/EnrichedBoundary.java

Length of output: 557

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationSearchRequest.java (2)

15-19: The use of Lombok annotations (@Data, @AllArgsConstructor, @NoArgsConstructor, @Builder) enhances the boilerplate reduction and clarity of the model. Good use of @Validated to ensure the class respects validation constraints.


21-27: Ensure that the PlanConfigurationSearchCriteria type is correctly handling the validation scenarios as expected. This is crucial for maintaining the integrity of the data being processed.

Verification successful

The validation annotations @Valid and @Validated are present on PlanConfigurationSearchCriteria and PlanConfigurationSearchRequest. This indicates that the validation is being enforced as expected.

  • PlanConfigurationSearchCriteria is annotated with @Validated.
  • PlanConfigurationSearchRequest contains @Valid annotations for its fields, including PlanConfigurationSearchCriteria.

Thus, the validation for PlanConfigurationSearchCriteria is correctly set up and should function as intended.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the validation implementation of PlanConfigurationSearchCriteria.

# Test: Search for PlanConfigurationSearchCriteria validation logic. Expect: Validation logic that handles various scenarios.
rg --type java 'PlanConfigurationSearchCriteria' -A 10 -B 10

Length of output: 13309



Script:

#!/bin/bash
# Description: Verify the enforcement of validation for PlanConfigurationSearchCriteria.

# Test: Search for validation logic related to PlanConfigurationSearchCriteria in the codebase.
rg --type java 'PlanConfigurationSearchCriteria' -A 10 -B 10 | rg 'validate|@Valid|@Validated'

Length of output: 635

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/DeliveryRule.java (1)

15-37: Good use of validation annotations across multiple properties. Ensure that the data types and validation constraints align with the expected business logic and data formats.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Target.java (1)

22-35: The use of @Size on activityCode to enforce minimum and maximum length is a good practice for data validation. This helps in maintaining consistent data formats across the system.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/MetricDetail.java (1)

20-32: The use of @NotNull and @Size annotations ensures that essential metric details are not omitted and adhere to specified constraints. This is crucial for maintaining data integrity and operational consistency.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Condition.java (3)

25-28: The validation constraints for entity are appropriate for typical use cases.


30-33: The validation constraints for entityProperty are consistent and appropriate.


35-38: The size constraint on expression is suitably large for storing complex expressions.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfigurationSearchCriteria.java (2)

20-22: The size constraint on tenantId is typical and appropriate for identifiers.


30-31: Confirmed: The lack of constraints on executionPlanId is intentional and appropriate, as it can be empty.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Resource.java (2)

26-29: The validation constraints on resourceType are appropriate for a type descriptor.


35-37: The size constraint on activityCode is appropriate, reflecting its optional nature.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CampaignResources.java (2)

21-24: The validation constraints on filestoreId are appropriate for an identifier.


26-29: The validation constraints on type are appropriate for a type descriptor.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Activity.java (2)

26-29: LGTM! The validation constraints on code are well-defined, ensuring it has a minimum of 2 and a maximum of 128 characters.


44-46: The conditions list uses both @Valid and @NotNull annotations to ensure data integrity. Verify that the Condition class is fully validated.

Verification successful

The Condition class includes various validation annotations such as @NotNull and @Size, indicating that it is fully validated.

  • @NotNull ensures that the fields are not null.
  • @Size ensures that the fields have appropriate length constraints.

Thus, the Condition class is indeed fully validated as required.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Ensure that the `Condition` class is fully validated.
# Expected: Full validation annotations in `Condition` class.

grep -r "Condition" ./health-services/resource-estimation-service/src/

Length of output: 803



Script:

#!/bin/bash
# Description: Check for validation annotations in the `Condition` class.
# Expected: Presence of validation annotations like @NotNull, @Size, @Pattern, etc.

grep -E '@(NotNull|Size|Pattern|Min|Max|Email|Valid)' ./health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Condition.java

Length of output: 299

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/ResourceMapping.java (3)

23-25: The id field is validated correctly, ensuring it is a valid string. Good use of annotations here.


27-31: Excellent validation on filestoreId to ensure it doesn't contain only special characters. This is crucial for preventing injection attacks.


33-41: Both mappedFrom and mappedTo are well-validated to ensure they contain meaningful values. This is essential for data integrity.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Assumption.java (3)

23-26: The id field is correctly sized between 2 and 64 characters. This helps maintain a consistent identifier format across the system.


28-39: The key and value fields are well-validated, ensuring that key is always present and value adheres to specific numeric constraints. This is crucial for maintaining data integrity in assumptions.


41-43: The active property is non-nullable and defaults to true. This is a common pattern for boolean flags in data models.

health-services/resource-estimation-service/src/main/java/org/egov/processor/config/MainConfiguration.java (1)

26-37: The configuration for ObjectMapper and MappingJackson2HttpMessageConverter is correctly set to handle common deserialization issues and time zone discrepancies. This is essential for consistent data handling across different environments.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/Plan.java (3)

18-22: The use of Lombok annotations (@Data, @AllArgsConstructor, @NoArgsConstructor, @Builder) is appropriate here as they help to reduce boilerplate code significantly. Good use of @Validated to ensure that Spring validates the bean after all the properties have been set.


48-58: It's good to see validation on collections with @Valid. This ensures that if the Plan contains activities, resources, or targets, they are validated based on their own constraints.


29-30: Ensure the tenantId field validation aligns with your data requirements. The constraints @Size(min = 2, max = 64) should be validated against actual tenant ID lengths in your environment.

health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/PlanConsumer.java (1)

28-34: The setup for listening to Kafka topics using @KafkaListener is correctly implemented. Ensure that the topics defined in the properties file (plan.config.consumer.kafka.save.topic and plan.config.consumer.kafka.update.topic) are correctly configured and accessible.

health-services/resource-estimation-service/src/main/java/org/egov/processor/config/Configuration.java (1)

23-72: The configuration properties are well-organized and correctly annotated with @Value to inject values from property files. Ensure that all property keys (egov.mdms.host, egov.filestore.service.host, etc.) are correctly defined in your properties files and that they are accessible at runtime.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/controllers/FileController.java (1)

32-37: Constructor correctly uses dependency injection for initializing dependencies. Well-implemented.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/PlanConfiguration.java (1)

22-75: The PlanConfiguration class is well-structured with appropriate validation constraints and use of Lombok annotations for boilerplate code reduction. Good use of validation annotations ensures robust data integrity.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/GeoJsonParser.java (1)

37-41: Constructor setup looks correct and efficiently initializes all required fields.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ResourceEstimationService.java (1)

30-38: Constructor is well-implemented, correctly initializes all dependencies required for the service operations.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/PlanUtil.java (1)

123-130: The update method is implemented correctly and efficiently handles the update operations.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (5)

19-20: The CalculationUtil class is correctly annotated with @Component, indicating it is a Spring-managed bean.


22-22: The constructor correctly initializes the planUtil dependency. This is a good use of dependency injection which facilitates easier unit testing and modularity.

Also applies to: 26-28


56-62: The method convertAssumptionsToMap is straightforward and effectively converts a list to a map. It's well-implemented without any apparent issues.


121-128: The method calculateResult integrates several functionalities compactly, but the error handling seems generic. Providing more specific error messages could improve troubleshooting and user experience.

- throw new CustomException(e.getMessage(), "");
+ throw new CustomException("CALCULATION_ERROR", "Error during calculation: " + e.getMessage());

Likely invalid or redundant comment.


38-48: The calculateOutputValue method effectively handles different mathematical operations using a switch statement. Consider adding a default case to handle unexpected operators gracefully.

- default -> throw new CustomException("UNSUPPORTED_OPERATOR", "Unsupported operator: " + operator);
+ default -> {
+    log.error("Unsupported operator: " + operator);
+    return BigDecimal.ZERO; // or appropriate default handling
+ }

Likely invalid or redundant comment.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/MdmsUtil.java (2)

34-36: The MdmsUtil class is correctly annotated with @Component and @Slf4j, which are appropriate for Spring-managed beans and logging respectively.


44-48: The constructor is well-implemented, correctly setting up dependencies via dependency injection. This is good practice for maintainability and testing.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (2)

29-31: The ShapeFileParser class is correctly annotated with @Service and @Slf4j, indicating it's a Spring-managed service with logging capabilities.


41-46: The constructor is correctly implemented, using dependency injection for better modularity and testability.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/FilestoreUtil.java (1)

84-92: Verify the content type of the uploaded file.

The method does not check the content type of the file being uploaded. Ensure that the file content type is verified against expected types to prevent uploading unsupported or potentially malicious files.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java (1)

139-150: Validate boundary addition logic.

The method updateCampaignBoundary uses a complex logic to determine if a boundary should be added. It's important to ensure that this logic is thoroughly tested to prevent logical errors.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1)

54-86: Ensure consistent use of field initializations in the constructor.
[REFACTOR_SUGGESTion]
Consider initializing all fields directly in their declarations if they are not dependent on constructor parameters. This can enhance readability and reduce the boilerplate in the constructor.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between b9accbf and 14c8c1d.

Files selected for processing (1)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
Additional comments not posted (4)
health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (4)

98-111: Ensure file existence is checked early in the method to simplify logic.


126-160: Improve error handling by logging the stack trace for better debugging.


252-257: Add null checks before file operations to prevent NullPointerExceptions.


278-294: Handle file operations and exceptions more gracefully in convertWorkbookToXls.

jagankumar-egov pushed a commit that referenced this pull request Jun 20, 2024
kavi-egov pushed a commit that referenced this pull request Jun 20, 2024
…ng, delivery type integarted (#790)

* Update campaignValidators.ts (#655)

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

* css

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

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

* css

---------

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

* Update campaignUtils.ts

* fixed HLM-5970

* Feat : added boundary validation at data level

* fixes

* local add

* Added boundary validation

* Refactor

* fixed HLM-5935 and HLM-5749

* Refactor

* Feat : updated table

* change campaignid in payload

* Feat : added campaignId

* Update campaignApis.ts

* Update campaignValidators.ts

* refactored

* Refactor

* assigned campaignId

* Refactor

* updated createRequest Schema

* Feat : invalid Status Persist

* status fix

* version-fix

* Update CODEOWNERS

* core version updated and css fix for language dropdown

* refactor (#676)

* Uat signoff (#678)

* change in filter recursive

* lowest level

* added validation related to target sheet headers

* HLM-5916

* download button fixes in summary (#682)

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

* Hlm 5927 (#687)

* change in filter recursive

* lowest level

* added validation for boundary codes to be invalid other than that selected from UI in target upload

* Added Delivery and cycle config for LLIN and SMC both (#688)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

* Value localise in summary screen, api error change

* fixes

* genarate api call fix

* font size change for summary

* login css change

* HLM-5718: SMC delivery config enhancement

* config update

* added config for in between

* fix config for llin

* added mdms integration

---------

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

* Fixed HLM-5988_warning message (#689)

Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>

* download filename fixes (#693)

* download button fixes in summary

* download filename with custom name changes added

---------

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

* download filename fixes (#694)

* download button fixes in summary

* download filename with custom name changes added

* config fix for llin

---------

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

* successful toast message is fixed (#695)

* successful toast message is fixed

* Update UploadData.js

* HLM-5991: Alert Pop UP CR (#696)

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

* HLM-5718 changes (#703)

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

* Localization cache (#706)

* change in filter recursive

* lowest level

* refactored  localization cache logic

* Update README.md (#707)

* Update README.md

* Update README.md

* Update utilities/project-factory/README.md

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

* Update README.md

---------

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

* HLM-5985_made lowest level changes (#708)

* HLM-5985_made lowest level changes

* resolved codeRabbit comments

* Create LOCALSETUP.md (#709)

* Create LOCALSETUP.md

* Refactored config

* Update LOCALSETUP.md

* Update utilities/project-factory/LOCALSETUP.md

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

* Update utilities/project-factory/LOCALSETUP.md

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

* Update utilities/project-factory/LOCALSETUP.md

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

* Update utilities/project-factory/LOCALSETUP.md

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

* Update LOCALSETUP.md

---------

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

* updated the localisation module config

* Refactor config (#713)

* Refactor config

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

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

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

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

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

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

---------

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

* Update postman_collection.json (#714)

* Update postman_collection.json

* Update postman_collection.json

* Delete utilities/project-factory/project_factory_swagger.yml (#715)

* Feat : removed campaignId validation for boundary upload (#718)

* updated the delay for boundary relationship

* added logger for request TODO TEST

will be reverted

* Revert "added logger for request TODO TEST"

This reverts commit d5c2bf5.

* Schema validation (#719)

* Feat : removed campaignId validation for boundary upload

* Feat : added schema validation

* Fixed mdms host

* updated the logger messages

* updated the loggers

* delivery new changes, toast fix, error fix (#716)

* delivery new changes, toast fix, error fix

* new fixes

* fixes

* change text component to field component

* added hierarchy

* fix

* fix

* fix

* fix

* passing hierarchy from props

---------

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

* Schema validation2 (#721)

* Feat : removed campaignId validation for boundary upload

* Feat : added schema validation

* Fixed mdms host

* Feat : added boundary validation

* Feat : optimized product search

* Fix : project mapping fixed (#722)

* Fixed project search (#723)

* smc fixes (#724)

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

* Feat : added boundary confirmation (#727)

* Fix: fixed processing boundary

* Refactor

* fixed HLM-6109 (#729)

* gate fixes validation, ui ux (#731)

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

* integrated panelcard component (#732)

* integrated panelcard component

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/Response.js

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

---------

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

* Update genericUtils.ts (#733)

* updated the folder structure

* Create CHANGELOG.md (#717)

* updated the versions

* Update .gitignore

* Update request.ts (#735)

* fixed generate api issue (#734)

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Create CHANGELOG.md

* gate fixes (#736)

* gate fixes validation, ui ux

* gate fix

---------

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

* added loader in the selecting boundaries (#737)

* Update createAndSearch.ts (#738)

* fix (#739)

* fix

* fix

---------

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

* Patch 3 (#740)

* change in filter recursive

* lowest level

* trimmed underscore and empty spaces

* boundary fix (#742)

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

* Update genericUtils.ts (#746)

* fixed the delivery products issue

* Fixed delivery conditions issue

* Update campaignApis.ts (#747)

* fixed warning toast (#748)

* fixed warning toast

* Update UploadData.js

* fix (#749)

* fix

* fx

* fix

---------

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

* core -update (#751)

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

* fixed stepper issue (#752)

* fixed stepper issue

* Update index.html

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

* fixes (#754)

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

* code fix nabeel (#756)

* fixes

* fix

---------

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

* Updated few loggers (#759)

* updated few loggers flow

* Update utilities/project-factory/src/server/api/campaignApis.ts

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

* Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts

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

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

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

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

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

* Update utilities/project-factory/src/server/api/campaignApis.ts

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

* Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts

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

* Update utilities/project-factory/src/server/utils/genericUtils.ts

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

---------

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

* Updated the user Password generation logic #761

* Update Listener.ts (#730)

* Update Listener.ts

* added try catch logic in producer

* Feat : added parallel batch execution (#767)

* Feat : added parallel batch execution

* Refactor

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

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

---------

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

* fixed the stepper (#765)

* changes config (#769)

* Project type config and added loggers for process of campaign (#772)

* Feat : added themes in generate template (#773)

* fixed the ajv package version for build issue

* Feat : removed xlsx (#776)

* HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT (#778)

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

* css update (#780)

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

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

* HLM-6179 and HLM-6180

* campaign name changes

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Feat : fixed target generation (#781)

* fixed tenantId issue (#784)

* fix: resolved AJV-related Jenkins build issue reference #783 #786 (#787)

* module ui fix

* updated all the package version for build fixes

* fixed kafka-error at target generation (#789)

* updated core version (#791)

* updated core version

* updated css also

* Update campaignValidators.ts (#794)

* Updated the excel generation logic and files

* added changes for configurable column in target sheet (#779)

* change in filter recursive

* lowest level

* made target headers  genearte through mdms schema

* changed config index.ts

* changed config index.ts

* changes for now

* added configurable column logic from schema HLM-6169

* updated validate of target columns through schema

* added masterForColumnSchema in index.ts

* formatted dataManageService

* refactored lock TargetFields func

* removed console.log

* User creation performance improved (#800)

* Feat : Improved user creation performance

* Change status color

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

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

---------

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

* Update genericUtils.ts (#801)

* Hlm 6170 (#802)

* change in filter recursive

* lowest level

* HLM -6170 added logic for only village level data in target sheet and some refactoring

* updated css (#804)

* fixed button issue (#805)

* HLM 6177: Error card implementation in summary screen (#806)

* HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT

* Added Error Cards in summary screen and redirection

---------

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

* added error button styles (#807)

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

* updated popUp css (#808)

* HLM 6178: Implementing New Pop up screen in boundaries (#809)

* added error button styles

* Implementing New Pop up screen in boundaries

---------

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

* Facility changes (#812)

* Feat : changed facility Template

* Feat : locked target templates

* fixed colour issue (#813)

* Updated the project type conversion logic for the             "deliveryType" dont1 and n config

* Unique field added (#814)

* Feat : changed facility Template

* Feat : locked target templates

* Feat : added unique check logic

* Target schema update (#815)

* change in filter recursive

* lowest level

* updated shcema of target columns to be configurable

* removed empty spaces from config index.ts

* Active mapping (#817)

* Feat : changed facility Template

* Feat : locked target templates

* Feat : added unique check logic

* Feat : added mapping via active field

* changes in the schema validation (#816)

* Updated the workbench and css module version

* Feat : added active inactive boundary check (#818)

* Update campaignValidators.ts (#819)

* added active inactive validation (#820)

* changed api call time (#826)

* Feat : added target sum mapping (#825)

* added campaign type as filter (#827)

* Update genericApis.ts (#828)

* Update excelUtils.ts (#829)

* UI issue fixes, icon fix in summary error (#831)

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

* Target columns (#830)

* change in filter recursive

* lowest level

* commit

* Feat : target flow fixed for LLIN-mz

* uat to dev

---------

Co-authored-by: admin1 <nitish@egovernments.org>

* Feat : freezed target columns (#833)

* Target mr dn (#834)

* change in filter recursive

* lowest level

* Feat : skipped validation temporarily

* changes in the target validation (#835)

* fixed error info (#837)

* Added roboto font (#840)

* Feat : added roboto font

* Fixed config

* target validation based on diff campaign types (#843)

* change in filter recursive

* lowest level

* updated validation of target based on campaign type

* fixed validation issue (#844)

* Updated the workbench package version

* fixed validation logic (#846)

* fixed validation logic

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

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

---------

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

* Error messages improved (#848)

* Feat : imporved error messages and initilised utils for tracking process

* Fix ; unused variables fixed

* Feat : improved error messages

* Fix : download error fix (#850)

* Update campaignUtils.ts (#851)

* Update campaignUtils.ts

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

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

---------

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

* Update campaignValidators.ts (#853)

* HLM 6210: Toast, error focus fix and project type reset delivery data fix  (#854)

* HLM-6210: campaign type change reset delivery data fix, summary error focus fix

* summary error focus fix

---------

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

* HLM-6225_added time out according to data (#855)

* Update campaignValidators.ts (#859)

* HLM 6210 (#858)

* HLM-6210: campaign type change reset delivery data fix, summary error focus fix

* summary error focus fix

* parallel search fixes

---------

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

* Remove validation (#852)

* change in filter recursive

* lowest level

* removed unnecessary validation for target

* spacing refactor

* Update campaignValidators.ts (#863)

* Header validation (#861)

* change in filter recursive

* lowest level

* removed unnecessary validation for target

* changed the logic of header validation

* space refactor

* Update campaignUtils.ts (#864)

* fixed ui error (#865)

* Read me (#867)

* change in filter recursive

* lowest level

* removed unnecessary validation for target

* changed the logic of header validation

* fixed portugese language error

* space refactoring

* Update Dockerfile

* Update Dockerfile

* Update migrate.sh

* Update Dockerfile

* Update campaignValidators.ts (#868)

* HLM 6210:campaign type change reset fix (#869)

* HLM-6210: campaign type change reset delivery data fix, summary error focus fix

* summary error focus fix

* parallel search fixes

* campaign type change reset fix

---------

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

* Update excelUtils.ts for sheetHeaders wraping (#870)

* Update package.json

* updated error messages (#871)

* feat : added jaeger-client tracing (#872)

* updated the table config

* Update campaignApis.ts (#875)

* removed the schema and updated the db name

* fixing generate API call, file auto delete, date error (#877)

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

* Trim resource (#878)

* Feat : trimmed resource persist message

* Refactor

* Removed reject error in produce message

* fixed min time, draft logic (#879)

* Update index.ts (#880)

* added min ui error and facility usage (#883)

* added min ui error and facility usage

* changes

* Update campaignUtils.ts (#884)

* HLM 6007 (#885)

* fixing generate API call, file auto delete, date error

* generate api fix

---------

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

* Update Dockerfile

* Feat : docker config update (#886)

* Update Dockerfile (#887)

* Create buildWorkbenchUI.yml

* Update README.md (#917)

* Update buildWorkbenchUI.yml

* Update README.md

* Updated the DB Schema issue of Project-factory

* fixed hierarchy order (#919)

* User flag hcm (#920)

* Feat : docker config update

* Feat : added user create flag

* Refactored

* Update campaignUtils.ts

* Update campaignMappingUtils.ts (#922)

* Ashish egov patch 2 (#921)

* Update index.ts

* Update campaignApis.ts

* Fixed the project type conversion and product duplicate issue

* Update campaignApis.ts (#924)

* Update campaignMappingUtils.ts (#925)

* Update campaignMappingUtils.ts

* Refactored

* Update publishProjectFactory.yml

* Update buildWorkbenchUI.yml

* Update campaignMappingUtils.ts (#926)

* Update request.ts (#928)

* Update request.ts

* Feat : updated httprequest

* Feat : warning response added

* Refactor

* added start and enddate in cycles

* Update campaignApis.ts (#930)

* Update request.ts (#932)

* fixed generate issue (#933)

* Fixed project-type resources duplication

* updated target error messages (#936)

* fixed stepper from draft (#937)

* Update Listener.ts

* delivery type disable fix, product sku name change (#939)

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

* fixed error message issue (#941)

* Redis integration (#940)

* Feat : added redis

* Feat : added redis retry

* updated migration

* fixed

* updated migration

* Delete .vscode/launch.json

* Delete .vscode/settings.json

---------

Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <bhavya.mangal@egovernments.org>
Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org>
Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Swathi-eGov <137176788+Swathi-eGov@users.noreply.github.com>
Co-authored-by: admin1 <nitish@egovernments.org>
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: 6

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 14c8c1d and 992dc8e.

Files selected for processing (6)
  • health-services/resource-estimation-service/pom.xml (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/PlanConsumer.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/repository/ServiceRequestRepository.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/File.java (1 hunks)
Additional comments not posted (9)
health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/PlanConsumer.java (1)

23-26: The constructor is correctly set up to inject dependencies for ObjectMapper and ResourceEstimationService.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java (2)

27-31: The constructor properly initializes the Configuration, ServiceRequestRepository, and ObjectMapper dependencies.


33-44: The search method is robust with clear exception handling. The custom exception message has been enhanced as suggested in previous reviews. Good adherence to previous feedback.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/File.java (1)

25-48: The properties of the File class are well-defined with appropriate validation annotations. The @Pattern annotations have been updated with more descriptive error messages as suggested in previous reviews.

health-services/resource-estimation-service/src/main/java/org/egov/processor/repository/ServiceRequestRepository.java (1)

31-34: The constructor is correctly set up to inject dependencies for ObjectMapper and RestTemplate.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (1)

41-46: Constructor correctly initializes class fields with provided arguments.

health-services/resource-estimation-service/pom.xml (3)

8-12: Properties are correctly configured for Java version and compiler settings.


35-130: Dependencies are appropriately configured for the project's requirements.


131-167: Repositories are correctly configured for accessing necessary dependencies.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 992dc8e and 391f82b.

Files selected for processing (11)
  • health-services/resource-estimation-service/README.md (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/config/ServiceConstants.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/PlanConsumer.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/GeoJsonParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ResourceEstimationService.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/FilestoreUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/ParsingUtil.java (1 hunks)
Files not reviewed due to errors (3)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (no review received)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (no review received)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/FilestoreUtil.java (no review received)
Additional context used
LanguageTool
health-services/resource-estimation-service/README.md

[uncategorized] ~18-~18: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...g to http://localhost:8080/ Change default port value in application.properties

Markdownlint
health-services/resource-estimation-service/README.md

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


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


6-6: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


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


18-18: null (MD047, single-trailing-newline)
Files should end with a single newline character

Additional comments not posted (7)
health-services/resource-estimation-service/README.md (1)

13-13: Correct grammatical error in the server startup instruction.

The grammatical error correction makes the instruction clearer.

health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/PlanConsumer.java (2)

39-41: Enhance error logging in the Kafka consumer.

The updated error logging now includes more context about the error, which aids in troubleshooting.


36-36: Add detailed logging for successful processing.

Including detailed logging for successful operations can help in monitoring and debugging.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ResourceEstimationService.java (1)

30-38: Constructor is well-implemented with proper dependency injection.

The constructor correctly initializes all necessary dependencies, promoting a clean and testable code design.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java (1)

63-88: Ensure robust error handling in campaign updates

The method updateCampaignDetails logs an error but does not rethrow the exception, potentially leading to silent failures. Consider rethrowing the exception to ensure that upstream services are aware of the failure.

- log.error(ServiceConstants.ERROR_WHILE_SEARCHING_CAMPAIGN + planConfigurationRequest.getPlanConfiguration().getExecutionPlanId(), e);
+ throw new CustomException("CAMPAIGN_UPDATE_FAILED", "Failed to update campaign details: " + e.getMessage());

Likely invalid or redundant comment.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (2)

74-86: Constructor Initialization Looks Good

The constructor properly initializes all required dependencies, adhering to good dependency injection practices.


98-109: File Parsing and Processing Well Handled

The method parseFileData handles file retrieval and existence checks effectively, and properly delegates to processExcelFile for further processing.

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

Outside diff range comments (2)
build/build-config.yml (2)

Line range hint 263-263: Indent comment to match the content.

The comment indentation does not align with its content, which could lead to parsing issues or misinterpretations of the file structure.

  - name: "builds/health-campaign-services/analytics/auth-proxy"
    build:
      - work-dir: "analytics/auth-proxy"
        image-name: "auth-proxy"
- # frontend
+       # frontend
Tools
yamllint

[error] 257-257: trailing spaces (trailing-spaces)


Line range hint 270-270: Correct comment formatting for consistency and clarity.

The comment lacks a starting space and is not indented correctly, which can affect readability and the structured appearance of the YAML file.

-#Utilities
+  # Utilities
Tools
yamllint

[error] 257-257: trailing spaces (trailing-spaces)

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 391f82b and 9542b6c.

Files selected for processing (1)
  • build/build-config.yml (1 hunks)
Additional context used
yamllint
build/build-config.yml

[error] 257-257: trailing spaces (trailing-spaces)


[warning] 263-263: comment not indented like content (comments-indentation)


[warning] 270-270: missing starting space in comment (comments)


[warning] 270-270: comment not indented like content (comments-indentation)

build/build-config.yml Outdated Show resolved Hide resolved
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: 8

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 9542b6c and a13d16b.

Files selected for processing (4)
  • build/build-config.yml (1 hunks)
  • health-services/resource-estimation-service/CHANGELOG.md (1 hunks)
  • health-services/resource-estimation-service/LOCALSETUP.md (1 hunks)
  • health-services/resource-estimation-service/README.md (1 hunks)
Additional context used
LanguageTool
health-services/resource-estimation-service/CHANGELOG.md

[grammar] ~7-~7: It seems that the possessive pronoun “its” fits better in this context. Please verify. (IT_ITS)
Context: ... File Processing : In file processing , it process files present in plan configura...


[uncategorized] ~7-~7: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...le Processing : In file processing , it process files present in plan configuration by ...


[uncategorized] ~8-~8: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...ing resources. 3. Updating Plan: It create a plans based on row and update those b...


[uncategorized] ~8-~8: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...lan: It create a plans based on row and update those by putting it on topic that is co...


[uncategorized] ~9-~9: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...ith Campaign manager : After processing calculations it also integrate resources and boundar...


[uncategorized] ~9-~9: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...: After processing calculations it also integrate resources and boundary with Campaign Ma...


[uncategorized] ~9-~9: This verb may not be in the correct form. Consider using a different form for this context. (AI_EN_LECTOR_REPLACEMENT_VERB_FORM)
Context: ...lations it also integrate resources and boundary with Campaign Manager. 5. Boundary an...

health-services/resource-estimation-service/LOCALSETUP.md

[uncategorized] ~36-~36: The grammatical number of this noun doesn’t look right. Consider replacing it. (AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
Context: ...onfig. 5. Update all dependency service host either on any unified-env or port-forwa...

Markdownlint
health-services/resource-estimation-service/CHANGELOG.md

5-5: Expected: h3; Actual: h4 (MD001, heading-increment)
Heading levels should only increment by one level at a time


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


1-1: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


4-4: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


5-5: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


5-5: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


6-6: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


10-10: null (MD047, single-trailing-newline)
Files should end with a single newline character

health-services/resource-estimation-service/LOCALSETUP.md

20-20: Column: 1 (MD010, no-hard-tabs)
Hard tabs


21-21: Column: 1 (MD010, no-hard-tabs)
Hard tabs


23-23: Column: 1 (MD010, no-hard-tabs)
Hard tabs


24-24: Column: 1 (MD010, no-hard-tabs)
Hard tabs


27-27: Column: 1 (MD010, no-hard-tabs)
Hard tabs


29-29: Column: 1 (MD010, no-hard-tabs)
Hard tabs


31-31: Column: 1 (MD010, no-hard-tabs)
Hard tabs


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


17-17: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


22-22: Expected: 3; Actual: 2; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


25-25: Expected: 4; Actual: 3; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


26-26: Expected: 5; Actual: 4; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


28-28: Expected: 6; Actual: 5; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


30-30: Expected: 7; Actual: 6; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


33-33: Expected: 8; Actual: 7; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


34-34: Expected: 9; Actual: 8; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


35-35: Expected: 10; Actual: 4; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


36-36: Expected: 11; Actual: 5; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


37-37: Expected: 12; Actual: 6; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


39-39: null (MD047, single-trailing-newline)
Files should end with a single newline character

health-services/resource-estimation-service/README.md

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


39-39: null (MD024, no-duplicate-heading)
Multiple headings with the same content

yamllint
build/build-config.yml

[error] 257-257: trailing spaces (trailing-spaces)


[warning] 263-263: comment not indented like content (comments-indentation)


[warning] 270-270: missing starting space in comment (comments)


[warning] 270-270: comment not indented like content (comments-indentation)

Additional comments not posted (1)
health-services/resource-estimation-service/LOCALSETUP.md (1)

7-12: Verify Dependency Versions

Ensure that all dependencies listed are the required versions for the Resource Estimation Service, especially since Java and Kafka have specific version requirements mentioned elsewhere in the documentation.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between a13d16b and e850c55.

Files selected for processing (2)
  • health-services/resource-estimation-service/CHANGELOG.md (1 hunks)
  • health-services/resource-estimation-service/LOCALSETUP.md (1 hunks)
Additional context used
Learnings (1)
health-services/resource-estimation-service/LOCALSETUP.md (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/LOCALSETUP.md:0-0
Timestamp: 2024-06-24T08:15:04.390Z
Learning: The note in the LOCALSETUP.md file regarding error handling with Kafka and other microservices has been updated to provide more detailed troubleshooting steps.
Markdownlint
health-services/resource-estimation-service/CHANGELOG.md

3-3: Expected: h3; Actual: h4 (MD001, heading-increment)
Heading levels should only increment by one level at a time


1-1: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


2-2: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


2-2: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


3-3: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


3-3: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


4-4: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


8-8: null (MD047, single-trailing-newline)
Files should end with a single newline character

health-services/resource-estimation-service/LOCALSETUP.md

20-20: Column: 1 (MD010, no-hard-tabs)
Hard tabs


21-21: Column: 1 (MD010, no-hard-tabs)
Hard tabs


23-23: Column: 1 (MD010, no-hard-tabs)
Hard tabs


24-24: Column: 1 (MD010, no-hard-tabs)
Hard tabs


27-27: Column: 1 (MD010, no-hard-tabs)
Hard tabs


29-29: Column: 1 (MD010, no-hard-tabs)
Hard tabs


31-31: Column: 1 (MD010, no-hard-tabs)
Hard tabs


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


17-17: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


22-22: Expected: 3; Actual: 2; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


25-25: Expected: 4; Actual: 3; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


26-26: Expected: 5; Actual: 4; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


28-28: Expected: 6; Actual: 5; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


30-30: Expected: 7; Actual: 6; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


33-33: Expected: 8; Actual: 7; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


34-34: Expected: 9; Actual: 8; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


35-35: Expected: 10; Actual: 4; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


36-36: Expected: 11; Actual: 5; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


37-37: Expected: 12; Actual: 6; Style: 1/2/3 (MD029, ol-prefix)
Ordered list item prefix


18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


39-39: null (MD047, single-trailing-newline)
Files should end with a single newline character

LanguageTool
health-services/resource-estimation-service/LOCALSETUP.md

[uncategorized] ~36-~36: The grammatical number of this noun doesn’t look right. Consider replacing it. (AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
Context: ...onfig. 5. Update all dependency service host either on any unified-env or port-forwa...


[uncategorized] ~39-~39: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...URL in the external mapping of the data configuration or consider port-forwarding the problem...

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between e850c55 and c0710cb.

Files selected for processing (14)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/Producer.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/repository/ServiceRequestRepository.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ResourceEstimationService.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/MdmsUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/ParsingUtil.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/EnrichedBoundary.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Boundary.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Campaign.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleConfigureDate.java (1 hunks)
Files not reviewed due to errors (2)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/MdmsUtil.java (no review received)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ShapeFileParser.java (no review received)
Additional context used
Learnings (3)
health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleConfigureDate.java (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleConfigureDate.java:7-16
Timestamp: 2024-06-26T17:03:35.631Z
Learning: Documentation at the class and field level has been added to the `CycleConfigureDate` class in the `resource-estimation-service` module as per devdatta-egov's update.
health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Campaign.java (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleConfigureDate.java:7-16
Timestamp: 2024-06-26T17:03:35.631Z
Learning: Documentation at the class and field level has been added to the `CycleConfigureDate` class in the `resource-estimation-service` module as per devdatta-egov's update.
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java:74-87
Timestamp: 2024-06-26T17:22:24.700Z
Learning: The `calculateResources` method in `CalculationUtil.java` is intentionally complex to meet specific design requirements or constraints.
Additional comments not posted (13)
health-services/resource-estimation-service/src/main/java/org/egov/processor/kafka/Producer.java (1)

8-17: Code looks clean and well-structured.

The usage of CustomKafkaTemplate for Kafka interactions is appropriate, and the class is correctly annotated with @Service and @Slf4j. The method push is succinct and does its job well.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/CycleConfigureDate.java (1)

7-28: Well-documented and correctly annotated class.

The CycleConfigureDate class is well-documented, enhancing understanding and maintainability. The annotations used for the fields are appropriate, ensuring that the data is correctly validated and deserialized.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Boundary.java (1)

15-41: Class structure is appropriate and well-annotated.

The Boundary class is well-structured, with correct usage of validation and serialization annotations. The fields are appropriately validated, and the removal of unnecessary annotations on boolean fields is a good improvement.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/EnrichedBoundary.java (1)

19-45: Class is well-structured and correctly annotated.

The EnrichedBoundary class uses appropriate annotations for JSON serialization and validation. The structure is clear, and the recursive validation on the children field is a good practice.

health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/campaignManager/Campaign.java (1)

18-90: Comprehensive and well-annotated class.

The Campaign class is comprehensive and uses a variety of annotations to ensure robust data handling and validation. The corrections made to the use of @Valid on primitive fields are appropriate and enhance the code quality.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java (1)

43-43: Enhance error message specificity.

While the error message has been improved to include tenantId, it could also benefit from displaying the type of error (e.g., network error, parsing error) based on the specific exceptions caught.

- "Exception occurs while searhing boundary or parsing search response of boundary relationship for tenantId: "+tenantId
+ "Network error occurred while fetching boundary data for tenantId: " + tenantId
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1)

74-87: Complex method with nested loops.

Given the previous discussions and the learning stored, it's acknowledged that the complexity in calculateResources is intentional and necessary for the design. However, adding detailed comments explaining the logic could enhance maintainability and understanding for new developers or during future modifications.

+ // This method calculates resources based on JSON input and configuration. It is intentionally complex to handle dynamic input scenarios.
health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (6)

74-86: Constructor Implementation Looks Good

The constructor properly initializes all necessary fields with the provided parameters, adhering to best practices for dependency injection.


98-109: Consider Enhancing Logging for Debugging

The method correctly checks for file existence before processing. Consider adding more detailed logging at key steps to aid in debugging and tracking the flow of data, especially before and after file operations.

+ log.debug("Retrieving file with ID: {}", fileStoreId);
+ log.debug("File retrieved successfully. Proceeding with processing.");

200-232: Add More Comments for Clarity

The method performs complex operations involving data mapping and calculations. Consider adding more detailed comments to explain the purpose and logic of each major block of code, especially before complex operations.

+ // Mapping column names to values
+ // Performing calculations based on the mapped values
+ // Updating campaign details with the calculated values

263-268: Good Handling of File Upload

The method correctly checks for a non-null file before attempting to upload, which is crucial to avoid errors during file operations.


278-280: Temporary File Creation is Handled Appropriately

The method correctly uses the standard Java API for creating temporary files and handles potential IOExceptions appropriately.


288-306: Enhance Logging for Error Handling

While the method handles file operations correctly, consider adding more detailed logging for errors to aid in troubleshooting, especially when writing the file fails.

+ log.error("Failed to write XLS file: {}", e.getMessage());

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between c0710cb and 6d08c56.

Files selected for processing (2)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1 hunks)
Additional context used
Learnings (1)
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java:74-87
Timestamp: 2024-06-26T17:22:24.700Z
Learning: The `calculateResources` method in `CalculationUtil.java` is intentionally complex to meet specific design requirements or constraints.
Additional comments not posted (10)
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (2)

74-87: Review of complex method: calculateResources.

This method is complex as it involves nested loops and multiple operations in a single method. However, as per the learnings and previous discussions, this complexity is intentional to meet specific design requirements. It's important to ensure this complexity is documented for future maintenance.


133-140: Optimize the calculateResult method.

The method is well-structured but could benefit from additional comments explaining the logic, especially how inputs are mapped and assumptions are used in calculations.

Consider adding more detailed comments to improve the readability and maintainability of this method.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (8)

74-86: Constructor Dependency Injection Review:

The constructor properly injects dependencies which are essential for the operations within the class. This is a good practice as it facilitates easier unit testing and maintenance.


98-109: Review: Proper File Handling in parseFileData

The method handles file retrieval and existence checks robustly, logging appropriately and returning null if the file does not exist. This prevents further processing of non-existent files.


185-196: Optimize Loop Handling in processSheets:

The method uses a modern Java forEach loop to process each sheet, which is efficient and clean. However, ensure that any exceptions thrown within the lambda are properly handled to avoid breaking the loop prematurely.


239-271: Optimize Calculations in performRowLevelCalculations:

The method performs row-level calculations efficiently. However, consider optimizing the loop and handling potential exceptions more gracefully.


273-293: Review Calculation Logic in performCalculationsOnOperations:

Ensure that the calculations are performed correctly and efficiently. Consider adding more detailed logging to trace computation values for easier debugging and validation.


302-307: Ensure Robust File Handling in uploadConvertedFile:

The method checks for null before attempting to upload, which is good practice. However, consider adding more detailed error handling or logging in case the upload fails.


317-319: Review Resource Management in createTempFile:

The method effectively creates a temporary file. Ensure that these files are cleaned up appropriately to avoid leaving residual files on the file system.


355-374: Optimize JSON Node Creation in createFeatureNodeFromRow:

The method efficiently creates a JSON node from Excel row data. Consider adding error handling for potential issues during data extraction.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 6d08c56 and d41da17.

Files selected for processing (3)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/config/ServiceConstants.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1 hunks)
Additional context used
Learnings (1)
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java:74-87
Timestamp: 2024-06-26T17:22:24.700Z
Learning: The `calculateResources` method in `CalculationUtil.java` is intentionally complex to meet specific design requirements or constraints.
Additional comments not posted (6)
health-services/resource-estimation-service/src/main/java/org/egov/processor/config/ServiceConstants.java (1)

10-66: Review of Constants for Clarity and Consistency

The constants are well-defined and cover a broad range of functionality from error messages to module names and file handling. It's good to see consistent naming conventions and clear, descriptive values. This will help in maintaining a clean and understandable codebase.

health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (4)

40-50: Review of the calculateOutputValue Method

The method uses a switch statement to handle different arithmetic operations, which is a clean and efficient way to process based on the type of operation. The use of ServiceConstants.DEFAULT_SCALE and RoundingMode.DOWN in the division case ensures consistency in how values are handled across the application.


74-87: Complexity Acknowledgement in calculateResources

Given the previous discussions and the established learning, it's clear that the complexity of this method is intentional to meet specific requirements. The method handles multiple operations and updates both a result map and JSON node, which is crucial for the application's functionality.


98-121: Enhanced Error Handling in getInputValueFromJsonFeature

The method handles potential errors with a broad catch for NumberFormatException and NullPointerException, which is appropriate given the data parsing involved. However, consider adding more specific error messages or logging to help with debugging.

catch (NumberFormatException | NullPointerException e) {
    log.error("Error parsing input value: " + input, e);
    return BigDecimal.ZERO;
}

133-140: Review of calculateResult Method

This method effectively orchestrates multiple utility methods to calculate a result based on dynamic operation specifications. It's well-structured and integrates well with the rest of the application's logic.

health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1)

125-147: Well-implemented exception handling in processExcelFile.

The method correctly handles various exception scenarios that could occur during file processing. The use of specific custom exceptions for different error types is a good practice.

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.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between d41da17 and e88d187.

Files selected for processing (2)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (1 hunks)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1 hunks)
Files not reviewed due to errors (1)
  • health-services/resource-estimation-service/src/main/java/org/egov/processor/service/ExcelParser.java (no review received)
Additional context used
Learnings (1)
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (1)
User: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java:74-87
Timestamp: 2024-06-26T17:22:24.700Z
Learning: The `calculateResources` method in `CalculationUtil.java` is intentionally complex to meet specific design requirements or constraints.
Additional comments not posted (5)
health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CalculationUtil.java (5)

29-31: Constructor Review: Proper Dependency Injection

The constructor correctly injects the PlanUtil dependency, ensuring that the CalculationUtil class can utilize PlanUtil methods effectively.


59-61: Stream Usage in convertAssumptionsToMap

The use of Java streams to convert a list to a map is efficient and clean. This is a good application of modern Java features for collection processing.


71-84: Complexity in calculateResources Method

Given the previous discussions regarding the complexity of this method, it's clear that it is intentionally designed to handle complex scenarios. The nested loops and multiple method calls within them are necessary for the functionality. It's important to ensure that this complexity is well-documented to aid future maintainability.


95-116: Error Handling and Input Validation in getInputValueFromJsonFeature

This method has robust error handling and input validation, which is crucial for data processing functions. The use of custom exceptions and detailed error messages enhances the method's reliability and debuggability.


130-136: Method calculateResult: Streamlined Calculation Process

This method effectively orchestrates the calculation process by fetching input values, retrieving assumption values, and computing the result using another utility method. This modular approach enhances readability and maintainability.

kavi-egov added a commit that referenced this pull request Jun 27, 2024
* HLM Health-HRMS bug fix, user was set to null in hrms update as the t… (#761)

* HLM Health-HRMS bug fix, user was set to null in hrms update as the tenantid was not provided during internal search

* HLM updated hrms user type

* updated type from individual create

* Addressed code review comments

* Added code comments and fixme todo as per code review comments

* HLM updated flyway migration docker version

* Revert "HLM updated flyway migration docker version"

This reverts commit 1f1167e.

* Updated code comments on EmployeeService update method

* Update EmployeeService.java

* Updated code comments on EmployeeService, added changes for NPE handling

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>

* HLM-6185: Added null check for the project task resources list (#767)

* HLM-6185: Added null check for the project task resources list

* HLM-6185: updated transformer logic for project task with beneficiary task and status population

* microplan-ui (#782)

* microplan-ui

* adding HLM-6172 changes

* hiding unique identifier column

* Update build-config.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* adding digti frontend pr 934 changes

* Update build-config.yml

* removing pl tl and template files

* removed unnecessary code

* Delete frontend/microplan-ui/Jenkinsfile

* updating operation to match api changes

* updating operation to match api changes

* Update README.md

* Update README.md

* microplan-ui adding uploadguidelines and removing unnecessary files

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: SriPadma8997-egov <112681948+SriPadma8997-egov@users.noreply.github.com>

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

* Update campaignValidators.ts (#655)

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

* css

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

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

* css

---------

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

* Update campaignUtils.ts

* fixed HLM-5970

* Feat : added boundary validation at data level

* fixes

* local add

* Added boundary validation

* Refactor

* fixed HLM-5935 and HLM-5749

* Refactor

* Feat : updated table

* change campaignid in payload

* Feat : added campaignId

* Update campaignApis.ts

* Update campaignValidators.ts

* refactored

* Refactor

* assigned campaignId

* Refactor

* updated createRequest Schema

* Feat : invalid Status Persist

* status fix

* version-fix

* Update CODEOWNERS

* core version updated and css fix for language dropdown

* refactor (#676)

* Uat signoff (#678)

* change in filter recursive

* lowest level

* added validation related to target sheet headers

* HLM-5916

* download button fixes in summary (#682)

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

* Hlm 5927 (#687)

* change in filter recursive

* lowest level

* added validation for boundary codes to be invalid other than that selected from UI in target upload

* Added Delivery and cycle config for LLIN and SMC both (#688)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

* Value localise in summary screen, api error change

* fixes

* genarate api call fix

* font size change for summary

* login css change

* HLM-5718: SMC delivery config enhancement

* config update

* added config for in between

* fix config for llin

* added mdms integration

---------

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

* Fixed HLM-5988_warning message (#689)

Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>

* download filename fixes (#693)

* download button fixes in summary

* download filename with custom name changes added

---------

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

* download filename fixes (#694)

* download button fixes in summary

* download filename with custom name changes added

* config fix for llin

---------

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

* successful toast message is fixed (#695)

* successful toast message is fixed

* Update UploadData.js

* HLM-5991: Alert Pop UP CR (#696)

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

* HLM-5718 changes (#703)

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

* Localization cache (#706)

* change in filter recursive

* lowest level

* refactored  localization cache logic

* Update README.md (#707)

* Update README.md

* Update README.md

* Update utilities/project-factory/README.md

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

* Update README.md

---------

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

* HLM-5985_made lowest level changes (#708)

* HLM-5985_made lowest level changes

* resolved codeRabbit comments

* Create LOCALSETUP.md (#709)

* Create LOCALSETUP.md

* Refactored config

* Update LOCALSETUP.md

* Update utilities/project-factory/LOCALSETUP.md

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

* Update utilities/project-factory/LOCALSETUP.md

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

* Update utilities/project-factory/LOCALSETUP.md

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

* Update utilities/project-factory/LOCALSETUP.md

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

* Update LOCALSETUP.md

---------

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

* updated the localisation module config

* Refactor config (#713)

* Refactor config

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

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

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

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

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

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

---------

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

* Update postman_collection.json (#714)

* Update postman_collection.json

* Update postman_collection.json

* Delete utilities/project-factory/project_factory_swagger.yml (#715)

* Feat : removed campaignId validation for boundary upload (#718)

* updated the delay for boundary relationship

* added logger for request TODO TEST

will be reverted

* Revert "added logger for request TODO TEST"

This reverts commit d5c2bf5.

* Schema validation (#719)

* Feat : removed campaignId validation for boundary upload

* Feat : added schema validation

* Fixed mdms host

* updated the logger messages

* updated the loggers

* delivery new changes, toast fix, error fix (#716)

* delivery new changes, toast fix, error fix

* new fixes

* fixes

* change text component to field component

* added hierarchy

* fix

* fix

* fix

* fix

* passing hierarchy from props

---------

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

* Schema validation2 (#721)

* Feat : removed campaignId validation for boundary upload

* Feat : added schema validation

* Fixed mdms host

* Feat : added boundary validation

* Feat : optimized product search

* Fix : project mapping fixed (#722)

* Fixed project search (#723)

* smc fixes (#724)

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

* Feat : added boundary confirmation (#727)

* Fix: fixed processing boundary

* Refactor

* fixed HLM-6109 (#729)

* gate fixes validation, ui ux (#731)

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

* integrated panelcard component (#732)

* integrated panelcard component

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/Response.js

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

---------

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

* Update genericUtils.ts (#733)

* updated the folder structure

* Create CHANGELOG.md (#717)

* updated the versions

* Update .gitignore

* Update request.ts (#735)

* fixed generate api issue (#734)

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Create CHANGELOG.md

* gate fixes (#736)

* gate fixes validation, ui ux

* gate fix

---------

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

* added loader in the selecting boundaries (#737)

* Update createAndSearch.ts (#738)

* fix (#739)

* fix

* fix

---------

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

* Patch 3 (#740)

* change in filter recursive

* lowest level

* trimmed underscore and empty spaces

* boundary fix (#742)

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

* Update genericUtils.ts (#746)

* fixed the delivery products issue

* Fixed delivery conditions issue

* Update campaignApis.ts (#747)

* fixed warning toast (#748)

* fixed warning toast

* Update UploadData.js

* fix (#749)

* fix

* fx

* fix

---------

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

* core -update (#751)

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

* fixed stepper issue (#752)

* fixed stepper issue

* Update index.html

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

* fixes (#754)

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

* code fix nabeel (#756)

* fixes

* fix

---------

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

* Updated few loggers (#759)

* updated few loggers flow

* Update utilities/project-factory/src/server/api/campaignApis.ts

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

* Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts

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

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

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

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

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

* Update utilities/project-factory/src/server/api/campaignApis.ts

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

* Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts

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

* Update utilities/project-factory/src/server/utils/genericUtils.ts

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

---------

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

* Updated the user Password generation logic #761

* Update Listener.ts (#730)

* Update Listener.ts

* added try catch logic in producer

* Feat : added parallel batch execution (#767)

* Feat : added parallel batch execution

* Refactor

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

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

---------

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

* fixed the stepper (#765)

* changes config (#769)

* Project type config and added loggers for process of campaign (#772)

* Feat : added themes in generate template (#773)

* fixed the ajv package version for build issue

* Feat : removed xlsx (#776)

* HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT (#778)

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

* css update (#780)

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

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

* HLM-6179 and HLM-6180

* campaign name changes

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Feat : fixed target generation (#781)

* fixed tenantId issue (#784)

* fix: resolved AJV-related Jenkins build issue reference #783 #786 (#787)

* module ui fix

* updated all the package version for build fixes

* fixed kafka-error at target generation (#789)

* updated core version (#791)

* updated core version

* updated css also

* Update campaignValidators.ts (#794)

* Updated the excel generation logic and files

* added changes for configurable column in target sheet (#779)

* change in filter recursive

* lowest level

* made target headers  genearte through mdms schema

* changed config index.ts

* changed config index.ts

* changes for now

* added configurable column logic from schema HLM-6169

* updated validate of target columns through schema

* added masterForColumnSchema in index.ts

* formatted dataManageService

* refactored lock TargetFields func

* removed console.log

* User creation performance improved (#800)

* Feat : Improved user creation performance

* Change status color

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

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

---------

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

* Update genericUtils.ts (#801)

* Hlm 6170 (#802)

* change in filter recursive

* lowest level

* HLM -6170 added logic for only village level data in target sheet and some refactoring

* updated css (#804)

* fixed button issue (#805)

* HLM 6177: Error card implementation in summary screen (#806)

* HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT

* Added Error Cards in summary screen and redirection

---------

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

* added error button styles (#807)

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

* updated popUp css (#808)

* HLM 6178: Implementing New Pop up screen in boundaries (#809)

* added error button styles

* Implementing New Pop up screen in boundaries

---------

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

* Facility changes (#812)

* Feat : changed facility Template

* Feat : locked target templates

* fixed colour issue (#813)

* Updated the project type conversion logic for the             "deliveryType" dont1 and n config

* Unique field added (#814)

* Feat : changed facility Template

* Feat : locked target templates

* Feat : added unique check logic

* Target schema update (#815)

* change in filter recursive

* lowest level

* updated shcema of target columns to be configurable

* removed empty spaces from config index.ts

* Active mapping (#817)

* Feat : changed facility Template

* Feat : locked target templates

* Feat : added unique check logic

* Feat : added mapping via active field

* changes in the schema validation (#816)

* Updated the workbench and css module version

* Feat : added active inactive boundary check (#818)

* Update campaignValidators.ts (#819)

* added active inactive validation (#820)

* changed api call time (#826)

* Feat : added target sum mapping (#825)

* added campaign type as filter (#827)

* Update genericApis.ts (#828)

* Update excelUtils.ts (#829)

* UI issue fixes, icon fix in summary error (#831)

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

* Target columns (#830)

* change in filter recursive

* lowest level

* commit

* Feat : target flow fixed for LLIN-mz

* uat to dev

---------

Co-authored-by: admin1 <nitish@egovernments.org>

* Feat : freezed target columns (#833)

* Target mr dn (#834)

* change in filter recursive

* lowest level

* Feat : skipped validation temporarily

* changes in the target validation (#835)

* fixed error info (#837)

* Added roboto font (#840)

* Feat : added roboto font

* Fixed config

* target validation based on diff campaign types (#843)

* change in filter recursive

* lowest level

* updated validation of target based on campaign type

* fixed validation issue (#844)

* Updated the workbench package version

* fixed validation logic (#846)

* fixed validation logic

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

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

---------

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

* Error messages improved (#848)

* Feat : imporved error messages and initilised utils for tracking process

* Fix ; unused variables fixed

* Feat : improved error messages

* Fix : download error fix (#850)

* Update campaignUtils.ts (#851)

* Update campaignUtils.ts

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

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

---------

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

* Update campaignValidators.ts (#853)

* HLM 6210: Toast, error focus fix and project type reset delivery data fix  (#854)

* HLM-6210: campaign type change reset delivery data fix, summary error focus fix

* summary error focus fix

---------

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

* HLM-6225_added time out according to data (#855)

* Update campaignValidators.ts (#859)

* HLM 6210 (#858)

* HLM-6210: campaign type change reset delivery data fix, summary error focus fix

* summary error focus fix

* parallel search fixes

---------

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

* Remove validation (#852)

* change in filter recursive

* lowest level

* removed unnecessary validation for target

* spacing refactor

* Update campaignValidators.ts (#863)

* Header validation (#861)

* change in filter recursive

* lowest level

* removed unnecessary validation for target

* changed the logic of header validation

* space refactor

* Update campaignUtils.ts (#864)

* fixed ui error (#865)

* Read me (#867)

* change in filter recursive

* lowest level

* removed unnecessary validation for target

* changed the logic of header validation

* fixed portugese language error

* space refactoring

* Update Dockerfile

* Update Dockerfile

* Update migrate.sh

* Update Dockerfile

* Update campaignValidators.ts (#868)

* HLM 6210:campaign type change reset fix (#869)

* HLM-6210: campaign type change reset delivery data fix, summary error focus fix

* summary error focus fix

* parallel search fixes

* campaign type change reset fix

---------

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

* Update excelUtils.ts for sheetHeaders wraping (#870)

* Update package.json

* updated error messages (#871)

* feat : added jaeger-client tracing (#872)

* updated the table config

* Update campaignApis.ts (#875)

* removed the schema and updated the db name

* fixing generate API call, file auto delete, date error (#877)

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

* Trim resource (#878)

* Feat : trimmed resource persist message

* Refactor

* Removed reject error in produce message

* fixed min time, draft logic (#879)

* Update index.ts (#880)

* added min ui error and facility usage (#883)

* added min ui error and facility usage

* changes

* Update campaignUtils.ts (#884)

* HLM 6007 (#885)

* fixing generate API call, file auto delete, date error

* generate api fix

---------

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

* Update Dockerfile

* Feat : docker config update (#886)

* Update Dockerfile (#887)

* Create buildWorkbenchUI.yml

* Update README.md (#917)

* Update buildWorkbenchUI.yml

* Update README.md

* Updated the DB Schema issue of Project-factory

* fixed hierarchy order (#919)

* User flag hcm (#920)

* Feat : docker config update

* Feat : added user create flag

* Refactored

* Update campaignUtils.ts

* Update campaignMappingUtils.ts (#922)

* Ashish egov patch 2 (#921)

* Update index.ts

* Update campaignApis.ts

* Fixed the project type conversion and product duplicate issue

* Update campaignApis.ts (#924)

* Update campaignMappingUtils.ts (#925)

* Update campaignMappingUtils.ts

* Refactored

* Update publishProjectFactory.yml

* Update buildWorkbenchUI.yml

* Update campaignMappingUtils.ts (#926)

* Update request.ts (#928)

* Update request.ts

* Feat : updated httprequest

* Feat : warning response added

* Refactor

* added start and enddate in cycles

* Update campaignApis.ts (#930)

* Update request.ts (#932)

* fixed generate issue (#933)

* Fixed project-type resources duplication

* updated target error messages (#936)

* fixed stepper from draft (#937)

* Update Listener.ts

* delivery type disable fix, product sku name change (#939)

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

* fixed error message issue (#941)

* Redis integration (#940)

* Feat : added redis

* Feat : added redis retry

* updated migration

* fixed

* updated migration

* Delete .vscode/launch.json

* Delete .vscode/settings.json

---------

Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <bhavya.mangal@egovernments.org>
Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org>
Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Swathi-eGov <137176788+Swathi-eGov@users.noreply.github.com>
Co-authored-by: admin1 <nitish@egovernments.org>

* Master flyway imageupdate (#794)

* flyway base image updated

* reverted product changes and removed duplicate attendance code (#768)

* flyway version update

* updated psql version for core services and facility

* flyway update

* HLM throwing custom exception when boundary service call throw an error (#775)

* HLM-6196: Search failing, updated GenericQueryBuilder.java, added changes to get all … (#769)

* HLM Health-HRMS bug fix, user was set to null in hrms update as the t… (#761)

* HLM Health-HRMS bug fix, user was set to null in hrms update as the tenantid was not provided during internal search

* HLM updated hrms user type

* updated type from individual create

* Addressed code review comments

* Added code comments and fixme todo as per code review comments

* HLM updated flyway migration docker version

* Revert "HLM updated flyway migration docker version"

This reverts commit 1f1167e.

* Updated code comments on EmployeeService update method

* Update EmployeeService.java

* Updated code comments on EmployeeService, added changes for NPE handling

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>

* HLM-6196: updated GenericQueryBuilder.java, added changes to get all the fields except Object class

* hlm-6196: update common library reference for dev testing"

* HLM-6196: updated health-service-common version to 1.0.17-SNAPSHOT and added default for included deleted

* HLM-6196: updated genericrepository

* HLM-6196: fixed testcases

* HLM-6196: fixed individual search query error

* taskresource additional fields column added

* HLM-6196: updated health services models TaskResource, added AdditionalField

* HLM-6196: hfreferral, referral, sideeffect - edge case fix

* HLM-6196: removed todo from urlparams

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>
Co-authored-by: Vishal <sarasani.vishalreddy@egovernments.org>

* Hlm 6196 hrms employee search by names fix (#785)

* HLM-6196: updated @component in validators for client reference id validation

* HLM-6196: fixed testcases for stock and individual

* HLM-6196: added missing migration file

* HLM-6196: updated IndividualSearch model, added exclude annotation on individual name

* HLM-6196: rectifying egov-hrms individual search object commit

* HLM-6196: updated health services common for model exclude field fix

* Revert "HLM-6196: updated @component in validators for client reference id validation"

This reverts commit 6e915a0.

* Revert "HLM-6196: fixed testcases for stock and individual"

This reverts commit ce90104.

* HLM-6196: added comments as per code review

* Update IndividualSearch.java

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>

* HLM-6196: updated @component in validators for client reference id va… (#781)

* HLM-6196: updated @component in validators for client reference id validation

* HLM-6196: fixed testcases for stock and individual

* HLM-6196: added missing migration file

* HLM-6196: updated IndividualSearch model, added exclude annotation on individual name

* HLM-6196: rectifying egov-hrms individual search object commit

* HLM-6196: updated health services common for model exclude field fix

* Revert "HLM-6196: updated @component in validators for client reference id validation"

This reverts commit 6e915a0.

* Revert "HLM-6196: fixed testcases for stock and individual"

This reverts commit ce90104.

* Revert "Revert "HLM-6196: updated @component in validators for client reference id validation""

This reverts commit 2218ad3.

* Revert "Revert "HLM-6196: fixed testcases for stock and individual""

This reverts commit 083c516.

* HLM-6196: replaced RuntimeException with CustomException

* HLM-6196: updated to get only message from exception

* HLM-6196: updated individual search as it was with exclude annotation

* Update core-services/egov-hrms/src/main/java/org/egov/hrms/web/validator/EmployeeValidator.java

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

* updated changelog for HCM v1.4 release

* updated changelog for HCM v1.4 release

* Update health-services/product/CHANGELOG.md

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

* Update health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/TaskResource.java

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

* HLM added error stack strace whenever custom exception is thrown while validation duplicate entry

---------

Co-authored-by: kavi_elrey <25226238+kavi-egov@users.noreply.github.com>
Co-authored-by: Vishal <sarasani.vishalreddy@egovernments.org>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding plan-service folder for master merge (#783)

* Adding plan-service folder for master merge

* code review comment.

---------

Co-authored-by: devdatta-egov <nilesh.s@egovernments.org>

* Microplan UI (#793)

* microplan-ui

* adding HLM-6172 changes

* hiding unique identifier column

* Update build-config.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* adding digti frontend pr 934 changes

* Update build-config.yml

* removing pl tl and template files

* removed unnecessary code

* Delete frontend/microplan-ui/Jenkinsfile

* updating operation to match api changes

* updating operation to match api changes

* Update README.md

* Update README.md

* microplan-ui adding uploadguidelines and removing unnecessary files

* adding microplan to micro-ui

* adding microplan folder in microui/web

* Update setupProxy.js

* review changes

* adding review changes

* review changes

* Update Mapping.js

* Update Upload.js

* Update geojsonValidations.js

* Update CreateMicroplan.js

* Update MicroplanPreview.js

* Update MicroplanPreview.js

* Update CreateMicroplan.js

* adding review comments, updage campaign service, removed hardcoded tenent and removed logout util

* removing microplan-ui folder

* Update index.js

* adding review changes, reducing functional complexcity

* updaing microplan css pkg version

* Update jsonToExcelBlob.js

* Update MicroplanCreatedScreen.js

* Update UICustomizations.js

* Update uploadUtils.js

* Update build-config.yml

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: SriPadma8997-egov <112681948+SriPadma8997-egov@users.noreply.github.com>

---------

Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>
Co-authored-by: siddhant-nawale-egov <162107530+siddhant-nawale-egov@users.noreply.github.com>
Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: SriPadma8997-egov <112681948+SriPadma8997-egov@users.noreply.github.com>
Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <bhavya.mangal@egovernments.org>
Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org>
Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Swathi-eGov <137176788+Swathi-eGov@users.noreply.github.com>
Co-authored-by: admin1 <nitish@egovernments.org>
Co-authored-by: Vishal <sarasani.vishalreddy@egovernments.org>
Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com>
Co-authored-by: devdatta-egov <nilesh.s@egovernments.org>
@kavi-egov kavi-egov merged commit c720e8d into master Jun 27, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants