aboutsummaryrefslogtreecommitdiff
path: root/src/components/AssignLabs/PTBox.svelte
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2022-06-26 18:03:47 -0500
committerFurkan Sahin <furkan-dev@proton.me>2022-06-26 18:03:47 -0500
commita997664bb30b1a79a17bebb7588db0fd68d81f04 (patch)
tree18e1b2b407932cbaaa5695ab6321bd116fbc063e /src/components/AssignLabs/PTBox.svelte
parenta059ee3c7c7c0b502eb4d796f3e42736cdb70a50 (diff)
Rename
Diffstat (limited to 'src/components/AssignLabs/PTBox.svelte')
-rw-r--r--src/components/AssignLabs/PTBox.svelte44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/components/AssignLabs/PTBox.svelte b/src/components/AssignLabs/PTBox.svelte
new file mode 100644
index 0000000..3ad50d1
--- /dev/null
+++ b/src/components/AssignLabs/PTBox.svelte
@@ -0,0 +1,44 @@
+<script lang="ts">
+ import type PeerTeacher from "../../models/PeerTeacher";
+ import Icon from "../helpers/Icon.svelte";
+ export let pt: PeerTeacher;
+
+ let modalID = () => {
+ return `my-modal-${pt.id}`;
+ }
+</script>
+
+<!-- PT Box -->
+<div
+ class="block border-b px-3 py-3 hover:bg-sky-100 hover:text-black h-20 overflow-hidden group"
+>
+ <!-- Top half, name and button -->
+ <div class="flex flex-row items-center ">
+ <!-- Left half, name -->
+ <strong class="flex-grow text-sm">{pt.name}</strong>
+
+ <!-- Right half, button -->
+ <!-- The button to open modal -->
+ <label for={modalID()} class="">
+ <Icon name="info" class="h-6 w-6" />
+ </label>
+
+ <!-- Modal PT event info -->
+ <input type="checkbox" id={modalID()} class="modal-toggle" />
+ <label for={modalID()} class="modal cursor-pointer">
+ <label class="modal-box relative bg-slate-300" for="">
+ <h3 class="text-lg font-bold font-serif underline">
+ {pt.name}
+ </h3>
+ {#each pt.events as e}
+ <p class="py-2">
+ {e.info}
+ </p>
+ {/each}
+ </label>
+ </label>
+ </div>
+
+ <!-- Bottom half, hours -->
+ <div class="">Hours: {pt.lab_hours}</div>
+</div>