diff --git a/src/components/Certificates/index.jsx b/src/components/Certificates/index.jsx index b84cf1a..4756f12 100644 --- a/src/components/Certificates/index.jsx +++ b/src/components/Certificates/index.jsx @@ -27,7 +27,7 @@ export default class Certificates extends React.Component { let sortedTeams = {}; collegesService.getParticipants(user.college).then(participants => { for (let team of teams) { - let members = participants.filter(member => team.members.includes(member.id)); + let members = participants.filter(member => team.members.includes(member.id) && member.certificateEligible); team.members = members; } diff --git a/src/components/CollegeTeams/Edit.jsx b/src/components/CollegeTeams/Edit.jsx index f01a291..f242c16 100644 --- a/src/components/CollegeTeams/Edit.jsx +++ b/src/components/CollegeTeams/Edit.jsx @@ -42,7 +42,6 @@ export default class EditMember extends React.Component { componentWillMount() { participantsService.get(this.props.member).then(participant => { - this.setState({ participant: participant || {} }) }); @@ -90,6 +89,29 @@ export default class EditMember extends React.Component { /> +
+
Eligible for certification
+ { + const val = e.target.checked; + this.setState((prev)=>{ + return { + participant: { + ...prev.participant, + certificateEligible: val, + } + } + }); + }} + autoComplete="off" + name="certificateEligible" + type="checkbox" + checked={this.state.participant.certificateEligible} + placeholder="Eligible for certificate" + css={{ width: 50 }} + /> +
+