Add button to easily upgrade user promo

This commit is contained in:
nemunaire 2022-09-02 11:58:56 +02:00
commit 0f8d77b05f
2 changed files with 45 additions and 1 deletions

View file

@ -41,6 +41,15 @@
</h2>
{#if student.promo}
<span class="badge bg-success ms-1">{student.promo}</span>
{#if $user && $user.is_admin && $user.current_promo && student.promo != $user.current_promo}
<button
class="btn btn-sm btn-warning mx-1"
title="Passer sur la promo en cours"
on:click={() => { student.promo = $user.current_promo; student.save(); }}
>
<i class="bi bi-arrow-up"></i>
</button>
{/if}
{/if}
</div>
<div class="card-body">