frontend: Keep the flag card displayed if not marked as solved
+ Ensure its hide when validated in presence of labels Fixes: https://gitlab.cri.epita.fr/ing/majeures/srs/fic/server/-/issues/31
This commit is contained in:
parent
84a771a4a2
commit
c70eb7f582
@ -16,7 +16,7 @@ function createMyStore() {
|
|||||||
if (my.exercices[k].flags) {
|
if (my.exercices[k].flags) {
|
||||||
let nb = 0;
|
let nb = 0;
|
||||||
for (let j in my.exercices[k].flags) {
|
for (let j in my.exercices[k].flags) {
|
||||||
if (!my.exercices[k].flags[j].found)
|
if (my.exercices[k].flags[j].type && !my.exercices[k].flags[j].found)
|
||||||
nb += 1;
|
nb += 1;
|
||||||
}
|
}
|
||||||
my.exercices[k].non_found_flags = nb;
|
my.exercices[k].non_found_flags = nb;
|
||||||
|
@ -229,7 +229,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</Col>
|
</Col>
|
||||||
<Col lg="6" class="mb-5">
|
<Col lg="6" class="mb-5">
|
||||||
{#if $my.exercices[$current_exercice.id].flags && $my.exercices[$current_exercice.id].non_found_flags > 0 && !solved[$current_exercice.id]}
|
{#if $my.exercices[$current_exercice.id].flags && ($my.exercices[$current_exercice.id].non_found_flags > 0 || !$my.exercices[$current_exercice.id].solved_rank) && !solved[$current_exercice.id]}
|
||||||
{#if $current_theme.locked}
|
{#if $current_theme.locked}
|
||||||
<Card class="border-danger mb-2">
|
<Card class="border-danger mb-2">
|
||||||
<CardHeader class="bg-black text-light">
|
<CardHeader class="bg-black text-light">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user