Skip to content

Commit

Permalink
Add option to upload publication
Browse files Browse the repository at this point in the history
  • Loading branch information
driver-deploy-2 committed Jan 19, 2024
1 parent 85849c9 commit c6e6f61
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
2 changes: 1 addition & 1 deletion db/l3crisis.db.0

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"link": "pnpm link project-board-shared",
"link2": "npm link mithril-ui-form",
"start": "concurrently \"npm run serve\" \"npm run dev\"",
"serve": "rest-easy-loki",
"serve": "node ./node_modules/rest-easy-loki/dist/cli.js --upload upload",
"keycloak": "docker compose -f ./docker/docker-compose.yaml up -d",
"docker:build": "docker buildx build -t l3crisis .",
"docker:tag": "docker tag l3crisis drivereu/l3crisis:nl",
Expand Down
1 change: 1 addition & 0 deletions src/models/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export interface IPublication {
author?: string;
yearOfPublication?: number;
url?: string;
localUrl?: string;
language?: string;
dissemination?: string;
otherLanguage?: string;
Expand Down
55 changes: 32 additions & 23 deletions src/template/llf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,36 +867,21 @@ const publicationForm = [
type: "text",
required: true,
icon: "title",
className: "col s6",
className: "col s7",
},
{
id: "orgTitle",
label: "Originele titel (indien van toepassing)",
type: "text",
icon: "title",
className: "col s6",
className: "col s5",
},
{
id: "author",
type: "text",
label: "Eerste auteur en/of organisatie",
icon: "person",
className: "col s9",
},
{
id: "yearOfPublication",
type: "number",
min: 1900,
max: 2100,
label: "Jaar van publicatie",
className: "col s3",
},
{
id: "url",
label: "Link",
type: "url",
icon: "link",
className: "col s6",
className: "col s4",
},
{
id: "language",
Expand All @@ -911,7 +896,7 @@ const publicationForm = [
required: true,
label: "Disseminatieniveau",
type: "select",
className: "col s3",
className: "col s2",
options: [
{
id: "public",
Expand All @@ -921,10 +906,10 @@ const publicationForm = [
id: "restricted",
label: "Restrictief",
},
{
id: "secret",
label: "Geheim",
},
// {
// id: "secret",
// label: "Geheim",
// },
],
},
{
Expand All @@ -935,6 +920,30 @@ const publicationForm = [
options: languages,
className: "col s3",
},
{
id: "yearOfPublication",
type: "number",
min: 1900,
max: 2100,
label: "Jaar van publicatie",
className: "col s3",
},

{
id: "url",
label: "Link",
type: "url",
icon: "link",
className: "col s6",
},
{
id: "localUrl",
label: "Upload publicatie",
type: "file",
url: `${API_SERVER}/upload/public`,
options: [{ id: ".pdf" }],
className: "col s6",
},
] as UIForm<IPublication>;

export const eventTypes = [
Expand Down

0 comments on commit c6e6f61

Please sign in to comment.