From 3da801ce3d8d442b573673ab8a4294145f54a40a Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Sun, 26 Jun 2022 18:02:37 -0500 Subject: Rename component, handle on click for addition / subtraction of lab --- src/components/AssignLabs/LabBox.svelte | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/components/AssignLabs/LabBox.svelte (limited to 'src/components/AssignLabs/LabBox.svelte') diff --git a/src/components/AssignLabs/LabBox.svelte b/src/components/AssignLabs/LabBox.svelte new file mode 100644 index 0000000..7888884 --- /dev/null +++ b/src/components/AssignLabs/LabBox.svelte @@ -0,0 +1,54 @@ + + + +
+ +
+ +
+ CSCE {lab.course} - {lab.section} + {#if assign} + { + selectedPeerTeacher?.assignLab(lab.id); + //TODO Adding a lab to a PT doesn't update the current "Labs" and "PT's Labs" columns + //TODO This was handled by self assignment in the assign labs function in Scott's version, but now this logic is passed down into a child component (this component) and self-assigning down here does not seem to help + selectedPeerTeacher = selectedPeerTeacher; + }} + /> + {:else} + { + console.log( + selectedPeerTeacher?.name, + lab.course, + lab.section + ); + }} + /> + {/if} +
+
+ +
+

{lab.event.info}

+

{lab.building} {lab.room}

+
+
-- cgit v1.2.3