From d42f2ab4deababc709d93d8c239e295d226cdb18 Mon Sep 17 00:00:00 2001 From: Matt Bevilacqua Date: Thu, 11 Nov 2021 13:02:16 -0500 Subject: [PATCH 1/3] add target populations to ar --- frontend/src/pages/ApprovedActivityReport/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/pages/ApprovedActivityReport/index.js b/frontend/src/pages/ApprovedActivityReport/index.js index b47b92fbb0..82d1be74cf 100644 --- a/frontend/src/pages/ApprovedActivityReport/index.js +++ b/frontend/src/pages/ApprovedActivityReport/index.js @@ -125,6 +125,7 @@ export default function ApprovedActivityReport({ match, user }) { const [participantCount, setParticipantCount] = useState(''); const [reasons, setReasons] = useState(''); const [programType, setProgramType] = useState(''); + const [targetPopulations, setTargetPopulations] = useState(''); const [startDate, setStartDate] = useState(''); const [endDate, setEndDate] = useState(''); const [duration, setDuration] = useState(''); @@ -176,6 +177,7 @@ export default function ApprovedActivityReport({ match, user }) { setDisplayId(report.displayId); setCreator(report.author.fullName); setCollaborators(report.collaborators); + setTargetPopulations(report.targetPopulations.map((population) => population).join(', ')); // Approvers. const approversNames = report.approvers.map((a) => a.User.fullName); @@ -386,6 +388,7 @@ export default function ApprovedActivityReport({ match, user }) { recipientType, 'Reason', 'Program Type', + 'Target populations', 'Start date', 'End date', 'Topics', @@ -402,6 +405,7 @@ export default function ApprovedActivityReport({ match, user }) { recipients, reasons, programType, + targetPopulations, startDate, endDate, topics, From 113ae19ec6bbafae9472d9f3c42e1bb63eb7df91 Mon Sep 17 00:00:00 2001 From: Matt Bevilacqua Date: Thu, 11 Nov 2021 13:36:32 -0500 Subject: [PATCH 2/3] fix failing ui test --- frontend/src/pages/ApprovedActivityReport/__tests__/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/pages/ApprovedActivityReport/__tests__/index.js b/frontend/src/pages/ApprovedActivityReport/__tests__/index.js index e83ea02cdd..6f9e137777 100644 --- a/frontend/src/pages/ApprovedActivityReport/__tests__/index.js +++ b/frontend/src/pages/ApprovedActivityReport/__tests__/index.js @@ -30,6 +30,7 @@ describe('Activity report print and share view', () => { id: 2, status: '', note: 'note', User: { id: 2, fullName: 'John Smith' }, }, ], + targetPopulations: ['Mid size sedans'], specialistNextSteps: [], granteeNextSteps: [], participants: ['Commander of Pants', 'Princess of Castles'], From feac881d26b85ae2148634951f6525ab875feb1e Mon Sep 17 00:00:00 2001 From: Matt Bevilacqua Date: Fri, 12 Nov 2021 14:14:23 -0500 Subject: [PATCH 3/3] fix capitalizations while we're here --- frontend/src/pages/ApprovedActivityReport/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/ApprovedActivityReport/index.js b/frontend/src/pages/ApprovedActivityReport/index.js index 82d1be74cf..263e0a3bfd 100644 --- a/frontend/src/pages/ApprovedActivityReport/index.js +++ b/frontend/src/pages/ApprovedActivityReport/index.js @@ -359,7 +359,7 @@ export default function ApprovedActivityReport({ match, user }) {

- TTA Activity report + TTA activity report {' '} {displayId}

@@ -387,7 +387,7 @@ export default function ApprovedActivityReport({ match, user }) { [ recipientType, 'Reason', - 'Program Type', + 'Program type', 'Target populations', 'Start date', 'End date',