From 418ca658848e6be6186392c233d73b8ea7bf9c19 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:41:39 +0530 Subject: [PATCH] Update constants.ts (#1122) * Update constants.ts * Update utilities/project-factory/src/server/config/constants.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignUtils.ts * Update campaignUtils.ts * Update campaignMappingUtils.ts --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../src/server/config/constants.ts | 22 +++++++++---------- .../src/server/utils/campaignMappingUtils.ts | 6 ++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/utilities/project-factory/src/server/config/constants.ts b/utilities/project-factory/src/server/config/constants.ts index 50e6671af65..eebc85bcd71 100644 --- a/utilities/project-factory/src/server/config/constants.ts +++ b/utilities/project-factory/src/server/config/constants.ts @@ -112,17 +112,17 @@ export const generatedResourceStatuses: any = { export const processTrackTypes = { validation: "validation", - triggerResourceCreation: "triggerResourceCreation", - facilityCreation: "facilityCreation", - staffCreation: "staffCreation", - targetAndDeliveryRulesCreation: "targetAndDeliveryRulesCreation", - confirmingResouceCreation: "confirmingResouceCreation", - prepareResourceForMapping: "prepareResourceForMapping", - validateMappingResource: "validateMappingResource", - staffMapping: "staffMapping", - resourceMapping: "resourceMapping", - facilityMapping: "facilityMapping", - campaignCreation: "campaignCreation", + triggerResourceCreation: "trigger-resource-creation", + facilityCreation: "facility-creation", + staffCreation: "staff-creation", + targetAndDeliveryRulesCreation: "target-and-delivery-rules-creation", + confirmingResourceCreation: "confirming-resource-creation", + prepareResourceForMapping: "prepare-resource-for-mapping", + validateMappingResource: "validate-mapping-resource", + staffMapping: "staff-mapping", + resourceMapping: "resource-mapping", + facilityMapping: "facility-mapping", + campaignCreation: "campaign-creation", error: "error" } diff --git a/utilities/project-factory/src/server/utils/campaignMappingUtils.ts b/utilities/project-factory/src/server/utils/campaignMappingUtils.ts index 114cbe6c61b..4d7eda95aed 100644 --- a/utilities/project-factory/src/server/utils/campaignMappingUtils.ts +++ b/utilities/project-factory/src/server/utils/campaignMappingUtils.ts @@ -294,7 +294,7 @@ async function processCampaignMapping(messageObject: any) { logger.info("Campaign Already In Progress and Mapped"); } else { - await persistTrack(id, processTrackTypes.confirmingResouceCreation, processTrackStatuses.inprogress); + await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.inprogress); try { var completedResources: any = [] var resources = []; @@ -333,10 +333,10 @@ async function processCampaignMapping(messageObject: any) { } } catch (error: any) { console.log(error) - await persistTrack(id, processTrackTypes.confirmingResouceCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); + await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) }); throw new Error(error) } - await persistTrack(id, processTrackTypes.confirmingResouceCreation, processTrackStatuses.completed); + await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.completed); await fetchAndMap(resources, messageObject); } }