diff --git a/frontend/src/lib/@api/candidate.ts b/frontend/src/lib/@api/candidate.ts index 251a64e..6e5427d 100644 --- a/frontend/src/lib/@api/candidate.ts +++ b/frontend/src/lib/@api/candidate.ts @@ -202,6 +202,17 @@ export const apiSubmitPortfolio = async (): Promise => { } }; +export const apiGetPortfolio = async (): Promise => { + const res = await fetch(API_URL + '/candidate/portfolio/download', { + method: 'GET', + credentials: 'include' + }); + if (!res.ok) { + throw errorHandler(await res.text(), 'Failed to download portfolio'); + } + return await res.blob(); +}; + export const apiDeltePortfolio = async (): Promise => { try { await axios.post(API_URL + '/candidate/portfolio/delete', {}, { withCredentials: true }); diff --git a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte index 5ca048c..031fbf9 100644 --- a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte @@ -1,10 +1,12 @@
+
+
+
+ +
+
+
diff --git a/frontend/src/lib/components/dashboard/InfoButton.svelte b/frontend/src/lib/components/dashboard/InfoButton.svelte new file mode 100644 index 0000000..11c3e1f --- /dev/null +++ b/frontend/src/lib/components/dashboard/InfoButton.svelte @@ -0,0 +1,43 @@ + + +
+
+ showInfo()} on:keydown={(_) => showInfo()} use:tippy={{ + content: "Zobrazit osobní údaje", + placement: 'top', + showOnCreate: false, + delay: 0 + }}> + + + + download()} on:keydown={(_) => download()} use:tippy={{ + content: "Stáhnout portfolio", + placement: 'top', + showOnCreate: false, + delay: 0 + }}> + + +
+
+ +