From 7f8e26b4b4bb58c5380541770d1bac6ffbbc18be Mon Sep 17 00:00:00 2001 From: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:24:31 +0530 Subject: [PATCH] template downlod for source microplan (#1123) --- utilities/project-factory/src/server/utils/targetUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utilities/project-factory/src/server/utils/targetUtils.ts b/utilities/project-factory/src/server/utils/targetUtils.ts index b1fc4f54e9e..4efca24623f 100644 --- a/utilities/project-factory/src/server/utils/targetUtils.ts +++ b/utilities/project-factory/src/server/utils/targetUtils.ts @@ -1,13 +1,14 @@ import config from '../config' -import { getConfigurableColumnHeadersBasedOnCampaignType, getLocalizedName } from './campaignUtils'; +import { checkIfSourceIsMicroplan, getConfigurableColumnHeadersBasedOnCampaignType, getLocalizedName } from './campaignUtils'; import _ from 'lodash'; import { replicateRequest } from './genericUtils'; import { callGenerate } from './generateUtils'; async function generateDynamicTargetHeaders(request: any, campaignObject: any, localizationMap?: any) { + const isSourceMicroplan = checkIfSourceIsMicroplan(campaignObject); let headerColumnsAfterHierarchy: any; - if (campaignObject.deliveryRules && campaignObject.deliveryRules.length > 0 && config?.enableDynamicTargetTemplate) { + if (campaignObject.deliveryRules && campaignObject.deliveryRules.length > 0 && config?.enableDynamicTargetTemplate && !isSourceMicroplan) { const modifiedUniqueDeliveryConditions = modifyDeliveryConditions(campaignObject.deliveryRules); headerColumnsAfterHierarchy = generateTargetColumnsBasedOnDeliveryConditions(modifiedUniqueDeliveryConditions, localizationMap);