Skip to content

Commit

Permalink
fix: commas on geo names and ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rafasdc committed Feb 12, 2025
1 parent 7756e69 commit d1bd89a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/backend/lib/dashboard/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,11 @@ export const generateDashboardExport = async (applicationData, cbcData) => {
{ value: `${summaryData?.formData?.locations?.regionalDistricts || ''}` },
// geographic names
{
value: `${benefitingCommunitiesNames.join(',')} ${benefitingIndigenousCommunitiesNames.join(',')}`,
value: `${benefitingCommunitiesNames.length > 0 ? benefitingCommunitiesNames.join(',') : ''}${benefitingIndigenousCommunitiesNames.length > 0 ? (benefitingCommunitiesNames.length > 0 ? ',' : '') + benefitingIndigenousCommunitiesNames.join(',') : ''}`,
},
// geo ids
{
value: `${benefitingCommunitiesIds.join(',')} ${benefitingIndigenousCommunitiesIds.join(',')}`,
value: `${benefitingCommunitiesIds.length > 0 ? benefitingCommunitiesIds.join(',') : ''}${benefitingIndigenousCommunitiesIds.length > 0 ? (benefitingCommunitiesIds.length > 0 ? ',' : '') + benefitingIndigenousCommunitiesIds.join(',') : ''}`,
},
// total communities and locales
{ value: summaryData?.formData?.counts?.communities || '' },
Expand Down Expand Up @@ -533,9 +534,9 @@ export const generateDashboardExport = async (applicationData, cbcData) => {
// regional district
{ value: communities.regionalDistricts },
// geographic names
{ value: communities.bcGeographicNames },
{ value: communities.bcGeographicNames.join(',') },
// geo ids
{ value: communities.bcGeographicIds },
{ value: communities.bcGeographicIds.join(',') },
// total communities and locales
{ value: communities.totalCount },
// indigenous communities
Expand Down

0 comments on commit d1bd89a

Please sign in to comment.