Skip to content
Snippets Groups Projects
Commit 45062895 authored by Ewen Le Bihan's avatar Ewen Le Bihan
Browse files

feat(edit members): show non contributor status

parent 19df0a53
Branches
Tags v0.42.0
No related merge requests found
......@@ -47,11 +47,13 @@
</span>
{/if}
</p>
{#if role}
<p class="text role">
{#if $$slots.default}
<slot />
{:else if role}
{role}
</p>
{/if}
</p>
</div>
</svelte:element>
......
......@@ -97,6 +97,9 @@
pictureFile: true,
fullName: true,
yearTier: true,
contributesTo: {
uid: true,
},
},
},
},
......@@ -263,7 +266,14 @@
permissions={isOnClubBoard({ president, treasurer, vicePresident, secretary })
? undefined
: { canEditArticles, canEditMembers, canScanEvents }}
/>
>
{title}
{#if data.group.studentAssociation && !member.contributesTo.some((c) => c.uid === data.group.studentAssociation?.uid)}
<strong class="not-contributor">
&bull; non cotisant à {data.group.studentAssociation?.name}</strong
>
{/if}
</AvatarPerson>
<div class="actions">
{#if updatingMember.memberId === memberId}
<ButtonSecondary
......@@ -428,6 +438,10 @@
gap: 1rem;
}
.not-contributor {
color: var(--danger-link);
}
.search {
margin-bottom: 1rem;
}
......
......@@ -20,6 +20,10 @@ export const load: PageLoad = async ({ fetch, params, parent, url }) => {
{
id: true,
uid: true,
studentAssociation: {
uid: true,
name: true,
},
members: {
memberId: true,
createdAt: true,
......@@ -30,6 +34,9 @@ export const load: PageLoad = async ({ fetch, params, parent, url }) => {
pictureFile: true,
fullName: true,
yearTier: true,
contributesTo: {
uid: true,
},
},
title: true,
president: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment