diff --git a/frontend/src/lib/stores/candidate.ts b/frontend/src/lib/stores/candidate.ts
index 31886d0..0d152af 100644
--- a/frontend/src/lib/stores/candidate.ts
+++ b/frontend/src/lib/stores/candidate.ts
@@ -19,10 +19,10 @@ export interface CandidateData {
}
export interface CandidatePreview {
- applicationId: number;
- name: string;
- surname: string;
- study: string;
+ applicationId?: number;
+ name?: string;
+ surname?: string;
+ study?: string;
}
export interface CandidateLogin {
diff --git a/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte b/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte
new file mode 100644
index 0000000..fb9e351
--- /dev/null
+++ b/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte
@@ -0,0 +1,61 @@
+
+
+
+
+ {#each candidates as candidate}
+
+
{candidate.applicationId}
+
+
{candidate.name} {candidate.surname?.toUpperCase()}
+
+
Obor: {candidate.study}
+
+
+
+ {/each}
+
+
+
Details here
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/(admin)/admin/auth/login/+page.svelte b/frontend/src/routes/(admin)/admin/auth/login/+page.svelte
index de1160e..b29a942 100644
--- a/frontend/src/routes/(admin)/admin/auth/login/+page.svelte
+++ b/frontend/src/routes/(admin)/admin/auth/login/+page.svelte
@@ -5,9 +5,20 @@
import background from '$lib/assets/background2.jpg';
import Lock from '$lib/components/icons/Lock.svelte';
+ import { apiLogin } from '$lib/@api/admin';
+ import { goto } from '$app/navigation';
let adminIdValue = '';
let adminPasswordValue = '';
+
+ const login = async () => {
+ try {
+ await apiLogin({adminId: Number(adminIdValue), password: adminPasswordValue});
+ goto("/admin/dashboard");
+ } catch (e) {
+ console.log(e);
+ }
+ };
@@ -37,6 +48,7 @@
class="bg-sspsBlue hover:bg-sspsBlueDark mt-8 w-3/5 rounded-lg p-3 text-xl font-semibold text-white transition-colors duration-300"
type="submit"
value="Odeslat"
+ on:click={login}
/>