From a9e96e85767e3820dbb5be0684b1b7a3cca0f3ce Mon Sep 17 00:00:00 2001 From: Felix Schlegel Date: Sat, 11 Jan 2025 02:35:17 +0100 Subject: [PATCH] feat: add missing data to paper interface --- src/lib/model/backend.ts | 4 +++- src/routes/componentsusage/+page.ts | 7 +++++++ src/routes/project/[projectId]/paper/new/+page.svelte | 4 +++- tests/model-builder.ts | 4 +++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/lib/model/backend.ts b/src/lib/model/backend.ts index 62dabc4d..1082f9fb 100644 --- a/src/lib/model/backend.ts +++ b/src/lib/model/backend.ts @@ -80,7 +80,9 @@ export interface Paper { title: string; abstrakt?: string; year?: number; - type?: string; + publisherName: string; + publicationType: string; + publicationName: string; authors: Author[]; backwardReferencedPaperIds: number[]; forwardReferencedPaperIds: number[]; diff --git a/src/routes/componentsusage/+page.ts b/src/routes/componentsusage/+page.ts index 00f0941d..b64579d6 100644 --- a/src/routes/componentsusage/+page.ts +++ b/src/routes/componentsusage/+page.ts @@ -18,6 +18,9 @@ export const load: PageLoad = async () => { { id: 2, firstName: "Felix", lastName: "Schlegel" }, { id: 3, firstName: "Florian", lastName: "Sihler" }, ], + publisherName: "IEEE", + publicationType: "journal", + publicationName: "IEEE Transactions on Software Engineering", backwardReferencedPaperIds: [], forwardReferencedPaperIds: [], reviewData: { @@ -48,6 +51,10 @@ export const load: PageLoad = async () => { { id: 12, firstName: "Alexander", lastName: "Raschke" }, { id: 13, firstName: "Matthias", lastName: "Tichy" }, ], + publisherName: "ACM", + publicationType: "conference", + publicationName: + "Proceedings of the 2021 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences", backwardReferencedPaperIds: [], forwardReferencedPaperIds: [], reviewData: { diff --git a/src/routes/project/[projectId]/paper/new/+page.svelte b/src/routes/project/[projectId]/paper/new/+page.svelte index 89eeae80..ea62217f 100644 --- a/src/routes/project/[projectId]/paper/new/+page.svelte +++ b/src/routes/project/[projectId]/paper/new/+page.svelte @@ -10,7 +10,9 @@ title: "Empty Title", abstrakt: "", year: new Date().getFullYear(), - type: "", + publisherName: "", + publicationType: "", + publicationName: "", authors: [], backwardReferencedPaperIds: [], forwardReferencedPaperIds: [], diff --git a/tests/model-builder.ts b/tests/model-builder.ts index df3d200e..764bf5a7 100644 --- a/tests/model-builder.ts +++ b/tests/model-builder.ts @@ -84,7 +84,9 @@ export function createPaper(paper: Partial = {}): Paper { title: "Foo", abstrakt: "Bar", year: 1912, - type: "paper", + publisherName: "IEEE", + publicationType: "journal", + publicationName: "IEEE Transactions on Software Engineering", authors: [Authors.johnDoe], backwardReferencedPaperIds: [], forwardReferencedPaperIds: [],