Commit f4c3dcdf authored by TJHeeringa's avatar TJHeeringa

Removed redundant commented code

parent e028cf2a
......@@ -98,141 +98,3 @@ const GroupMemberManagement = ({ association }) => {
};
export default GroupMemberManagement;
// class GroupMemberManagement extends Component {
// constructor(props) {
// super(props);
// this.state = {
// key: 0,
// profile_urls: []
// };
// }
//
// morphDataToMemberGridProfiles = (data) => {
// data = data.map(member_profile => Object({
// slug: member_profile.profile.slug,
// url: member_profile.profile.url,
// first_names: member_profile.profile.first_names,
// given_name: member_profile.profile.given_name,
// student_number: member_profile.profile.student_number,
// surname: member_profile.profile.surname,
// }));
// return data;
// };
//
// morphDataToGroupMemberList = (data) => {
// data = data.map(member_profile => Object({
// slug: member_profile.slug,
// url: member_profile.url,
// given_name: member_profile.given_name,
// surname: member_profile.surname,
// date_joined: member_profile.date_joined,
// date_left: member_profile.date_left,
// duty: member_profile.duty,
// email: member_profile.email,
// order: member_profile.order
// }));
//
// // Replace null values with undefined to prevent error later on
// let null_keys = [];
// Object.entries(data).forEach(([key, value])=> {
// if (value === null) {
// null_keys.push(key);
// }
// });
// null_keys.forEach(null_key=>data[null_key]=undefined);
//
// return data;
// };
//
// rowSelectionEnabledFilter = (row, selection) => {
// return !this.state.profile_urls.includes(row.url);
// };
//
// setCommitteeMemberRowEnabledFilterVariables = (data) => {
// const profile_urls = data.groupmemberships.map(m => m.profile);
// if (JSON.stringify(profile_urls)!==JSON.stringify(this.state.profile_urls)) {
// this.setState({profile_urls: profile_urls});
// }
// };
//
// render() {
// const {group, association} = this.props;
// return (
// <div className={"CommitteeMemberManagement"}>
// <BackButton history={this.props.history} container={true}/>
//
// <Container style={{maxWidth: "100%"}}>
// <Col>
// <Row>
// <Col>
// <Get
// path={"/groups/" + group.slug}
// key={this.state.key}
// >
// { (data, { loading, error }) =>
// loading ? (
// <Spinner color={"primary"}/>
// ) : (
// <div>
// { error ? (
// console.log(error)
// ) : (
// <Block>
// { this.setCommitteeMemberRowEnabledFilterVariables(data) }
// <div>
// <h4>IN { group.board_group ? "BOARD" : "COMMITTEE" }</h4>
// <hr className={"box-title-separator"}/>
// <GroupMemberManagementGroupMemberList
// current_board={group.board_group}
// association={association}
// memberships={this.morphDataToGroupMemberList(data.groupmemberships)}
// />
// </div>
// </Block>
// ) }
// </div>
// )
// }
// </Get>
// </Col>
// </Row>
// <Row>
// <Col>
// <Get path={"/memberships"}
// queryParams={{limit: 10000, association__slug: association.slug, current: true}}
// >
// { (data, {loading, error}) =>
// loading ? (
// <Spinner color={"primary"}/>
// ) : (
// <div>
// { error ? (
// console.log(error)
// ) : (
// <div className={"AllMembers"}>
// { data &&
// <GroupMemberManagementAssociationMemberList
// rowSelectionEnabledFilter={this.rowSelectionEnabledFilter}
// association={association}
// group={group}
// member_profiles={this.morphDataToMemberGridProfiles(data.results)}
// onAdd={()=>{this.setState({key:this.state.key+1});}}
// />
// }
// </div>
// ) }
// </div>
// )
// }
// </Get>
// </Col>
// </Row>
// </Col>
// </Container>
// </div>
// );
// }
// }
//
// export const GroupMemberManagementWithRouter = withRouter(GroupMemberManagement);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment