Skip to content

Commit

Permalink
sanitize output for location and access description csv export and ad…
Browse files Browse the repository at this point in the history
…d aquatic mechanical treatment to dropdown
  • Loading branch information
brennanwebster authored and micheal-w-wells committed Dec 13, 2023
1 parent cdc31ff commit bb3bad4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/src/utils/iapp-csv-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ export async function* generateSitesCSV(cursor: any, templateName: string) {
fieldFormatMap['monitoring_comments'] = (value) => {
return '"' + value.replace(/\"/g, '') + '"';
};
fieldFormatMap['location_description'] = (value) => {
return '"' + value.replace(/\"/g, '') + '"';
};
fieldFormatMap['access_description'] = (value) => {
return '"' + value.replace(/\"/g, '') + '"';
};
fieldFormatMap['jurisdiction'] = (value) => {
return '"' + value + '"';
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const ExcelExporter = (props) => {
<MenuItem value={'terrestrial_chemical_treatment'}>Terrestrial Chemical Treatment Summary</MenuItem>,
<MenuItem value={'aquatic_chemical_treatment'}>Aquatic Chemical Treatment Summary</MenuItem>,
<MenuItem value={'terrestrial_mechanical_treatment'}>Terrestrial Mechanical Treatment Summary</MenuItem>,
<MenuItem value={'aquatic_mechanical_treatment'}>Aquatic Mechanical Treatment Summary</MenuItem>,
<MenuItem value={'biocontrol_release'}>Biocontrol Release Summary</MenuItem>,
<MenuItem value={'biocontrol_collection'}>Biocontrol Collection Summary</MenuItem>,
<MenuItem value={'biocontrol_dispersal'}>Biocontrol Dispersal Summary</MenuItem>,
Expand Down
1 change: 1 addition & 0 deletions appv2/src/UI/Overlay/Records/ExcelExporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const ExcelExporter = (props) => {
<MenuItem value={'terrestrial_chemical_treatment'}>Terrestrial Chemical Treatment Summary</MenuItem>,
<MenuItem value={'aquatic_chemical_treatment'}>Aquatic Chemical Treatment Summary</MenuItem>,
<MenuItem value={'terrestrial_mechanical_treatment'}>Terrestrial Mechanical Treatment Summary</MenuItem>,
<MenuItem value={'aquatic_mechanical_treatment'}>Aquatic Mechanical Treatment Summary</MenuItem>,
<MenuItem value={'biocontrol_release'}>Biocontrol Release Summary</MenuItem>,
<MenuItem value={'biocontrol_collection'}>Biocontrol Collection Summary</MenuItem>,
<MenuItem value={'biocontrol_dispersal'}>Biocontrol Dispersal Summary</MenuItem>,
Expand Down

0 comments on commit bb3bad4

Please sign in to comment.