diff --git a/frontend/src/lib/@api/candidate.ts b/frontend/src/lib/@api/candidate.ts index 4f78b88..4427054 100644 --- a/frontend/src/lib/@api/candidate.ts +++ b/frontend/src/lib/@api/candidate.ts @@ -54,7 +54,6 @@ export const apiFetchSubmissionProgress = async (fetchSsr?: Fetch): Promise => { const apiFetch = fetchSsr || fetch; try { - console.log(API_URL + '/candidate/whoami'); const res = await apiFetch(API_URL + '/candidate/whoami', { method: 'GET', credentials: 'include' @@ -100,7 +99,6 @@ export const apiFillDetails = async (data: CandidateData): Promise import { apiGetCandidatePortfolio, apiResetCandidatePassword } from '$lib/@api/admin'; import type { CandidateData } from '$lib/stores/candidate'; + import { SvelteToast, toast } from '@zerodevx/svelte-toast'; export let id: number; export let candidateData: CandidateData; @@ -13,7 +14,13 @@ const res = await apiResetCandidatePassword(id); alert('Nove heslo: ' + res.password); } catch { - console.log('error'); + toast.push('Rodné číslo neodpovídá oficiální specifikaci či datumu narození', { + theme: { + '--toastColor': 'mintcream', + '--toastBackground': '#b91c1c', + '--toastBarBackground': '#7f1d1d' + } + }); } } @@ -27,11 +34,18 @@ document.body.appendChild(link); link.click(); } catch (e) { - console.log(e); + toast.push('Rodné číslo neodpovídá oficiální specifikaci či datumu narození', { + theme: { + '--toastColor': 'mintcream', + '--toastBackground': '#b91c1c', + '--toastBarBackground': '#7f1d1d' + } + }); } } +
diff --git a/frontend/src/lib/components/button/Submit.svelte b/frontend/src/lib/components/button/Submit.svelte index 4c51767..c46e834 100644 --- a/frontend/src/lib/components/button/Submit.svelte +++ b/frontend/src/lib/components/button/Submit.svelte @@ -1,12 +1,13 @@
@@ -25,6 +32,23 @@ {/each} + +