-
Notifications
You must be signed in to change notification settings - Fork 23
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
HCM Admin Console v0.3 Release code changes #1082
Conversation
Update campaignApis.ts
Fix project target mapping
* refactored migration files fro project-factory * updated logic for unique username generation * updated format and id name for user name * removed hash logic for username generation * added indexing on columns * updated idgen seq format for user name in index.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…paign flow (#885) * commit for update-generate-template * updated campaign flow generate template enhancement * just if else changes * some reformatting * update index.ts * added additional valiadtion for parent campaign * updated logic for validating parent campaign * refcatored as per change requests * update index.ts * updated logic for same campaignnumber when paren is present
* Feat : initialised bulk user creation for microplan * Enhanced user bulk upload for microplan * Fixed configs * Merge fix with console * Feat : added columns in user sheet * Added userroles sheet for bulk user template in microplan * Added source microplan while resource creation * changed logic for isSourceMicroplan
Update campaignApis.ts
Update campaignValidators.ts
Update campaignUtils.ts for fixing lastColumn issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (2)
health-services/project-factory/package.json
(2 hunks)health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
(1 hunks)
🧰 Additional context used
📓 Learnings (1)
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts (2)
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:464-465
Timestamp: 2024-12-04T11:51:07.331Z
Learning: In the `health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts` file, the `throwError` function logs errors internally. Therefore, when catching errors and rethrowing using `throwError`, it's not necessary to add extra `logger.error` calls before invoking `throwError`.
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:498-499
Timestamp: 2024-12-04T11:51:01.303Z
Learning: In the `health-services/project-factory` codebase, the `throwError()` function already logs errors internally. Therefore, explicit error logging before calling `throwError()` is unnecessary.
🪛 Biome (1.9.4)
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
[error] 359-359: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 390-390: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 437-437: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
[error] 454-454: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 471-471: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
[error] 489-489: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 227-227: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
[error] 238-238: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
🔇 Additional comments (7)
health-services/project-factory/package.json (2)
3-3
: LGTM: Version bump aligns with v0.3 release
The version increment from 0.2.0 to 0.3.0 follows semantic versioning and correctly reflects this being a minor release with new features.
29-29
: 🧹 Nitpick (assertive)
Verify the impact of allowing minor version updates for exceljs
Changing from fixed version "4.4.0" to "^4.4.0" allows automatic minor version updates. This is inconsistent with other dependencies that use fixed versions and could potentially introduce compatibility issues.
Let's verify the latest versions and any breaking changes:
Consider maintaining consistency with other dependencies by either:
- Keep using fixed version "4.4.0" like most other dependencies
- Or document the rationale for allowing minor updates for this specific package
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts (5)
27-28
: 🛠️ Refactor suggestion
Remove redundant logger.error
call before throwError
Since throwError
already logs errors internally, the explicit call to logger.error
at line 27 is unnecessary and can be removed to prevent duplicate logging.
227-227
: 🛠️ Refactor suggestion
Avoid reassigning function parameters
Reassigning the function parameter newData
can lead to confusion and unintended side effects. It's better to use a new variable for the transformed data.
Also applies to: 238-238
🧰 Tools
🪛 Biome (1.9.4)
[error] 227-227: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
359-359
: 🧹 Nitpick (assertive)
Use template literals instead of string concatenation
Using template literals improves readability and consistency in logging statements.
Apply these changes:
At line 359:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
At line 390:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
At line 454:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
At line 489:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
Also applies to: 390-390, 454-454, 489-489
🧰 Tools
🪛 Biome (1.9.4)
[error] 359-359: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
437-437
:
Ensure safe usage of optional chaining to prevent TypeErrors
Destructuring from a potentially undefined object can lead to a TypeError
if the object is undefined
. Add a check to ensure the object exists before destructuring.
Consider modifying the code as follows:
At line 437:
- const { tenantId } = request?.body?.parentCampaign || request?.parentCampaign;
+ const parentCampaign = request?.body?.parentCampaign || request?.parentCampaign;
+ if (parentCampaign) {
+ const { tenantId } = parentCampaign;
+ // Continue with logic using tenantId
+ } else {
+ // Handle the case when parentCampaign is undefined
+ }
At line 471:
- const { tenantId } = request?.body?.parentCampaign || request?.parentCampaign;
+ const parentCampaign = request?.body?.parentCampaign || request?.parentCampaign;
+ if (parentCampaign) {
+ const { tenantId } = parentCampaign;
+ // Continue with logic using tenantId
+ } else {
+ // Handle the case when parentCampaign is undefined
+ }
Also applies to: 471-471
🧰 Tools
🪛 Biome (1.9.4)
[error] 437-437: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
71-73
: 🛠️ Refactor suggestion
Use throwError
for consistent error handling
In the catch
block, you're rethrowing the error using throw error;
. To maintain consistent error handling across the application, consider using the throwError
function.
Apply this diff:
} catch (error) {
logger.error("Error fetching file URLs:", error);
- throw error;
+ throwError("FILE_FETCH", 500, "FILE_FETCH_ERROR", "Error fetching file URLs");
}
Likely invalid or redundant comment.
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
Outdated
Show resolved
Hide resolved
…gnUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (5)
.github/workflows/buildWorkbenchUI.yml
(0 hunks).github/workflows/publishAllPackages.yml
(0 hunks).github/workflows/publishAllPackagesRelease.yml
(0 hunks).github/workflows/publishProjectFactory.yml
(1 hunks)health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
(1 hunks)
💤 Files with no reviewable changes (3)
- .github/workflows/publishAllPackagesRelease.yml
- .github/workflows/publishAllPackages.yml
- .github/workflows/buildWorkbenchUI.yml
🧰 Additional context used
📓 Learnings (1)
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts (2)
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:464-465
Timestamp: 2024-12-04T11:51:07.331Z
Learning: In the `health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts` file, the `throwError` function logs errors internally. Therefore, when catching errors and rethrowing using `throwError`, it's not necessary to add extra `logger.error` calls before invoking `throwError`.
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:498-499
Timestamp: 2024-12-04T11:51:01.303Z
Learning: In the `health-services/project-factory` codebase, the `throwError()` function already logs errors internally. Therefore, explicit error logging before calling `throwError()` is unnecessary.
🪛 actionlint (1.7.4)
.github/workflows/publishProjectFactory.yml
21-21: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
28-28: shellcheck reported issue in this script: SC2086:info:1:46: Double quote to prevent globbing and word splitting
(shellcheck)
35-35: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT
instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
(deprecated-commands)
47-47: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT
instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
(deprecated-commands)
60-60: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
63-63: the runner of "actions/setup-node@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 yamllint (1.35.1)
.github/workflows/publishProjectFactory.yml
[warning] 3-3: truthy value should be one of [false, true]
(truthy)
[error] 5-5: trailing spaces
(trailing-spaces)
[error] 11-11: trailing spaces
(trailing-spaces)
🪛 Biome (1.9.4)
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
[error] 360-360: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 391-391: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 438-438: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
[error] 455-455: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 472-472: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
[error] 490-490: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 228-228: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
[error] 239-239: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
🔇 Additional comments (9)
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts (9)
27-28
: Remove redundant logger.error
call before throwError
Since the throwError
function logs errors internally, the explicit call to logger.error
at line 27 is unnecessary and can be removed to prevent duplicate logging.
321-322
: Remove redundant logger.error
call before throwError
Since throwError
already logs errors internally, the logger.error(error);
at line 321 is unnecessary and can be removed to prevent duplicate logging.
228-239
: 🧹 Nitpick (assertive)
Avoid reassigning function parameter newData
Reassigning the function parameter newData
can lead to confusion and unintended side effects. It's better to use a new local variable for transformations.
Consider the following changes:
At line 228:
- newData = newData.map((newRow: any) => {
+ const transformedData = newData.map((newRow: any) => {
At line 239:
- newData = newData.map((newRow: any, rowIndex: number) => {
+ const updatedData = transformedData.map((newRow: any, rowIndex: number) => {
Then, use updatedData
in subsequent operations.
🧰 Tools
🪛 Biome (1.9.4)
[error] 228-228: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
[error] 239-239: Reassigning a function parameter is confusing.
The parameter is declared here:
Use a local variable instead.
(lint/style/noParameterAssign)
360-360
: 🧹 Nitpick (assertive)
Use template literals instead of string concatenation
At line 360, string concatenation is used in a logger statement. Using template literals improves readability and consistency.
Suggested change:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
🧰 Tools
🪛 Biome (1.9.4)
[error] 360-360: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
391-391
: 🧹 Nitpick (assertive)
Use template literals instead of string concatenation
At line 391, string concatenation is used in a logger statement. Consider using template literals for consistency.
Suggested change:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
🧰 Tools
🪛 Biome (1.9.4)
[error] 391-391: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
438-438
:
Potential TypeError
due to unsafe optional chaining
At line 438, destructuring tenantId
from request?.body?.parentCampaign || request?.parentCampaign
without checking if the result is defined can lead to a TypeError
if both are undefined
.
Consider adding a null check before destructuring:
const parentCampaign = request?.body?.parentCampaign || request?.parentCampaign;
if (parentCampaign) {
const { tenantId } = parentCampaign;
// Use tenantId as needed
} else {
// Handle the case where parentCampaign is undefined
}
🧰 Tools
🪛 Biome (1.9.4)
[error] 438-438: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
472-472
:
Potential TypeError
due to unsafe optional chaining
At line 472, destructuring tenantId
from request?.body?.parentCampaign || request?.parentCampaign
without verifying that the result is defined can cause a TypeError
if both are undefined
.
Consider modifying the code to ensure safety:
const parentCampaign = request?.body?.parentCampaign || request?.parentCampaign;
if (parentCampaign) {
const { tenantId } = parentCampaign;
// Proceed with tenantId
} else {
// Handle the undefined case appropriately
}
🧰 Tools
🪛 Biome (1.9.4)
[error] 472-472: Unsafe usage of optional chaining.
If it short-circuits with 'undefined' the evaluation will throw TypeError here:
(lint/correctness/noUnsafeOptionalChaining)
490-490
: 🧹 Nitpick (assertive)
Use template literals instead of string concatenation
At line 490, string concatenation is used in a logger statement. For better readability, use template literals.
Suggested change:
- logger.info("Project search params " + JSON.stringify(projectSearchParams))
+ logger.info(`Project search params ${JSON.stringify(projectSearchParams)}`)
🧰 Tools
🪛 Biome (1.9.4)
[error] 490-490: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
71-73
: 🧹 Nitpick (assertive)
Use throwError
for consistent error handling
At line 73, the error is rethrown using throw error;
. To maintain consistent error handling across the application, consider using throwError
instead of directly throwing the error.
Suggested change:
- throw error;
+ throwError("FILE_FETCH", 500, "FILE_FETCH_ERROR", "Error fetching file URLs");
Ensure that this aligns with your application's error handling practices.
Likely invalid or redundant comment.
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
Show resolved
Hide resolved
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
Show resolved
Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (1)
health-services/project-factory/src/server/utils/transforms/localisationMessageConstructor.ts
(1 hunks)
🔇 Additional comments (4)
health-services/project-factory/src/server/utils/transforms/localisationMessageConstructor.ts (4)
15-17
: Specify explicit types instead of any
for function parameters
Using any
undermines TypeScript's type safety features and can lead to runtime errors. Defining explicit types for function parameters enhances code reliability and maintainability.
58-59
: Specify explicit types instead of any
for function parameters
Using any
undermines TypeScript's type safety features and can lead to runtime errors. Defining explicit types for function parameters enhances code reliability and maintainability.
34-34
:
Fix parameter order in boundaryMap.forEach
callback
In the boundaryMap.forEach
method, the callback parameters appear to be reversed. The forEach
method for a Map
provides (value, key)
as arguments. Currently, code
is being treated as the key and boundary
as the value, which may lead to incorrect data processing.
Apply this diff to correct the parameter order:
-boundaryMap.forEach((code: string, boundary: any) => {
+boundaryMap.forEach((boundary: any, code: string) => {
111-116
:
Propagate upload failures to the caller
If any chunks fail to upload after exhausting retries, the current implementation logs a warning but does not inform the caller, potentially leading to silent data loss. It's crucial to notify the calling function of these failures so that appropriate action can be taken.
Apply this diff to propagate failures:
const uploadInChunks = async (messages: any, chunkSize: any, tenantId: any, request: any) => {
+ let allSuccess = true;
// Existing code...
}
if (!success) {
+ allSuccess = false;
logger.warn(`Skipping chunk ${Math.floor(i / chunkSize) + 1} after exhausting retries`);
}
}
logger.info("Finished processing all chunks");
+ if (!allSuccess) {
+ throw new Error("One or more chunks failed to upload");
+ }
};
health-services/project-factory/src/server/utils/transforms/localisationMessageConstructor.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving based on jagan's feedback
* HLM service request, updated DataTypeEnum (#872) * Service request changelog 1.5 (#875) * Added changelog and upgraded the versions for household, individual and service request * Update core-services/service-request/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/individual/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HLM fixed merge issues * HLM fixed merge issues * HCMPRE-413: updated the changelog as per code review comments * Update health-services/project/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HCMPRE-424: fixed hrms call from pgr-service * HCMPRE-424: updated as per code review comments * Create branch-name-validator (#960) * Create branch-name-validator * Update branch-name-validator * Update .github/workflows/branch-name-validator Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/branch-name-validator 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 branch-name-validator * Rename branch-name-validator to branch-name-validator.yml * Added census-service in build-config (#990) * [HCMPRE-658] Refractor resource-estimation-service to resource-generator (#910) Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> * Update package.json * Update tsconfig.json * Added configs and env dependencies * dockerfile update * Update tsconfig.json * Update tsconfig.json * refactored * HCM Admin Console v0.3 Release code changes (#1082) * kafka fix for large messages * Update genericUtils.ts * Update campaignValidators.ts * Fixed the mdms search path keys * fix of migration script * fix on repeated key * Update campaignApis.ts * Update campaignApis.ts * Update campaignUtils.ts * Update campaignUtils.ts * Update campaignUtils.ts * Fix project target mapping * refactored migration files fro project-factory (#867) * refactored migration files fro project-factory * updated logic for unique username generation * updated format and id name for user name * removed hash logic for username generation * added indexing on columns * updated idgen seq format for user name in index.ts * Update health-services/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated logic for regenerate if campaign type differs (#876) * id generation throw error update * Enhance generate template for user and facility in update ongoing campaign flow (#885) * commit for update-generate-template * updated campaign flow generate template enhancement * just if else changes * some reformatting * update index.ts * added additional valiadtion for parent campaign * updated logic for validating parent campaign * refcatored as per change requests * update index.ts * updated logic for same campaignnumber when paren is present * updated the campaign name logic along with handling isfailed status too (#888) * updating campaign name same as parent name and number too * updated target template for updating ongoing campaign (#893) * Microplan bulk user creation (#890) * Feat : initialised bulk user creation for microplan * Enhanced user bulk upload for microplan * Fixed configs * Merge fix with console * Feat : added columns in user sheet * Added userroles sheet for bulk user template in microplan * Added source microplan while resource creation * changed logic for isSourceMicroplan * Update campaignApis.ts * Update campaignValidators.ts * changes for campaign update flow * Update campaignUtils.ts * Integrated required error messages * added numeric check in microplan phone number * Implemented no data validation * added logic for creating projects , project facility and project staff on newly added boundaries (#917) * updated target template for updating ongoing campaign * update flow campaign mapping * updated flow campaign mapping * added logic for project, project facility and project staff creation on newly added boundaries * removed one useless func * removed await from a func * removed console.logs * added some minor enhancemnets * added one edge case scenario * changed request limit to 1 mb * Feat : added locksheet filter for user microplan creation * updated logic for regenerate if campaign type differs (#876) * Enhancement for microplan user creation (#940) * some modifications for edge cases (#930) * added commit for testing update campaign flow * some chenages related to type boundary in data create api * /* MODIFIED FOR LTS UPGRADE */ * Microplan user enhancement * Some changes regarding microplan user and boundary * added some null checks * /* Temporay fix for project creation of LLIN since the structure of delivery rules is getting changed */ * Revert "/* MODIFIED FOR LTS UPGRADE */" This reverts commit 52ed772. * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * added code to add lat long in the project-factory apis (#951) * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * Fixed code to manage create * fixed the build * added for field protection on sheet data * Facility microplan validation (#975) * Microplan facility validation * Enhancement in microplan validations * Microplan sheet lock * Enhanced for multiple sheetErrors in additionalDetails * Update campaignApis.ts * fixes for filestore and unfreezing boundary code mandatory columns (#984) * Update CODEOWNERS * Update campaignValidators.ts (#987) * some correction of error after changes from microplan code merge (#988) * some correction of error after changes from microplan code merge * added question mark * added localization fix (#993) Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> * Update campaignApis.ts (#994) * Added some fixes for the project transformation * Update projectTypeUtils.ts * Update campaignUtils.ts * Removed date Update projectTypeUtils.ts #1006 * HCEMPRE-809-Boundary-geometry-codes (#1011) * added localization fix * added logic for boundaryGeometryManagement * fixed some things * fixed campaign search * update project facility and staff mappings of exisitng facilities and users (#998) * some correction of error after changes from microplan code merge * added logic for updating mapping of existing facilitie and users * resolved comments by jagan on the pr for delinking and linking project resources * fetchProjectsWithBoundaryCodeAndName fucntion update * Update campaignValidators.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added code to add lat long in the project-factory apis (#1019) * Project staff mapping correction from uuid to userserviceuuid (#1022) * some correction of error after changes from microplan code merge * corrected for mapping of project staff * added changes for project-resource mapping (#1028) * added changes for project-resource mapping * changed the variable name to boundaryProjectMappingForProjectResourceCreation from newBoundaryProjectMapping * renamed the entity --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Added logic to retry in project campaign create (#1031) * not needed to update every resource in update flow (#1036) * not needed to update every resource in update flow * added changes for if boundaries present in update flow all resources are mandate * Some checks enhancement (#1042) * Update genericApis.ts (#1043) * Update campaignValidators.ts (#1046) * consolidate resources array in update campaign flow (#1051) * consolidate resources array in update campaign flow * spelling correct * Search criteria object corrected (#1052) * consolidate resources array in update campaign flow * data search criteria id has to be an array of strings * spelling * some more corrections regarding search criteria body * Boundaries consolidate after creating child campaign (#1056) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * Boundaries correction (#1058) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changes in extracing boundaries from campaign object * Missing resources in chid campaign to be added from parent camaig logic refactored (#1059) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored logic for adding missing resources from parent campaign * Correction datatocreate column from status to userservice uuids (#1061) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changed data to create column from user sheet * Hide Boundary and Target Old Columns (#1062) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * hide boundary code old and target old * Corrected target update flow (#1065) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * corrected target mapping in update flow * Total count of Campaigns if only is active true (#1066) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * count will be only of active campaigns * HCMPRE-1212:: migrated to point only to MMDS v2 api * Update index.ts * User/facility inactive (#1070) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * added logic for making exiting user facility inactive --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Refactor facility mappings (#1072) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored facility mappings * Created enity for boundary * updated the boundary relationship function * Update index.ts * fixed some localization issue (#1075) * fixed some localization issue * fixed * Target update while campaign update flow (#1078) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * logic for updating targets * some refactor for adding logs and index.ts * updated the boundary localisation name --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed some localization issue (#1079) * fixed some localization issue * fixed * fixed a issue * reverted failed campaign is active true from false (#1080) * reverted failed campaign is active true from false * took constants from index * refactor * Merge branch 'project-factory-kafka-fix' into console * Changed hierarchyFectch to v2 (#1077) * Changed hierarchyFectch to v2 * Changed messages * Merge branch 'project-factory-kafka-fix' into hierarchyFetchV2 --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * calll generate when create completes for type boundary management * auto generate resource if there is no previous generated history * Fixed crashloop issue (#1084) * Fixed crashloop issue * Update dataManageService.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * changed the master from hierarchyConfig to HierarchySchema (#1086) * getting boundaries split on logic change (#1088) * fixed some localization issue (#1090) * fixed some localization issue * fixed * fixed a issue * integrated microplan with console * fixxed index * fixed crashloop (#1091) * added validation for boundary bulk upload (#1092) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refcatored diffferent tab separation (#1093) * added timeout (#1095) * Microplan integration :: set start date to tommorow (#1096) * set start date to tommorow * updated end date * Enhance PlanFacility object (#1099) * validation for update template in create flow (#1100) * removed await (#1103) * some correction (#1104) * logic for updating targets only when present in resources array in update flow (#1105) * updated (#1106) * updated * added fix for the redis error in logs --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added error responder (#1107) * refactored download api (#1108) * Cache issue fix(#1109) * refactored download api * refactor --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * made disable of cache always during boundary generate (#1110) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Redis cache key deleted (#1113) * removed await * delete cache from boundary relationship search * updated redis delete func * Revert "removed await" This reverts commit a5acb54. * Update redisUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * updated redis delete func (#1114) * removed cache from boundary relation create (#1115) * corrected params of auto generate after download api (#1116) * refactored consolidate (#1119) * fix on the fetch from microplan Update campaignUtils.ts (#1120) * Update microplanUtils.ts (#1123) * addded localization function (#1125) * Update SearchCriteria.ts * made createandtransfrom localization as await to upsert all localization in boundary management create flow (#1127) * added logs in handledropdownthings (#1128) * Fixed district missing issue (#1129) * Facility Village List For microplan and dropdown fix (#1130) * Facility Village List For microplan and dropdown fix * Optional chaining * Reverted recievedDropdown Changes * removed localization caceh in boundary generate flow for hierarchy module (#1133) * planFacility create Fix (#1132) * fixed the localisation cache on multiple data creates in boundary * Revert "fixed the localisation cache on multiple data creates in boundary" This reverts commit 94eb970. * Facility fix generation for microplan (#1134) * planFacility create Fix * Fixed Facility Generation for microplan * added the count info of the localisation upsert (#1144) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Microplan integrated with console for facility , user & target (#1151) * set start date to tommorow * updated end date * added code for target sheet * fixed * added mdms call * microplan integration changes added for target ,facility & user * undo changes * Update microplanIntergration.ts * saving all the progress on the integration * project facility mapping done * Update microplanIntergration.ts * Update microplanIntergration.ts * Update microplanIntergration.ts * target & facility integration completed statically * completed facility & target file created based on microplan * added static for user * Added user related changes * added the user integartion * added target and facility in resources array of campaign from microplan * added user in resources array in campaign object * Update microplanIntergration.ts * revert the others * Update index.ts * Cleaned up code --------- Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> * added missing default tenantid (#1152) * Boundary locale fix (#1153) * planFacility create Fix * Fixed boundary validation for different locales --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * removed duplicate key (#1154) * Logs for reordering added (#1161) * added missing default tenantid * added logs for reordering before project creation * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Readme for microplans (#1160) * Readme for microplans * Fixed boolean type * Optimized isMicroplanRequest * Optimizing roles for microplan (#1164) * Improved some performance with huge campaign object (#1165) * Trying optimised code by chatgpt * added 4mb limit * Update app.ts * Updted the comments * Changes for pollutils and reorder * Update pollUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> * Added fixes for error during processing (#1172) * added missing default tenantid * added try catch * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed the hard codings in the code (#1170) * fixed the hard codings in the code * fixed * Added filter check for the fetch from microplan if it has already some resources * fixed hardcoding in target flow (#1175) * fixed hardcoding in target flow * fixed * fixed * Update campaignApis.ts (#1177) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update genericUtils.ts (#1178) * changed the campaig key to activity (#1180) * added missing default tenantid * Update campaignUtils.ts * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * handled failed generations in downlaod api (#1185) * Change for roles name change (#1187) * added search before update in fetch all datas (#1190) * added seacrh before update in fetch all datas * Change for roles name change (#1187) --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * formatted and made promise all to do a promise all to make calls parallely * filtered the plan facility response to have only facility which has only service boundarires * added hierarchy filteration from mdms (#1188) * added hierarchy filteration from mdms * did some hardcoding * fixed fetching of headers * added some logs * added extra loggers for fetch from microplan activities (#1193) * added extra loggers for fetch from microplan activities * Update microplanIntergration.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added retry in localization upsert (#1194) * Adding the additonal loggers to know more informs on microplan integration * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed integration (#1197) * Global handler (#1199) * Change for roles name change * Global exception handler integrated * String logger * Update app.ts * added heap memory log & created a env variable for incomingRequestPay… …loadLimit (#1201) * added heap memory log & created a env variable for incomingRequestPayloadLimit * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Set memory limit and added log off avaiable, max limits (#1202) * added logs to check current value * Update app.ts * Update Dockerfile * Update Dockerfile * Update app.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Handle for google sheet formulas (#1207) * Update microplanValidators.ts (#1213) * Update microplanValidators.ts * Update microplanValidators.ts * Update microplanValidators.ts * Localised roles (#1217) * added change log for admin console version 0.3 (#1224) * Pvar validation (#1225) * product variant validation added * Optimized validations * Refactored * Logger error fix * Refactor * Refactor * refactored project reosurce mapping logic (#1204) * refactored project reosurce mapping logic * added new function ot search project after campaign creation time * added reference id params in project search * added logic for adding resources only for newly created projects * refactored and code clean up for project resource mapppings in update and create flow * refactor getProjectMappingBody func * some condition check * correction * removed project departments * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * added changes for performance testing (#1236) * added changes for performance testing * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * try catch handling * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: ansh-egov <137172017+ansh-egov@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 health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#1244) * Update campaignValidators.ts * Update campaignValidators.ts * add * added new config values * Other configs (#1250) * add * added new config values * Update request.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Updating debug function for error handeling (#1243) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update dataManageService.ts * Applied code rabbit changes * refactored sheet consolidate logic (#1254) * refactored sheet consolidate logic * Applied code rabbit changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refactor sheet consolidate for target (#1255) * Update package.json * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * removed other ui workflows * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * consolidate sheet handle logic change (#1256) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com> * Changed docker file * package changes * dockerfile revert * changed package json * Update package.json * reverted other folders * reverted * Update settings.json --------- Co-authored-by: kanishq-egov <138671649+kanishq-egov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: kanishq-egov <kanishq.bhatnagar@egovernments.org> Co-authored-by: Sathish P <sathish.p@egovernments.org> Co-authored-by: tanishi-egov <tanishi.goyal@egovernments.org> Co-authored-by: Palak Garg <86659286+palak-egov@users.noreply.github.com> Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com>
* HLM service request, updated DataTypeEnum (#872) * Service request changelog 1.5 (#875) * Added changelog and upgraded the versions for household, individual and service request * Update core-services/service-request/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/individual/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HLM fixed merge issues * HLM fixed merge issues * HCMPRE-413: updated the changelog as per code review comments * Update health-services/project/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HCMPRE-424: fixed hrms call from pgr-service * HCMPRE-424: updated as per code review comments * Create branch-name-validator (#960) * Create branch-name-validator * Update branch-name-validator * Update .github/workflows/branch-name-validator Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/branch-name-validator 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 branch-name-validator * Rename branch-name-validator to branch-name-validator.yml * Added census-service in build-config (#990) * [HCMPRE-658] Refractor resource-estimation-service to resource-generator (#910) Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> * Update package.json * Update tsconfig.json * Added configs and env dependencies * dockerfile update * Update tsconfig.json * Update tsconfig.json * refactored * HCM Admin Console v0.3 Release code changes (#1082) * kafka fix for large messages * Update genericUtils.ts * Update campaignValidators.ts * Fixed the mdms search path keys * fix of migration script * fix on repeated key * Update campaignApis.ts * Update campaignApis.ts * Update campaignUtils.ts * Update campaignUtils.ts * Update campaignUtils.ts * Fix project target mapping * refactored migration files fro project-factory (#867) * refactored migration files fro project-factory * updated logic for unique username generation * updated format and id name for user name * removed hash logic for username generation * added indexing on columns * updated idgen seq format for user name in index.ts * Update health-services/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated logic for regenerate if campaign type differs (#876) * id generation throw error update * Enhance generate template for user and facility in update ongoing campaign flow (#885) * commit for update-generate-template * updated campaign flow generate template enhancement * just if else changes * some reformatting * update index.ts * added additional valiadtion for parent campaign * updated logic for validating parent campaign * refcatored as per change requests * update index.ts * updated logic for same campaignnumber when paren is present * updated the campaign name logic along with handling isfailed status too (#888) * updating campaign name same as parent name and number too * updated target template for updating ongoing campaign (#893) * Microplan bulk user creation (#890) * Feat : initialised bulk user creation for microplan * Enhanced user bulk upload for microplan * Fixed configs * Merge fix with console * Feat : added columns in user sheet * Added userroles sheet for bulk user template in microplan * Added source microplan while resource creation * changed logic for isSourceMicroplan * Update campaignApis.ts * Update campaignValidators.ts * changes for campaign update flow * Update campaignUtils.ts * Integrated required error messages * added numeric check in microplan phone number * Implemented no data validation * added logic for creating projects , project facility and project staff on newly added boundaries (#917) * updated target template for updating ongoing campaign * update flow campaign mapping * updated flow campaign mapping * added logic for project, project facility and project staff creation on newly added boundaries * removed one useless func * removed await from a func * removed console.logs * added some minor enhancemnets * added one edge case scenario * changed request limit to 1 mb * Feat : added locksheet filter for user microplan creation * updated logic for regenerate if campaign type differs (#876) * Enhancement for microplan user creation (#940) * some modifications for edge cases (#930) * added commit for testing update campaign flow * some chenages related to type boundary in data create api * /* MODIFIED FOR LTS UPGRADE */ * Microplan user enhancement * Some changes regarding microplan user and boundary * added some null checks * /* Temporay fix for project creation of LLIN since the structure of delivery rules is getting changed */ * Revert "/* MODIFIED FOR LTS UPGRADE */" This reverts commit 52ed772. * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * added code to add lat long in the project-factory apis (#951) * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * Fixed code to manage create * fixed the build * added for field protection on sheet data * Facility microplan validation (#975) * Microplan facility validation * Enhancement in microplan validations * Microplan sheet lock * Enhanced for multiple sheetErrors in additionalDetails * Update campaignApis.ts * fixes for filestore and unfreezing boundary code mandatory columns (#984) * Update CODEOWNERS * Update campaignValidators.ts (#987) * some correction of error after changes from microplan code merge (#988) * some correction of error after changes from microplan code merge * added question mark * added localization fix (#993) Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> * Update campaignApis.ts (#994) * Added some fixes for the project transformation * Update projectTypeUtils.ts * Update campaignUtils.ts * Removed date Update projectTypeUtils.ts #1006 * HCEMPRE-809-Boundary-geometry-codes (#1011) * added localization fix * added logic for boundaryGeometryManagement * fixed some things * fixed campaign search * update project facility and staff mappings of exisitng facilities and users (#998) * some correction of error after changes from microplan code merge * added logic for updating mapping of existing facilitie and users * resolved comments by jagan on the pr for delinking and linking project resources * fetchProjectsWithBoundaryCodeAndName fucntion update * Update campaignValidators.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added code to add lat long in the project-factory apis (#1019) * Project staff mapping correction from uuid to userserviceuuid (#1022) * some correction of error after changes from microplan code merge * corrected for mapping of project staff * added changes for project-resource mapping (#1028) * added changes for project-resource mapping * changed the variable name to boundaryProjectMappingForProjectResourceCreation from newBoundaryProjectMapping * renamed the entity --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Added logic to retry in project campaign create (#1031) * not needed to update every resource in update flow (#1036) * not needed to update every resource in update flow * added changes for if boundaries present in update flow all resources are mandate * Some checks enhancement (#1042) * Update genericApis.ts (#1043) * Update campaignValidators.ts (#1046) * consolidate resources array in update campaign flow (#1051) * consolidate resources array in update campaign flow * spelling correct * Search criteria object corrected (#1052) * consolidate resources array in update campaign flow * data search criteria id has to be an array of strings * spelling * some more corrections regarding search criteria body * Boundaries consolidate after creating child campaign (#1056) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * Boundaries correction (#1058) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changes in extracing boundaries from campaign object * Missing resources in chid campaign to be added from parent camaig logic refactored (#1059) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored logic for adding missing resources from parent campaign * Correction datatocreate column from status to userservice uuids (#1061) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changed data to create column from user sheet * Hide Boundary and Target Old Columns (#1062) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * hide boundary code old and target old * Corrected target update flow (#1065) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * corrected target mapping in update flow * Total count of Campaigns if only is active true (#1066) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * count will be only of active campaigns * HCMPRE-1212:: migrated to point only to MMDS v2 api * Update index.ts * User/facility inactive (#1070) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * added logic for making exiting user facility inactive --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Refactor facility mappings (#1072) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored facility mappings * Created enity for boundary * updated the boundary relationship function * Update index.ts * fixed some localization issue (#1075) * fixed some localization issue * fixed * Target update while campaign update flow (#1078) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * logic for updating targets * some refactor for adding logs and index.ts * updated the boundary localisation name --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed some localization issue (#1079) * fixed some localization issue * fixed * fixed a issue * reverted failed campaign is active true from false (#1080) * reverted failed campaign is active true from false * took constants from index * refactor * Merge branch 'project-factory-kafka-fix' into console * Changed hierarchyFectch to v2 (#1077) * Changed hierarchyFectch to v2 * Changed messages * Merge branch 'project-factory-kafka-fix' into hierarchyFetchV2 --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * calll generate when create completes for type boundary management * auto generate resource if there is no previous generated history * Fixed crashloop issue (#1084) * Fixed crashloop issue * Update dataManageService.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * changed the master from hierarchyConfig to HierarchySchema (#1086) * getting boundaries split on logic change (#1088) * fixed some localization issue (#1090) * fixed some localization issue * fixed * fixed a issue * integrated microplan with console * fixxed index * fixed crashloop (#1091) * added validation for boundary bulk upload (#1092) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refcatored diffferent tab separation (#1093) * added timeout (#1095) * Microplan integration :: set start date to tommorow (#1096) * set start date to tommorow * updated end date * Enhance PlanFacility object (#1099) * validation for update template in create flow (#1100) * removed await (#1103) * some correction (#1104) * logic for updating targets only when present in resources array in update flow (#1105) * updated (#1106) * updated * added fix for the redis error in logs --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added error responder (#1107) * refactored download api (#1108) * Cache issue fix(#1109) * refactored download api * refactor --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * made disable of cache always during boundary generate (#1110) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Redis cache key deleted (#1113) * removed await * delete cache from boundary relationship search * updated redis delete func * Revert "removed await" This reverts commit a5acb54. * Update redisUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * updated redis delete func (#1114) * removed cache from boundary relation create (#1115) * corrected params of auto generate after download api (#1116) * refactored consolidate (#1119) * fix on the fetch from microplan Update campaignUtils.ts (#1120) * Update microplanUtils.ts (#1123) * addded localization function (#1125) * Update SearchCriteria.ts * made createandtransfrom localization as await to upsert all localization in boundary management create flow (#1127) * added logs in handledropdownthings (#1128) * Fixed district missing issue (#1129) * Facility Village List For microplan and dropdown fix (#1130) * Facility Village List For microplan and dropdown fix * Optional chaining * Reverted recievedDropdown Changes * removed localization caceh in boundary generate flow for hierarchy module (#1133) * planFacility create Fix (#1132) * fixed the localisation cache on multiple data creates in boundary * Revert "fixed the localisation cache on multiple data creates in boundary" This reverts commit 94eb970. * Facility fix generation for microplan (#1134) * planFacility create Fix * Fixed Facility Generation for microplan * added the count info of the localisation upsert (#1144) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Microplan integrated with console for facility , user & target (#1151) * set start date to tommorow * updated end date * added code for target sheet * fixed * added mdms call * microplan integration changes added for target ,facility & user * undo changes * Update microplanIntergration.ts * saving all the progress on the integration * project facility mapping done * Update microplanIntergration.ts * Update microplanIntergration.ts * Update microplanIntergration.ts * target & facility integration completed statically * completed facility & target file created based on microplan * added static for user * Added user related changes * added the user integartion * added target and facility in resources array of campaign from microplan * added user in resources array in campaign object * Update microplanIntergration.ts * revert the others * Update index.ts * Cleaned up code --------- Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> * added missing default tenantid (#1152) * Boundary locale fix (#1153) * planFacility create Fix * Fixed boundary validation for different locales --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * removed duplicate key (#1154) * Logs for reordering added (#1161) * added missing default tenantid * added logs for reordering before project creation * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Readme for microplans (#1160) * Readme for microplans * Fixed boolean type * Optimized isMicroplanRequest * Optimizing roles for microplan (#1164) * Improved some performance with huge campaign object (#1165) * Trying optimised code by chatgpt * added 4mb limit * Update app.ts * Updted the comments * Changes for pollutils and reorder * Update pollUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> * Added fixes for error during processing (#1172) * added missing default tenantid * added try catch * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed the hard codings in the code (#1170) * fixed the hard codings in the code * fixed * Added filter check for the fetch from microplan if it has already some resources * fixed hardcoding in target flow (#1175) * fixed hardcoding in target flow * fixed * fixed * Update campaignApis.ts (#1177) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update genericUtils.ts (#1178) * changed the campaig key to activity (#1180) * added missing default tenantid * Update campaignUtils.ts * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * handled failed generations in downlaod api (#1185) * Change for roles name change (#1187) * added search before update in fetch all datas (#1190) * added seacrh before update in fetch all datas * Change for roles name change (#1187) --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * formatted and made promise all to do a promise all to make calls parallely * filtered the plan facility response to have only facility which has only service boundarires * added hierarchy filteration from mdms (#1188) * added hierarchy filteration from mdms * did some hardcoding * fixed fetching of headers * added some logs * added extra loggers for fetch from microplan activities (#1193) * added extra loggers for fetch from microplan activities * Update microplanIntergration.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added retry in localization upsert (#1194) * Adding the additonal loggers to know more informs on microplan integration * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed integration (#1197) * Global handler (#1199) * Change for roles name change * Global exception handler integrated * String logger * Update app.ts * added heap memory log & created a env variable for incomingRequestPay… …loadLimit (#1201) * added heap memory log & created a env variable for incomingRequestPayloadLimit * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Set memory limit and added log off avaiable, max limits (#1202) * added logs to check current value * Update app.ts * Update Dockerfile * Update Dockerfile * Update app.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Handle for google sheet formulas (#1207) * Update microplanValidators.ts (#1213) * Update microplanValidators.ts * Update microplanValidators.ts * Update microplanValidators.ts * Localised roles (#1217) * added change log for admin console version 0.3 (#1224) * Pvar validation (#1225) * product variant validation added * Optimized validations * Refactored * Logger error fix * Refactor * Refactor * refactored project reosurce mapping logic (#1204) * refactored project reosurce mapping logic * added new function ot search project after campaign creation time * added reference id params in project search * added logic for adding resources only for newly created projects * refactored and code clean up for project resource mapppings in update and create flow * refactor getProjectMappingBody func * some condition check * correction * removed project departments * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * added changes for performance testing (#1236) * added changes for performance testing * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * try catch handling * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: ansh-egov <137172017+ansh-egov@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 health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#1244) * Update campaignValidators.ts * Update campaignValidators.ts * add * added new config values * Other configs (#1250) * add * added new config values * Update request.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Updating debug function for error handeling (#1243) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update dataManageService.ts * Applied code rabbit changes * refactored sheet consolidate logic (#1254) * refactored sheet consolidate logic * Applied code rabbit changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refactor sheet consolidate for target (#1255) * Update package.json * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * removed other ui workflows * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * consolidate sheet handle logic change (#1256) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com> * Changed docker file * package changes * dockerfile revert * changed package json * Update package.json * reverted other folders * reverted * Update settings.json --------- Co-authored-by: kanishq-egov <138671649+kanishq-egov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: kanishq-egov <kanishq.bhatnagar@egovernments.org> Co-authored-by: Sathish P <sathish.p@egovernments.org> Co-authored-by: tanishi-egov <tanishi.goyal@egovernments.org> Co-authored-by: Palak Garg <86659286+palak-egov@users.noreply.github.com> Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com>
* HLM service request, updated DataTypeEnum (#872) * Service request changelog 1.5 (#875) * Added changelog and upgraded the versions for household, individual and service request * Update core-services/service-request/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/individual/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HLM fixed merge issues * HLM fixed merge issues * HCMPRE-413: updated the changelog as per code review comments * Update health-services/project/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HCMPRE-424: fixed hrms call from pgr-service * HCMPRE-424: updated as per code review comments * Create branch-name-validator (#960) * Create branch-name-validator * Update branch-name-validator * Update .github/workflows/branch-name-validator Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/branch-name-validator 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 branch-name-validator * Rename branch-name-validator to branch-name-validator.yml * Added census-service in build-config (#990) * [HCMPRE-658] Refractor resource-estimation-service to resource-generator (#910) Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> * Update package.json * Update tsconfig.json * Added configs and env dependencies * dockerfile update * Update tsconfig.json * Update tsconfig.json * refactored * HCM Admin Console v0.3 Release code changes (#1082) * kafka fix for large messages * Update genericUtils.ts * Update campaignValidators.ts * Fixed the mdms search path keys * fix of migration script * fix on repeated key * Update campaignApis.ts * Update campaignApis.ts * Update campaignUtils.ts * Update campaignUtils.ts * Update campaignUtils.ts * Fix project target mapping * refactored migration files fro project-factory (#867) * refactored migration files fro project-factory * updated logic for unique username generation * updated format and id name for user name * removed hash logic for username generation * added indexing on columns * updated idgen seq format for user name in index.ts * Update health-services/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated logic for regenerate if campaign type differs (#876) * id generation throw error update * Enhance generate template for user and facility in update ongoing campaign flow (#885) * commit for update-generate-template * updated campaign flow generate template enhancement * just if else changes * some reformatting * update index.ts * added additional valiadtion for parent campaign * updated logic for validating parent campaign * refcatored as per change requests * update index.ts * updated logic for same campaignnumber when paren is present * updated the campaign name logic along with handling isfailed status too (#888) * updating campaign name same as parent name and number too * updated target template for updating ongoing campaign (#893) * Microplan bulk user creation (#890) * Feat : initialised bulk user creation for microplan * Enhanced user bulk upload for microplan * Fixed configs * Merge fix with console * Feat : added columns in user sheet * Added userroles sheet for bulk user template in microplan * Added source microplan while resource creation * changed logic for isSourceMicroplan * Update campaignApis.ts * Update campaignValidators.ts * changes for campaign update flow * Update campaignUtils.ts * Integrated required error messages * added numeric check in microplan phone number * Implemented no data validation * added logic for creating projects , project facility and project staff on newly added boundaries (#917) * updated target template for updating ongoing campaign * update flow campaign mapping * updated flow campaign mapping * added logic for project, project facility and project staff creation on newly added boundaries * removed one useless func * removed await from a func * removed console.logs * added some minor enhancemnets * added one edge case scenario * changed request limit to 1 mb * Feat : added locksheet filter for user microplan creation * updated logic for regenerate if campaign type differs (#876) * Enhancement for microplan user creation (#940) * some modifications for edge cases (#930) * added commit for testing update campaign flow * some chenages related to type boundary in data create api * /* MODIFIED FOR LTS UPGRADE */ * Microplan user enhancement * Some changes regarding microplan user and boundary * added some null checks * /* Temporay fix for project creation of LLIN since the structure of delivery rules is getting changed */ * Revert "/* MODIFIED FOR LTS UPGRADE */" This reverts commit 52ed772. * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * added code to add lat long in the project-factory apis (#951) * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * Fixed code to manage create * fixed the build * added for field protection on sheet data * Facility microplan validation (#975) * Microplan facility validation * Enhancement in microplan validations * Microplan sheet lock * Enhanced for multiple sheetErrors in additionalDetails * Update campaignApis.ts * fixes for filestore and unfreezing boundary code mandatory columns (#984) * Update CODEOWNERS * Update campaignValidators.ts (#987) * some correction of error after changes from microplan code merge (#988) * some correction of error after changes from microplan code merge * added question mark * added localization fix (#993) Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> * Update campaignApis.ts (#994) * Added some fixes for the project transformation * Update projectTypeUtils.ts * Update campaignUtils.ts * Removed date Update projectTypeUtils.ts #1006 * HCEMPRE-809-Boundary-geometry-codes (#1011) * added localization fix * added logic for boundaryGeometryManagement * fixed some things * fixed campaign search * update project facility and staff mappings of exisitng facilities and users (#998) * some correction of error after changes from microplan code merge * added logic for updating mapping of existing facilitie and users * resolved comments by jagan on the pr for delinking and linking project resources * fetchProjectsWithBoundaryCodeAndName fucntion update * Update campaignValidators.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added code to add lat long in the project-factory apis (#1019) * Project staff mapping correction from uuid to userserviceuuid (#1022) * some correction of error after changes from microplan code merge * corrected for mapping of project staff * added changes for project-resource mapping (#1028) * added changes for project-resource mapping * changed the variable name to boundaryProjectMappingForProjectResourceCreation from newBoundaryProjectMapping * renamed the entity --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Added logic to retry in project campaign create (#1031) * not needed to update every resource in update flow (#1036) * not needed to update every resource in update flow * added changes for if boundaries present in update flow all resources are mandate * Some checks enhancement (#1042) * Update genericApis.ts (#1043) * Update campaignValidators.ts (#1046) * consolidate resources array in update campaign flow (#1051) * consolidate resources array in update campaign flow * spelling correct * Search criteria object corrected (#1052) * consolidate resources array in update campaign flow * data search criteria id has to be an array of strings * spelling * some more corrections regarding search criteria body * Boundaries consolidate after creating child campaign (#1056) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * Boundaries correction (#1058) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changes in extracing boundaries from campaign object * Missing resources in chid campaign to be added from parent camaig logic refactored (#1059) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored logic for adding missing resources from parent campaign * Correction datatocreate column from status to userservice uuids (#1061) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changed data to create column from user sheet * Hide Boundary and Target Old Columns (#1062) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * hide boundary code old and target old * Corrected target update flow (#1065) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * corrected target mapping in update flow * Total count of Campaigns if only is active true (#1066) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * count will be only of active campaigns * HCMPRE-1212:: migrated to point only to MMDS v2 api * Update index.ts * User/facility inactive (#1070) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * added logic for making exiting user facility inactive --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Refactor facility mappings (#1072) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored facility mappings * Created enity for boundary * updated the boundary relationship function * Update index.ts * fixed some localization issue (#1075) * fixed some localization issue * fixed * Target update while campaign update flow (#1078) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * logic for updating targets * some refactor for adding logs and index.ts * updated the boundary localisation name --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed some localization issue (#1079) * fixed some localization issue * fixed * fixed a issue * reverted failed campaign is active true from false (#1080) * reverted failed campaign is active true from false * took constants from index * refactor * Merge branch 'project-factory-kafka-fix' into console * Changed hierarchyFectch to v2 (#1077) * Changed hierarchyFectch to v2 * Changed messages * Merge branch 'project-factory-kafka-fix' into hierarchyFetchV2 --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * calll generate when create completes for type boundary management * auto generate resource if there is no previous generated history * Fixed crashloop issue (#1084) * Fixed crashloop issue * Update dataManageService.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * changed the master from hierarchyConfig to HierarchySchema (#1086) * getting boundaries split on logic change (#1088) * fixed some localization issue (#1090) * fixed some localization issue * fixed * fixed a issue * integrated microplan with console * fixxed index * fixed crashloop (#1091) * added validation for boundary bulk upload (#1092) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refcatored diffferent tab separation (#1093) * added timeout (#1095) * Microplan integration :: set start date to tommorow (#1096) * set start date to tommorow * updated end date * Enhance PlanFacility object (#1099) * validation for update template in create flow (#1100) * removed await (#1103) * some correction (#1104) * logic for updating targets only when present in resources array in update flow (#1105) * updated (#1106) * updated * added fix for the redis error in logs --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added error responder (#1107) * refactored download api (#1108) * Cache issue fix(#1109) * refactored download api * refactor --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * made disable of cache always during boundary generate (#1110) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Redis cache key deleted (#1113) * removed await * delete cache from boundary relationship search * updated redis delete func * Revert "removed await" This reverts commit a5acb54. * Update redisUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * updated redis delete func (#1114) * removed cache from boundary relation create (#1115) * corrected params of auto generate after download api (#1116) * refactored consolidate (#1119) * fix on the fetch from microplan Update campaignUtils.ts (#1120) * Update microplanUtils.ts (#1123) * addded localization function (#1125) * Update SearchCriteria.ts * made createandtransfrom localization as await to upsert all localization in boundary management create flow (#1127) * added logs in handledropdownthings (#1128) * Fixed district missing issue (#1129) * Facility Village List For microplan and dropdown fix (#1130) * Facility Village List For microplan and dropdown fix * Optional chaining * Reverted recievedDropdown Changes * removed localization caceh in boundary generate flow for hierarchy module (#1133) * planFacility create Fix (#1132) * fixed the localisation cache on multiple data creates in boundary * Revert "fixed the localisation cache on multiple data creates in boundary" This reverts commit 94eb970. * Facility fix generation for microplan (#1134) * planFacility create Fix * Fixed Facility Generation for microplan * added the count info of the localisation upsert (#1144) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Microplan integrated with console for facility , user & target (#1151) * set start date to tommorow * updated end date * added code for target sheet * fixed * added mdms call * microplan integration changes added for target ,facility & user * undo changes * Update microplanIntergration.ts * saving all the progress on the integration * project facility mapping done * Update microplanIntergration.ts * Update microplanIntergration.ts * Update microplanIntergration.ts * target & facility integration completed statically * completed facility & target file created based on microplan * added static for user * Added user related changes * added the user integartion * added target and facility in resources array of campaign from microplan * added user in resources array in campaign object * Update microplanIntergration.ts * revert the others * Update index.ts * Cleaned up code --------- Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> * added missing default tenantid (#1152) * Boundary locale fix (#1153) * planFacility create Fix * Fixed boundary validation for different locales --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * removed duplicate key (#1154) * Logs for reordering added (#1161) * added missing default tenantid * added logs for reordering before project creation * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Readme for microplans (#1160) * Readme for microplans * Fixed boolean type * Optimized isMicroplanRequest * Optimizing roles for microplan (#1164) * Improved some performance with huge campaign object (#1165) * Trying optimised code by chatgpt * added 4mb limit * Update app.ts * Updted the comments * Changes for pollutils and reorder * Update pollUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> * Added fixes for error during processing (#1172) * added missing default tenantid * added try catch * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed the hard codings in the code (#1170) * fixed the hard codings in the code * fixed * Added filter check for the fetch from microplan if it has already some resources * fixed hardcoding in target flow (#1175) * fixed hardcoding in target flow * fixed * fixed * Update campaignApis.ts (#1177) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update genericUtils.ts (#1178) * changed the campaig key to activity (#1180) * added missing default tenantid * Update campaignUtils.ts * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * handled failed generations in downlaod api (#1185) * Change for roles name change (#1187) * added search before update in fetch all datas (#1190) * added seacrh before update in fetch all datas * Change for roles name change (#1187) --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * formatted and made promise all to do a promise all to make calls parallely * filtered the plan facility response to have only facility which has only service boundarires * added hierarchy filteration from mdms (#1188) * added hierarchy filteration from mdms * did some hardcoding * fixed fetching of headers * added some logs * added extra loggers for fetch from microplan activities (#1193) * added extra loggers for fetch from microplan activities * Update microplanIntergration.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added retry in localization upsert (#1194) * Adding the additonal loggers to know more informs on microplan integration * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed integration (#1197) * Global handler (#1199) * Change for roles name change * Global exception handler integrated * String logger * Update app.ts * added heap memory log & created a env variable for incomingRequestPay… …loadLimit (#1201) * added heap memory log & created a env variable for incomingRequestPayloadLimit * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Set memory limit and added log off avaiable, max limits (#1202) * added logs to check current value * Update app.ts * Update Dockerfile * Update Dockerfile * Update app.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Handle for google sheet formulas (#1207) * Update microplanValidators.ts (#1213) * Update microplanValidators.ts * Update microplanValidators.ts * Update microplanValidators.ts * Localised roles (#1217) * added change log for admin console version 0.3 (#1224) * Pvar validation (#1225) * product variant validation added * Optimized validations * Refactored * Logger error fix * Refactor * Refactor * refactored project reosurce mapping logic (#1204) * refactored project reosurce mapping logic * added new function ot search project after campaign creation time * added reference id params in project search * added logic for adding resources only for newly created projects * refactored and code clean up for project resource mapppings in update and create flow * refactor getProjectMappingBody func * some condition check * correction * removed project departments * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * added changes for performance testing (#1236) * added changes for performance testing * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * try catch handling * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: ansh-egov <137172017+ansh-egov@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 health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#1244) * Update campaignValidators.ts * Update campaignValidators.ts * add * added new config values * Other configs (#1250) * add * added new config values * Update request.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Updating debug function for error handeling (#1243) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update dataManageService.ts * Applied code rabbit changes * refactored sheet consolidate logic (#1254) * refactored sheet consolidate logic * Applied code rabbit changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refactor sheet consolidate for target (#1255) * Update package.json * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * removed other ui workflows * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * consolidate sheet handle logic change (#1256) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com> * Changed docker file * package changes * dockerfile revert * changed package json * Update package.json * reverted other folders * reverted * Update settings.json --------- Co-authored-by: kanishq-egov <138671649+kanishq-egov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: kanishq-egov <kanishq.bhatnagar@egovernments.org> Co-authored-by: Sathish P <sathish.p@egovernments.org> Co-authored-by: tanishi-egov <tanishi.goyal@egovernments.org> Co-authored-by: Palak Garg <86659286+palak-egov@users.noreply.github.com> Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com>
* Enabled commands for debug remotely for project factory pod (#1249) * HLM service request, updated DataTypeEnum (#872) * Service request changelog 1.5 (#875) * Added changelog and upgraded the versions for household, individual and service request * Update core-services/service-request/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/individual/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HLM fixed merge issues * HLM fixed merge issues * HCMPRE-413: updated the changelog as per code review comments * Update health-services/project/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HCMPRE-424: fixed hrms call from pgr-service * HCMPRE-424: updated as per code review comments * Create branch-name-validator (#960) * Create branch-name-validator * Update branch-name-validator * Update .github/workflows/branch-name-validator Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/branch-name-validator 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 branch-name-validator * Rename branch-name-validator to branch-name-validator.yml * Added census-service in build-config (#990) * [HCMPRE-658] Refractor resource-estimation-service to resource-generator (#910) Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> * Update package.json * Update tsconfig.json * Added configs and env dependencies * dockerfile update * Update tsconfig.json * Update tsconfig.json * refactored * HCM Admin Console v0.3 Release code changes (#1082) * kafka fix for large messages * Update genericUtils.ts * Update campaignValidators.ts * Fixed the mdms search path keys * fix of migration script * fix on repeated key * Update campaignApis.ts * Update campaignApis.ts * Update campaignUtils.ts * Update campaignUtils.ts * Update campaignUtils.ts * Fix project target mapping * refactored migration files fro project-factory (#867) * refactored migration files fro project-factory * updated logic for unique username generation * updated format and id name for user name * removed hash logic for username generation * added indexing on columns * updated idgen seq format for user name in index.ts * Update health-services/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated logic for regenerate if campaign type differs (#876) * id generation throw error update * Enhance generate template for user and facility in update ongoing campaign flow (#885) * commit for update-generate-template * updated campaign flow generate template enhancement * just if else changes * some reformatting * update index.ts * added additional valiadtion for parent campaign * updated logic for validating parent campaign * refcatored as per change requests * update index.ts * updated logic for same campaignnumber when paren is present * updated the campaign name logic along with handling isfailed status too (#888) * updating campaign name same as parent name and number too * updated target template for updating ongoing campaign (#893) * Microplan bulk user creation (#890) * Feat : initialised bulk user creation for microplan * Enhanced user bulk upload for microplan * Fixed configs * Merge fix with console * Feat : added columns in user sheet * Added userroles sheet for bulk user template in microplan * Added source microplan while resource creation * changed logic for isSourceMicroplan * Update campaignApis.ts * Update campaignValidators.ts * changes for campaign update flow * Update campaignUtils.ts * Integrated required error messages * added numeric check in microplan phone number * Implemented no data validation * added logic for creating projects , project facility and project staff on newly added boundaries (#917) * updated target template for updating ongoing campaign * update flow campaign mapping * updated flow campaign mapping * added logic for project, project facility and project staff creation on newly added boundaries * removed one useless func * removed await from a func * removed console.logs * added some minor enhancemnets * added one edge case scenario * changed request limit to 1 mb * Feat : added locksheet filter for user microplan creation * updated logic for regenerate if campaign type differs (#876) * Enhancement for microplan user creation (#940) * some modifications for edge cases (#930) * added commit for testing update campaign flow * some chenages related to type boundary in data create api * /* MODIFIED FOR LTS UPGRADE */ * Microplan user enhancement * Some changes regarding microplan user and boundary * added some null checks * /* Temporay fix for project creation of LLIN since the structure of delivery rules is getting changed */ * Revert "/* MODIFIED FOR LTS UPGRADE */" This reverts commit 52ed772. * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * added code to add lat long in the project-factory apis (#951) * added code to add lat long in the project-factory apis * Changed code based on comments * removed default campaignid * Fixed code to manage create * fixed the build * added for field protection on sheet data * Facility microplan validation (#975) * Microplan facility validation * Enhancement in microplan validations * Microplan sheet lock * Enhanced for multiple sheetErrors in additionalDetails * Update campaignApis.ts * fixes for filestore and unfreezing boundary code mandatory columns (#984) * Update CODEOWNERS * Update campaignValidators.ts (#987) * some correction of error after changes from microplan code merge (#988) * some correction of error after changes from microplan code merge * added question mark * added localization fix (#993) Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> * Update campaignApis.ts (#994) * Added some fixes for the project transformation * Update projectTypeUtils.ts * Update campaignUtils.ts * Removed date Update projectTypeUtils.ts #1006 * HCEMPRE-809-Boundary-geometry-codes (#1011) * added localization fix * added logic for boundaryGeometryManagement * fixed some things * fixed campaign search * update project facility and staff mappings of exisitng facilities and users (#998) * some correction of error after changes from microplan code merge * added logic for updating mapping of existing facilitie and users * resolved comments by jagan on the pr for delinking and linking project resources * fetchProjectsWithBoundaryCodeAndName fucntion update * Update campaignValidators.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added code to add lat long in the project-factory apis (#1019) * Project staff mapping correction from uuid to userserviceuuid (#1022) * some correction of error after changes from microplan code merge * corrected for mapping of project staff * added changes for project-resource mapping (#1028) * added changes for project-resource mapping * changed the variable name to boundaryProjectMappingForProjectResourceCreation from newBoundaryProjectMapping * renamed the entity --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Added logic to retry in project campaign create (#1031) * not needed to update every resource in update flow (#1036) * not needed to update every resource in update flow * added changes for if boundaries present in update flow all resources are mandate * Some checks enhancement (#1042) * Update genericApis.ts (#1043) * Update campaignValidators.ts (#1046) * consolidate resources array in update campaign flow (#1051) * consolidate resources array in update campaign flow * spelling correct * Search criteria object corrected (#1052) * consolidate resources array in update campaign flow * data search criteria id has to be an array of strings * spelling * some more corrections regarding search criteria body * Boundaries consolidate after creating child campaign (#1056) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * Boundaries correction (#1058) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changes in extracing boundaries from campaign object * Missing resources in chid campaign to be added from parent camaig logic refactored (#1059) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored logic for adding missing resources from parent campaign * Correction datatocreate column from status to userservice uuids (#1061) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * changed data to create column from user sheet * Hide Boundary and Target Old Columns (#1062) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * hide boundary code old and target old * Corrected target update flow (#1065) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * corrected target mapping in update flow * Total count of Campaigns if only is active true (#1066) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * count will be only of active campaigns * HCMPRE-1212:: migrated to point only to MMDS v2 api * Update index.ts * User/facility inactive (#1070) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * added logic for making exiting user facility inactive --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Refactor facility mappings (#1072) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * refactored facility mappings * Created enity for boundary * updated the boundary relationship function * Update index.ts * fixed some localization issue (#1075) * fixed some localization issue * fixed * Target update while campaign update flow (#1078) * consolidate resources array in update campaign flow * boundaries consolidate after creating child campaign * logic for updating targets * some refactor for adding logs and index.ts * updated the boundary localisation name --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed some localization issue (#1079) * fixed some localization issue * fixed * fixed a issue * reverted failed campaign is active true from false (#1080) * reverted failed campaign is active true from false * took constants from index * refactor * Merge branch 'project-factory-kafka-fix' into console * Changed hierarchyFectch to v2 (#1077) * Changed hierarchyFectch to v2 * Changed messages * Merge branch 'project-factory-kafka-fix' into hierarchyFetchV2 --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * calll generate when create completes for type boundary management * auto generate resource if there is no previous generated history * Fixed crashloop issue (#1084) * Fixed crashloop issue * Update dataManageService.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * changed the master from hierarchyConfig to HierarchySchema (#1086) * getting boundaries split on logic change (#1088) * fixed some localization issue (#1090) * fixed some localization issue * fixed * fixed a issue * integrated microplan with console * fixxed index * fixed crashloop (#1091) * added validation for boundary bulk upload (#1092) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refcatored diffferent tab separation (#1093) * added timeout (#1095) * Microplan integration :: set start date to tommorow (#1096) * set start date to tommorow * updated end date * Enhance PlanFacility object (#1099) * validation for update template in create flow (#1100) * removed await (#1103) * some correction (#1104) * logic for updating targets only when present in resources array in update flow (#1105) * updated (#1106) * updated * added fix for the redis error in logs --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added error responder (#1107) * refactored download api (#1108) * Cache issue fix(#1109) * refactored download api * refactor --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * made disable of cache always during boundary generate (#1110) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Redis cache key deleted (#1113) * removed await * delete cache from boundary relationship search * updated redis delete func * Revert "removed await" This reverts commit a5acb54. * Update redisUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * updated redis delete func (#1114) * removed cache from boundary relation create (#1115) * corrected params of auto generate after download api (#1116) * refactored consolidate (#1119) * fix on the fetch from microplan Update campaignUtils.ts (#1120) * Update microplanUtils.ts (#1123) * addded localization function (#1125) * Update SearchCriteria.ts * made createandtransfrom localization as await to upsert all localization in boundary management create flow (#1127) * added logs in handledropdownthings (#1128) * Fixed district missing issue (#1129) * Facility Village List For microplan and dropdown fix (#1130) * Facility Village List For microplan and dropdown fix * Optional chaining * Reverted recievedDropdown Changes * removed localization caceh in boundary generate flow for hierarchy module (#1133) * planFacility create Fix (#1132) * fixed the localisation cache on multiple data creates in boundary * Revert "fixed the localisation cache on multiple data creates in boundary" This reverts commit 94eb970. * Facility fix generation for microplan (#1134) * planFacility create Fix * Fixed Facility Generation for microplan * added the count info of the localisation upsert (#1144) Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Microplan integrated with console for facility , user & target (#1151) * set start date to tommorow * updated end date * added code for target sheet * fixed * added mdms call * microplan integration changes added for target ,facility & user * undo changes * Update microplanIntergration.ts * saving all the progress on the integration * project facility mapping done * Update microplanIntergration.ts * Update microplanIntergration.ts * Update microplanIntergration.ts * target & facility integration completed statically * completed facility & target file created based on microplan * added static for user * Added user related changes * added the user integartion * added target and facility in resources array of campaign from microplan * added user in resources array in campaign object * Update microplanIntergration.ts * revert the others * Update index.ts * Cleaned up code --------- Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> * added missing default tenantid (#1152) * Boundary locale fix (#1153) * planFacility create Fix * Fixed boundary validation for different locales --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * removed duplicate key (#1154) * Logs for reordering added (#1161) * added missing default tenantid * added logs for reordering before project creation * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Readme for microplans (#1160) * Readme for microplans * Fixed boolean type * Optimized isMicroplanRequest * Optimizing roles for microplan (#1164) * Improved some performance with huge campaign object (#1165) * Trying optimised code by chatgpt * added 4mb limit * Update app.ts * Updted the comments * Changes for pollutils and reorder * Update pollUtils.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> * Added fixes for error during processing (#1172) * added missing default tenantid * added try catch * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * fixed the hard codings in the code (#1170) * fixed the hard codings in the code * fixed * Added filter check for the fetch from microplan if it has already some resources * fixed hardcoding in target flow (#1175) * fixed hardcoding in target flow * fixed * fixed * Update campaignApis.ts (#1177) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update genericUtils.ts (#1178) * changed the campaig key to activity (#1180) * added missing default tenantid * Update campaignUtils.ts * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * handled failed generations in downlaod api (#1185) * Change for roles name change (#1187) * added search before update in fetch all datas (#1190) * added seacrh before update in fetch all datas * Change for roles name change (#1187) --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * formatted and made promise all to do a promise all to make calls parallely * filtered the plan facility response to have only facility which has only service boundarires * added hierarchy filteration from mdms (#1188) * added hierarchy filteration from mdms * did some hardcoding * fixed fetching of headers * added some logs * added extra loggers for fetch from microplan activities (#1193) * added extra loggers for fetch from microplan activities * Update microplanIntergration.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * added retry in localization upsert (#1194) * Adding the additonal loggers to know more informs on microplan integration * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/controllers/campaignManage/campaignManage.controller.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed integration (#1197) * Global handler (#1199) * Change for roles name change * Global exception handler integrated * String logger * Update app.ts * added heap memory log & created a env variable for incomingRequestPay… …loadLimit (#1201) * added heap memory log & created a env variable for incomingRequestPayloadLimit * Update index.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Set memory limit and added log off avaiable, max limits (#1202) * added logs to check current value * Update app.ts * Update Dockerfile * Update Dockerfile * Update app.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Handle for google sheet formulas (#1207) * Update microplanValidators.ts (#1213) * Update microplanValidators.ts * Update microplanValidators.ts * Update microplanValidators.ts * Localised roles (#1217) * added change log for admin console version 0.3 (#1224) * Pvar validation (#1225) * product variant validation added * Optimized validations * Refactored * Logger error fix * Refactor * Refactor * refactored project reosurce mapping logic (#1204) * refactored project reosurce mapping logic * added new function ot search project after campaign creation time * added reference id params in project search * added logic for adding resources only for newly created projects * refactored and code clean up for project resource mapppings in update and create flow * refactor getProjectMappingBody func * some condition check * correction * removed project departments * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * added changes for performance testing (#1236) * added changes for performance testing * microplan save topic changes (#1231) * Update microplanUtils.ts * Update index.ts * Update campaignApis.ts (#1232) * Update campaignApis.ts * Update campaignApis.ts * Update campaignApis.ts * Update campaignValidators.ts * Revert boundaryProject Mapping * Cleaned up data configs (#1234) * Update index.ts * Update campaignUtils.ts * try catch handling * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: ansh-egov <137172017+ansh-egov@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 health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update app.ts * Update health-services/project-factory/src/server/utils/microplanUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#1244) * Update campaignValidators.ts * Update campaignValidators.ts * add * added new config values * Other configs (#1250) * add * added new config values * Update request.ts --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Updating debug function for error handeling (#1243) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update health-services/project-factory/src/server/service/dataManageService.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update dataManageService.ts * Applied code rabbit changes * refactored sheet consolidate logic (#1254) * refactored sheet consolidate logic * Applied code rabbit changes --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * refactor sheet consolidate for target (#1255) * Update package.json * Update health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * removed other ui workflows * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * Update publishProjectFactory.yml * consolidate sheet handle logic change (#1256) * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org> Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com> * Changed docker file * package changes * dockerfile revert * changed package json * Update package.json * reverted other folders * reverted * Update settings.json --------- Co-authored-by: kanishq-egov <138671649+kanishq-egov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: kanishq-egov <kanishq.bhatnagar@egovernments.org> Co-authored-by: Sathish P <sathish.p@egovernments.org> Co-authored-by: tanishi-egov <tanishi.goyal@egovernments.org> Co-authored-by: Palak Garg <86659286+palak-egov@users.noreply.github.com> Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com> * changed package json for debug (#1258) * boundary code in update flow to be persisted in db (#1259) * chnaged header creation logic in generate flow (#1261) * made few changes for fetching boundaries from boundariesCombined (#1263) * some boundary bulk and microplan user changes (#1268) * some boundary bulk and microplan user changes * Some refactoring * localisation-cache-fix (#1270) * localisation-cache-fix * Refactor * Refactor * logger added * Microplan fix (#1269) * some boundary bulk and microplan user changes * Some refactoring * Fix for target * Facility fix * User Fix * Target valiodation for microplan --------- Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Co-authored-by: kanishq-egov <138671649+kanishq-egov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: kanishq-egov <kanishq.bhatnagar@egovernments.org> Co-authored-by: Sathish P <sathish.p@egovernments.org> Co-authored-by: tanishi-egov <tanishi.goyal@egovernments.org> Co-authored-by: Palak Garg <86659286+palak-egov@users.noreply.github.com> Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Co-authored-by: nitish-egov <nitish@egovernments.org> Co-authored-by: ansh-egov <ansh.goyal@egovernments.org> Co-authored-by: ansh-egov <137172017+ansh-egov@users.noreply.github.com> Co-authored-by: ejagankumar <31833516+ejagankumar@users.noreply.github.com>
Summary by CodeRabbit
New Features
transformAndCreateLocalisation
function to include chunked uploads for improved efficiency.fetchProductVariants
for retrieving product variant data in chunks.parentId
andactive
.campaignName
, allowing for greater flexibility in naming campaigns.consolidateBoundaries
for managing boundary data.Bug Fixes
Documentation
Chores