aboutsummaryrefslogtreecommitdiff
path: root/src/components/EditorLists.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/EditorLists.svelte')
-rw-r--r--src/components/EditorLists.svelte8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/EditorLists.svelte b/src/components/EditorLists.svelte
index 3dda136..3ca6ecc 100644
--- a/src/components/EditorLists.svelte
+++ b/src/components/EditorLists.svelte
@@ -59,12 +59,20 @@
selectedPeerTeacher?.labs.add(id);
// Self assignemnt to update `assignedLabs` and `compatibleLabs`
selectedPeerTeacher = selectedPeerTeacher;
+
+ // Mark lab as assigned
+ const lab = $labStore.get(id);
+ if (lab !== undefined) lab.assigned = true;
}
function unassignLab(id: number) {
selectedPeerTeacher?.labs.delete(id);
// Self assignemnt to update `assignedLabs` and `compatibleLabs`
selectedPeerTeacher = selectedPeerTeacher;
+
+ // Mark lab as unassigned
+ const lab = $labStore.get(id);
+ if (lab !== undefined) lab.assigned = false;
}
</script>