Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TTAHUB-451] Add target populations to approved report #618

Merged
merged 5 commits into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/pages/ApprovedActivityReport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -386,6 +388,7 @@ export default function ApprovedActivityReport({ match, user }) {
recipientType,
'Reason',
'Program Type',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is not your change, but should "Type" have a capital 'T'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Lauren & Kelly are preparing a list of capitalization for us to fix now that we've decided on a style, but totally make sense to fix this while I'm here.

'Target populations',
'Start date',
'End date',
'Topics',
Expand All @@ -402,6 +405,7 @@ export default function ApprovedActivityReport({ match, user }) {
recipients,
reasons,
programType,
targetPopulations,
startDate,
endDate,
topics,
Expand Down