Skip to content
Extraits de code Groupes Projets
Valider 19faab7d rédigé par Brieuc Dubois's avatar Brieuc Dubois
Parcourir les fichiers

frontend: hide actions for students

parent 9de28543
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
<th class="py-2 px-6">#</th> <th class="py-2 px-6">#</th>
<th class="py-2 px-6">Date</th> <th class="py-2 px-6">Date</th>
<th class="py-2 px-6">participants</th> <th class="py-2 px-6">participants</th>
<th class="py-2 px-6">Actions</th> {#if JWTSession.user()?.is_tutor}
<th class="py-2 px-6">Actions</th>
{/if}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -70,23 +72,25 @@ ...@@ -70,23 +72,25 @@
> >
<td class="py-3 px-6" class:line-through={!session.is_active}>{session.usersList()}</td> <td class="py-3 px-6" class:line-through={!session.is_active}>{session.usersList()}</td>
<td class="py-3 px-6"> {#if JWTSession.user()?.is_tutor}
<button on:click|preventDefault|stopPropagation={() => editParticipants(session)}> <td class="py-3 px-6">
<Icon src={User} class="w-5 hover:text-secondaryHover" /> <button on:click|preventDefault|stopPropagation={() => editParticipants(session)}>
</button> <Icon src={User} class="w-5 hover:text-secondaryHover" />
<button on:click|preventDefault|stopPropagation={() => disableSession(session)}>
{#if session.is_active}
<Icon src={EyeSlash} class="w-5 hover:text-secondaryHover" />
{:else}
<Icon src={Eye} class="w-5 hover:text-secondaryHover" />
{/if}
</button>
{#if JWTSession.user()?.is_admin}
<button on:click|preventDefault|stopPropagation={() => deleteSession(session)}>
<Icon src={Trash} class="w-5 hover:text-secondaryHover" />
</button> </button>
{/if} <button on:click|preventDefault|stopPropagation={() => disableSession(session)}>
</td> {#if session.is_active}
<Icon src={EyeSlash} class="w-5 hover:text-secondaryHover" />
{:else}
<Icon src={Eye} class="w-5 hover:text-secondaryHover" />
{/if}
</button>
{#if JWTSession.user()?.is_admin}
<button on:click|preventDefault|stopPropagation={() => deleteSession(session)}>
<Icon src={Trash} class="w-5 hover:text-secondaryHover" />
</button>
{/if}
</td>
{/if}
</tr> </tr>
{#if editParticipantsSession === session} {#if editParticipantsSession === session}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter