Skip to content

Commit

Permalink
template downlod for source microplan (#1123)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitish-egov authored Jul 23, 2024
1 parent 418ca65 commit 7f8e26b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utilities/project-factory/src/server/utils/targetUtils.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 7f8e26b

Please sign in to comment.