aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/FileUploads.svelte20
-rw-r--r--src/components/PeerTeachers.svelte17
2 files changed, 30 insertions, 7 deletions
diff --git a/src/components/FileUploads.svelte b/src/components/FileUploads.svelte
index 14b0be3..e5df56f 100644
--- a/src/components/FileUploads.svelte
+++ b/src/components/FileUploads.svelte
@@ -8,12 +8,14 @@
parseDatabaseFile,
parseLabScheduleFile,
parsePTFile,
+ readQuestionairre,
} from "../logic/EditorActions";
import { labStore, ptStore } from "../stores";
let ptSchedules: FileList | null;
let labSchedule: FileList | null;
let dbFile: FileList | null;
+ let questionairreFile: FileList | null;
let snackbar: Snackbar;
let snackbarText;
@@ -81,6 +83,12 @@
}
}
+ $: {
+ if (questionairreFile?.length) {
+ readQuestionairre(questionairreFile[0]);
+ }
+ }
+
function dbStringify(): string {
const peerTeachers = [...$ptStore.values()];
const labs = [...$labStore.values()];
@@ -173,6 +181,18 @@
>LocalStorage</button
>
</Card>
+
+ <Card
+ title="Upload PTs from Questionnairre"
+ desc="Gather all data from the questionnairre results. Should be in CSV format"
+ >
+ <UploadButton
+ color="btn-info"
+ accept="text/csv"
+ multiple={false}
+ bind:files={questionairreFile}
+ />
+ </Card>
</div>
<!-- https://github.com/saadeghi/daisyui/issues/221 -->
diff --git a/src/components/PeerTeachers.svelte b/src/components/PeerTeachers.svelte
index f0d34de..22e1622 100644
--- a/src/components/PeerTeachers.svelte
+++ b/src/components/PeerTeachers.svelte
@@ -26,13 +26,12 @@
});
}
- let headers = ["", "First", "Last", "UIN", "Email", "Lab Hours", ""];
+ let headers = ["", "First", "Last", "Email", "UIN", "Phone", "Pref", "Lab", "Gen","Ethnicity", "Grad", "Status", ""];
- $: console.log(headers);
</script>
<div class="overflow-auto h-full">
- <table class="table w-full">
+ <table class="table table-compact w-full">
<!-- head -->
<thead>
<tr>
@@ -65,11 +64,15 @@
{/if}
</th>
<th>{pt.lastname}</th>
- <th>{pt.id}</th>
<th>{pt.email}</th>
- <th>
- {pt.lab_hours}
- </th>
+ <th>{pt.id}</th>
+ <th>{pt.phone_number}</th>
+ <th>{pt.pref_work}</th>
+ <th>{pt.lab_hours}</th>
+ <th>{pt.gender}</th>
+ <th>{pt.ethnicity}</th>
+ <th>{pt.graduation}</th>
+ <th>{pt.new_ret}</th>
<th
><button
on:click={() => deletePT(pt.id)}