From 36278e091b3118a2e8a03f7e97f035e79e1bfa82 Mon Sep 17 00:00:00 2001 From: EETagent Date: Fri, 23 Dec 2022 19:37:39 +0100 Subject: [PATCH] feat: styling & formatting --- .../dashboard/DashboardInfoCard.svelte | 127 +++++++++++------- .../components/dashboard/InfoButton.svelte | 109 ++++++++++----- .../(authenticated)/dashboard/+page.svelte | 36 +++-- 3 files changed, 176 insertions(+), 96 deletions(-) diff --git a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte index 0c66427..09b2455 100644 --- a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte @@ -43,80 +43,107 @@ const url = window.URL.createObjectURL(new Blob([portfolioBlob])); const link = document.createElement('a'); link.href = url; - link.setAttribute('download', 'PORTFOLIO' + '_' + $candidateData.candidate.name + '_' + $candidateData.candidate.surname + '.zip'); + link.setAttribute( + 'download', + 'PORTFOLIO' + + '_' + + $candidateData.candidate.name + + '_' + + $candidateData.candidate.surname + + '.zip' + ); document.body.appendChild(link); link.click(); } catch (e) { console.log(e); } - } + }; - - +
-
+
-
- showDetails = !showDetails}> +
+ (showDetails = !showDetails)} + />
-
+
-
+

{title}

{#if showDetails} - -
Vámi vyplněné osobní údaje", - allowHTML: true, - placement: 'top', - showOnCreate: false, - delay: 0 - }} - class="flex flex-col justify-around mt-10"> - Adresa: {$candidateData.candidate.address} - Datum narození: {$candidateData.candidate.birthdate} - Místo narození: {$candidateData.candidate.birthplace} - Rodné číslo: {$candidateData.candidate.personalIdNumber} - Telefon: {$candidateData.candidate.telephone} -
-
Vámi vyplněné osobní údaje", - allowHTML: true, - placement: 'top', - showOnCreate: false, - delay: 0 - }} - class="ml-10 - {#each $candidateData.parents as parent} -
- {parent.name + " " + parent.surname} - Email: {parent.email} - Telefon: {parent.telephone} + +
Vámi vyplněné osobní údaje', + allowHTML: true, + placement: 'top', + showOnCreate: false, + delay: 0 + }} + class="flex flex-col justify-around <2xl:text-xs" + > + Adresa: {$candidateData.candidate.address} + Datum narození: {$candidateData.candidate.birthdate} + Místo narození: {$candidateData.candidate.birthplace} + Rodné číslo: {$candidateData.candidate.personalIdNumber} + Telefon: {$candidateData.candidate.telephone} +
+
Vámi vyplněné osobní údaje', + allowHTML: true, + placement: 'top', + showOnCreate: false, + delay: 0 + }} + class="md:ml-4 flex flex-col <2xl:text-xs" + > + {#each $candidateData.parents as parent} +
+ {parent.name + ' ' + parent.surname} + Email: {parent.email} + Telefon: {parent.telephone} +
+ {/each}
- {/each} -
{/if}
diff --git a/frontend/src/lib/components/dashboard/InfoButton.svelte b/frontend/src/lib/components/dashboard/InfoButton.svelte index 15402d6..6a2431e 100644 --- a/frontend/src/lib/components/dashboard/InfoButton.svelte +++ b/frontend/src/lib/components/dashboard/InfoButton.svelte @@ -10,53 +10,94 @@ const showInfo = () => { dispatch('showInfo'); - } + }; const download = () => { dispatch('download'); - } + }; -
- -
- showInfo()} on:keydown={(_) => showInfo()} - use:tippy={{ - content: (showDetails ? "Skrýt" : "Zobrazit") + " osobní údaje", - placement: 'top', - showOnCreate: false, - delay: 0 - }}> - - + + showInfo()} + on:keydown={(_) => showInfo()} + use:tippy={{ + content: (showDetails ? 'Skrýt' : 'Zobrazit') + ' osobní údaje', + placement: 'top', + showOnCreate: false, + delay: 0 + }} +> + + - {#if $submissionProgress.status === UploadStatus.Submitted} - download()} on:keydown={(_) => download()} use:tippy={{ - content: "Stáhnout portfolio", - placement: 'top', - showOnCreate: false, - delay: 0 - }}> - - - {:else} - download()} + on:keydown={(_) => download()} + use:tippy={{ + content: 'Stáhnout portfolio', placement: 'top', showOnCreate: false, delay: 0 - }}> - - - {/if} -
-
+ }} + > + + +{:else} + + + +{/if} diff --git a/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte b/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte index 23123ee..2886496 100644 --- a/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte +++ b/frontend/src/routes/(candidate)/(authenticated)/dashboard/+page.svelte @@ -9,7 +9,12 @@ import PortfolioLetterUploadCard from '$lib/components/dashboard/PortfolioLetterUploadCard.svelte'; import PortfolioZipUploadCard from '$lib/components/dashboard/PortfolioZipUploadCard.svelte'; import type { PageData } from './$types'; - import { fetchSubmProgress, submissionProgress, UploadStatus, type Status } from '$lib/stores/portfolio'; + import { + fetchSubmProgress, + submissionProgress, + UploadStatus, + type Status + } from '$lib/stores/portfolio'; import { candidateData } from '$lib/stores/candidate'; export let data: PageData; @@ -21,7 +26,7 @@ $: candidateData.set(data.candidate); // @ts-ignore $: submissionProgress.set(data.submission); - + const getUploadStatus = (progressStatus: UploadStatus | undefined): Status => { switch (progressStatus) { case 3: @@ -31,30 +36,37 @@ default: return 'missing'; } - } + };
-
- +
+ {$candidateData.candidate.email} Uchazeč na SSPŠ
-
+
-
+
-
+
- + {$candidateData.candidate.email} Uchazeč na SSPŠ @@ -81,14 +93,14 @@