Skip to content

Commit

Permalink
Update campaignUtils.ts (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-egov authored Jun 13, 2024
1 parent 6052236 commit 6f01420
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ async function enrichAndPersistCampaignForUpdate(request: any, firstPersist: boo
enrichInnerCampaignDetails(request, updatedInnerCampaignDetails)
request.body.CampaignDetails.campaignNumber = ExistingCampaignDetails?.campaignNumber
request.body.CampaignDetails.campaignDetails = updatedInnerCampaignDetails
request.body.CampaignDetails.status = action == "create" ? campaignStatuses.started : campaignStatuses.drafted;
request.body.CampaignDetails.status = action == "changeDates" ? request.body.CampaignDetails.status : (action == "create" ? campaignStatuses.started : campaignStatuses.drafted);
const boundaryCode = !(request?.body?.CampaignDetails?.projectId) ? getRootBoundaryCode(request.body.CampaignDetails.boundaries) : (request?.body?.CampaignDetails?.boundaryCode || ExistingCampaignDetails?.boundaryCode)
request.body.CampaignDetails.boundaryCode = boundaryCode
request.body.CampaignDetails.startDate = request?.body?.CampaignDetails?.startDate || ExistingCampaignDetails?.startDate || null
Expand Down

0 comments on commit 6f01420

Please sign in to comment.