From 2ebfa581c20058ad6cb2a6ada2952d85f719c865 Mon Sep 17 00:00:00 2001 From: Espen Norderud Date: Tue, 24 Oct 2023 16:47:43 +0200 Subject: [PATCH] #196: Fetch CV info for agenda --- src/components/agenda/AgendaLayout.svelte | 2 +- .../[arrangement]/agenda/[slug]/+page.server.ts | 12 ++++++++++-- .../[arrangement]/agenda/[slug]/+page.svelte | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/agenda/AgendaLayout.svelte b/src/components/agenda/AgendaLayout.svelte index c227145cd..10003c63b 100644 --- a/src/components/agenda/AgendaLayout.svelte +++ b/src/components/agenda/AgendaLayout.svelte @@ -13,7 +13,7 @@ export let submission: ISubmission; export let event: IEvent; export let performance: IPerformance; - export let cvs: Cv[] = []; + export let cvs: Cv[]; let submissionTypeIcon = { presentation: Megaphone, diff --git a/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.server.ts b/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.server.ts index 7fb87341e..3c6b8973a 100644 --- a/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.server.ts +++ b/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.server.ts @@ -4,6 +4,7 @@ import { error, redirect } from '@sveltejs/kit'; import type { IEvent } from '../../../../../model/event'; import type { PageServerLoad } from './$types'; import type { IAgendaPageLoadData } from '../../../../konferanser/[slug]/agenda/[submissionSlug]/+page.server'; +import {fetchCvByEmail} from "$lib/server/cvpartnerClient"; export const prerender = false; export const ssr = false; @@ -26,13 +27,20 @@ export const load = (async ({ params, cookies, url }): Promise await fetchCvByEmail(author.email)) + ); + return { event: event, performance: performance, - submission: performance.submission + submission: performance.submission, + cvs: cvPartnerData }; }) satisfies PageServerLoad; diff --git a/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.svelte b/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.svelte index d39fa4404..15d49bddb 100644 --- a/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.svelte +++ b/src/routes/arrangement/[arrangement]/agenda/[slug]/+page.svelte @@ -5,4 +5,4 @@ export let data: IAgendaPageLoadData; - +