Add button to easily upgrade user promo
This commit is contained in:
parent
cb147e2b96
commit
0f8d77b05f
2 changed files with 45 additions and 1 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Reference in a new issue