From 86439762b79498bc471e0066f3003efaee4e7f47 Mon Sep 17 00:00:00 2001 From: Sebastian Pravda Date: Sun, 4 Dec 2022 11:52:38 +0100 Subject: [PATCH] feat: upload status alert --- frontend/src/lib/@api/candidate.ts | 9 ++++ .../dashboard/DashboardInfoCard.svelte | 51 ++++++++++++++++--- .../dashboard/StatusNotificationBig.svelte | 34 ++++++++----- .../(authenticated)/dashboard/+page.svelte | 21 ++++++-- 4 files changed, 90 insertions(+), 25 deletions(-) diff --git a/frontend/src/lib/@api/candidate.ts b/frontend/src/lib/@api/candidate.ts index 2f80d48..c91e020 100644 --- a/frontend/src/lib/@api/candidate.ts +++ b/frontend/src/lib/@api/candidate.ts @@ -145,3 +145,12 @@ export const apiUploadPortfolioZip = async ( throw errorHandler(e, 'Failed to upload cover letter'); } }; + +export const apiSubmitPortfolio = async (): Promise => { + try { + await axios.post(API_URL + '/candidate/portfolio/submit', {}, { withCredentials: true }); + return true; + } catch (e: any) { + throw errorHandler(e, 'Failed to submit portfolio'); + } +}; \ No newline at end of file diff --git a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte index 741afe7..5cfd285 100644 --- a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte @@ -1,24 +1,59 @@ -
- - - -
-

{title}

- +
+
+ +
+
+
+ + + +
+

{title}

+ +
+
+
+ {#if status === 'uploaded'} + + {:else if status === 'submitted'} + + {:else} + + {/if} + +