From 735b7bbcb33217a97850de250c23f8921302779d Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Thu, 21 Jul 2022 18:00:17 -0400 Subject: TODO regarding reuploading a pt logic --- src/components/FileUploads.svelte | 1 + 1 file changed, 1 insertion(+) 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 { -- cgit v1.2.3