Skip to content

Commit

Permalink
fix: improved csv formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinBuyck committed Dec 23, 2024
1 parent 2c1d062 commit ae5799b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/src/utilities/application-export-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ export const getHouseholdCsvHeaders = (
export const convertDemographicRaceToReadable = (type: string): string => {
const [rootKey, customValue = ''] = type.split(':');
//only show colon if user entered a custom value
const customAppendStr = customValue ? `: ${customValue}` : '';
const customValueFormatted = customValue ? `: ${customValue}` : '';
const typeMap = {
americanIndianAlaskanNative: 'American Indian / Alaskan Native',
asian: 'Asian',
'asian-asianIndian': 'Asian[Asian Indian]',
'asian-otherAsian': `Asian[Other Asian${customAppendStr}]`,
'asian-otherAsian': `Asian[Other Asian${customValueFormatted}]`,
blackAfricanAmerican: 'Black / African American',
'asian-chinese': 'Asian[Chinese]',
declineToRespond: 'Decline to Respond',
Expand All @@ -560,8 +560,8 @@ export const convertDemographicRaceToReadable = (type: string): string => {
'Native Hawaiian / Other Pacific Islander[Native Hawaiian]',
nativeHawaiianOtherPacificIslander:
'Native Hawaiian / Other Pacific Islander',
otherMultiracial: `Other / Multiracial${customAppendStr}`,
'nativeHawaiianOtherPacificIslander-otherPacificIslander': `Native Hawaiian / Other Pacific Islander[Other Pacific Islander:${customValue}]`,
otherMultiracial: `Other / Multiracial${customValueFormatted}`,
'nativeHawaiianOtherPacificIslander-otherPacificIslander': `Native Hawaiian / Other Pacific Islander[Other Pacific Islander${customValueFormatted}]`,
'nativeHawaiianOtherPacificIslander-samoan':
'Native Hawaiian / Other Pacific Islander[Samoan]',
'asian-vietnamese': 'Asian[Vietnamese]',
Expand Down

0 comments on commit ae5799b

Please sign in to comment.