Skip to content

Commit

Permalink
fix(admin): filter drafted users by lab (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiDood committed Aug 13, 2024
2 parents 4691e49 + 611e98f commit facd164
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// eslint-disable-next-line init-declarations
export let selected: TaggedStudentsWithLabs;
$: selected = selected.filter(val => val.lab_id === lab.lab_id);
$: preferred = available.filter(val => val.labs[round - 1] === lab.lab_id);
$: interested = available.filter(val => val.labs.slice(round).includes(lab.lab_id));
Expand All @@ -23,7 +24,7 @@
<div class="flex justify-between" slot="summary">
{#if lab.quota === 0}
<h5 class="h5 text-gray-400">{lab.lab_name}</h5>
{:else if selected.length !== lab.quota}
{:else if selected.length < lab.quota}
<h5 class="h5">{lab.lab_name}</h5>
{:else}
<h5 class="h5 text-warning-500">{lab.lab_name}</h5>
Expand Down

0 comments on commit facd164

Please sign in to comment.