diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/EditorLists.svelte | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/EditorLists.svelte b/src/components/EditorLists.svelte index 1b2084a..7cd17f6 100644 --- a/src/components/EditorLists.svelte +++ b/src/components/EditorLists.svelte @@ -29,8 +29,11 @@ $: compatibleLabs = labs.filter( (lab) => - !selectedPeerTeacher?.labs.has(lab.id) && + // Lab not already assigned + !lab.assigned && + // PT schedule not conflict with lab !selectedPeerTeacher?.conflictsWith(lab.event) && + // PT's labs not conflict with this lab !assignedLabs.some((assignment) => assignment.event.conflictsWith(lab.event) ) |
