Skip to content

Commit

Permalink
fix: calculate non indigenous and communities from template 9
Browse files Browse the repository at this point in the history
  • Loading branch information
rafasdc committed Oct 28, 2024
1 parent 71b19f0 commit cbc1f91
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/lib/helpers/ccbcSummaryGenerateFormData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,18 @@ const getFormDataFromApplication = (
formData: {
counts: {
communities:
(applicationData?.applicationFormTemplate9DataByApplicationId
?.nodes[0]?.jsonData?.communitiesToBeServed || 0) +
(applicationData?.applicationFormTemplate9DataByApplicationId
?.nodes[0]?.jsonData?.indigenousCommunitiesToBeServed || 0),
nonIndigenousCommunities:
applicationData?.applicationFormTemplate9DataByApplicationId?.nodes[0]
?.jsonData?.communitiesToBeServed,
nonIndigenousCommunities:
applicationData?.applicationFormTemplate9DataByApplicationId?.nodes[0]
?.jsonData?.communitiesToBeServed &&
applicationData?.applicationFormTemplate9DataByApplicationId?.nodes[0]
?.jsonData?.indigenousCommunitiesToBeServed
? (applicationData?.applicationFormTemplate9DataByApplicationId
?.nodes[0]?.jsonData?.communitiesToBeServed || 0) -
(applicationData?.applicationFormTemplate9DataByApplicationId
?.nodes[0]?.jsonData?.indigenousCommunitiesToBeServed || 0)
: null,
indigenousCommunities:
applicationData?.applicationFormTemplate9DataByApplicationId?.nodes[0]
?.jsonData?.indigenousCommunitiesToBeServed,
Expand Down

0 comments on commit cbc1f91

Please sign in to comment.