️ This Gitlab will be shut down at 2021-12-31 23:59:59.
Students and staff can migrate to gitlab.utwente.nl.
SNT members can migrate to gitlab.snt.utwente.nl.
Contact bestuur@snt.utwente.nl for more information.

Migrate your projects today!
Export your project using the webinterface or use a script.

Commit 8dc456d9 authored by TJHeeringa's avatar TJHeeringa

Minor fixes

parent e72aee02
......@@ -8,14 +8,13 @@ import CardGrid from "../../../Components/Card/CardGrid";
import GroupCard from "../../../Components/Card/GroupCardV2";
import PageContent from "../../../Components/PageLayout/Content/Content";
const committeeToGroupCard = (committee) => ({
title: committee.full_name,
photo: committee.photo || Sushi,
path: "committees/" + committee.slug
});
const GroupList = ({ committees }) => {
const committeeToGroupCard = (committee) => ({
title: committee.full_name,
photo: committee.photo || Sushi,
path: "committees/" + committee.slug
});
const filteredCommittees = committees.filter(committee=> committee.parent_group === null);
const cards = filteredCommittees.map(committee=>committeeToGroupCard(committee));
......
......@@ -68,7 +68,7 @@ const MembersDetail = ({ association, current_member, onMembershipUpdate, onProf
duty: group_membership.duty,
date_joined: group_membership.date_joined,
date_left: group_membership.date_left || ""
})),[invoices]);
})),[group_memberships]);
const group_memberships_headers = [
{name: "name", title: "Name"},
{name: "duty", title: "Duty"},
......@@ -184,7 +184,6 @@ const MembersDetail = ({ association, current_member, onMembershipUpdate, onProf
toggleSpecificDataInfoFormState();
}, [toggleSpecificDataInfoFormState, propOnDataUpdate]);
console.log(membership.association_specific_data);
return (
<>
<ConfirmationModal
......
......@@ -6,17 +6,17 @@ const membersApi = emptySplitApi
endpoints: (build) => ({
getCurrentMembersByAssociation: build.query({
query: (associationSlug) => ({ url: "/memberships", params: { association__slug: associationSlug, current: true, limit: 10000, expand: "association_specific_data,profile,type,new_type" } }),
providesTags: (result, error, associationSlug) => [{ type: "groupMembership", id: associationSlug }],
providesTags: (result, error, associationSlug) => [{ type: "Member", id: associationSlug }],
transformResponse: (response) => response.results
}),
getMembersByAssociationAndStatus: build.query({
query: ({ associationSlug, status }) => ({ url: "/memberships", params: { association__slug: associationSlug, status: status, limit: 10000, expand: "association_specific_data,profile,type,new_type" } }),
providesTags: (result, error, { associationSlug, status }) => [{ type: "groupMembership", id: `${associationSlug}__${status}` }],
providesTags: (result, error, { associationSlug, status }) => [{ type: "Member", id: `${associationSlug}__${status}` }],
transformResponse: (response) => response.results
}),
acceptOrDenyMembership: build.mutation({
query: ({ slug, status }) => ({ url: `/memberships${slug}`, method: "PATCH", body: {status: status} }),
invalidatesTags: (result) => [{ type: "DataField", id: result.association.split("/associations/"[1]) }],
invalidatesTags: (result) => [{ type: "Member", id: result.association.split("/associations/"[1]) }],
}),
}),
overrideExisting: false
......
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