From e9e6eda7e08c207b1cf8f155e46ae358294e6950 Mon Sep 17 00:00:00 2001 From: Sebastian Pravda Date: Sun, 4 Dec 2022 20:12:43 +0100 Subject: [PATCH] feat: reset password --- .../components/dashboard/CandidateDetails.svelte | 13 ++++++++++--- .../admin/(authenticated)/dashboard/+page.svelte | 10 +++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/dashboard/CandidateDetails.svelte b/frontend/src/lib/components/dashboard/CandidateDetails.svelte index 2e6a589..5beca41 100644 --- a/frontend/src/lib/components/dashboard/CandidateDetails.svelte +++ b/frontend/src/lib/components/dashboard/CandidateDetails.svelte @@ -3,15 +3,21 @@ import type { CandidateData } from "$lib/stores/candidate"; import ListElement from "./ListElement.svelte"; + export let id: number; export let candidate: CandidateData; - async function resetCandidatePassword(id: number) { + async function resetCandidatePassword() { try { - await apiResetCandidatePassword(id); + const res = await apiResetCandidatePassword(id); + alert("Nove heslo: " + res.password); } catch { console.log('error'); } } + + async function downloadPortfolio() { + + }
@@ -35,7 +41,8 @@
- + +
diff --git a/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte b/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte index b7c7eaf..3ddb157 100644 --- a/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte +++ b/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte @@ -94,9 +94,13 @@ {#if candidateDetails.hasOwnProperty(candidate.applicationId)} - - +
+ + +
+
{/if} {/each}