aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2022-07-21 18:00:17 -0400
committerFurkan Sahin <furkan-dev@proton.me>2022-07-21 18:00:17 -0400
commit735b7bbcb33217a97850de250c23f8921302779d (patch)
treec534eb2348f5597a14d9cb2099bbd4d580a90ec3
parent682f4232e731ab3df2fbf55eed39cd10459e3515 (diff)
TODO regarding reuploading a pt logic
-rw-r--r--src/components/FileUploads.svelte1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/FileUploads.svelte b/src/components/FileUploads.svelte
index 1d475de..da3d255 100644
--- a/src/components/FileUploads.svelte
+++ b/src/components/FileUploads.svelte
@@ -26,6 +26,7 @@
.then((results) =>
results.flatMap((result) => {
if (result.status === "fulfilled") {
+ // TODO uploading a new schedule to a PT just updates the previous value. This means that if we re-upload a PT that already exists (and who has labs assigned), then the new version of this PT will not have those labs (good), but all those labs will still be marked as assigned in `lab.assigned`. Maybe call a `pt.delete` function if the PT already exists when attempting to add.
ptStore.update((val) => val.set(result.value.id, result.value));
return [];
} else {