diff --git a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte index a7f129f..64a7f9d 100644 --- a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte @@ -7,15 +7,27 @@ export let title: string; export let status: Status; + let uploading = false; + const submit = async () => { - const res = await apiSubmitPortfolio(); + uploading = true; + await apiSubmitPortfolio(); await fetchSubmProgress(); + uploading = false; }; + + const handleNotificationClick = async () => { + if (status === "uploaded") { + await submit(); + } else if (status === "submitted") { + + } + }
- +
diff --git a/frontend/src/lib/components/dashboard/StatusNotificationBig.svelte b/frontend/src/lib/components/dashboard/StatusNotificationBig.svelte index e311194..a0292a2 100644 --- a/frontend/src/lib/components/dashboard/StatusNotificationBig.svelte +++ b/frontend/src/lib/components/dashboard/StatusNotificationBig.svelte @@ -1,6 +1,7 @@ -
+
- {title} - {description} + {title} + {#if loading} +
+ +
+ {:else} + {description} + {/if}
@@ -32,13 +54,14 @@ .info { @apply flex items-center justify-between; @apply py-3 px-6; - @apply rounded-xl bg-red-700 shadow-md border-red-700; + @apply rounded-xl border-red-700 bg-red-700 shadow-md; @apply hover:cursor-help; } .submitted { @apply bg-green-600; + @apply !cursor-pointer; } .uploaded { diff --git a/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte b/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte index 3c94266..0fd5d9d 100644 --- a/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte +++ b/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte @@ -4,7 +4,6 @@ import { Swiper, SwiperSlide } from 'swiper/svelte'; import 'swiper/css'; - import DashboardUploadCard from '$lib/components/dashboard/DashboardUploadCard.svelte'; import DashboardInfoCard from '$lib/components/dashboard/DashboardInfoCard.svelte'; import CoverLetterUploadCard from '$lib/components/dashboard/CoverLetterUploadCard.svelte'; import PortfolioLetterUploadCard from '$lib/components/dashboard/PortfolioLetterUploadCard.svelte';