diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2022-07-30 17:31:25 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2022-07-30 17:31:25 -0500 |
| commit | 84d08872382bc7d2102998b795300d79fd905c15 (patch) | |
| tree | b3d044ef5daddc848c1c2573721f2beff6854c3c /src/components/Labs.svelte | |
| parent | 9355d87a2b2bde739a0768a6edf64018a88626db (diff) | |
Downloading `csv` file now also displays lab faculty info
Diffstat (limited to 'src/components/Labs.svelte')
| -rw-r--r-- | src/components/Labs.svelte | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/components/Labs.svelte b/src/components/Labs.svelte index 4df2184..51e0f8a 100644 --- a/src/components/Labs.svelte +++ b/src/components/Labs.svelte @@ -20,7 +20,6 @@ $: pts = [...$ptStore.values()]; - // TODO Make this more efficient rather than checking each PT per each Lab $: labsAndPts = [...$labStore.values()].flatMap((lab) => { return [ { @@ -49,11 +48,10 @@ let csv = cols.join(",") + "\n"; labsAndPts.forEach((row) => { let l = row.lab; - csv += `${l.course},${l.section},${l.time},${l.location},${ - row.pt?.name ?? "UNASSIGNED" - }\n`; + csv += `${l.course},${l.section},${l.time},${l.location},${displayFaculty( + l + )},${row.pt?.name ?? "UNASSIGNED"}\n`; }); - console.log(csv); const blob = new Blob([csv], { type: "text/csv" }); const anchor = document.createElement("a"); |
