- npm updates

- add references to the frontend
This commit is contained in:
Arno Kaimbacher 2023-04-20 11:42:09 +02:00
parent eb6476dfcb
commit c0a758dbc2
5 changed files with 753 additions and 9122 deletions

9836
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve --port 3000", "serve": "vue-cli-service serve --port 3001",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint --check", "lint": "vue-cli-service lint --check",
"lint2": "eslint ./src --ext .js,.ts", "lint2": "eslint ./src --ext .js,.ts",

View File

@ -1,4 +1,4 @@
import { AxiosRequestConfig, AxiosRequestHeaders } from "axios"; import { AxiosRequestConfig } from "axios";
import { stringify } from "qs"; import { stringify } from "qs";
// let headers: AxiosRequestConfig['headers'] = // let headers: AxiosRequestConfig['headers'] =

View File

@ -96,6 +96,7 @@ export class DbDataset {
public user: Person, public user: Person,
public subjects: Array<Subject>, public subjects: Array<Subject>,
public licenses: Array<License>, public licenses: Array<License>,
public references: Array<Reference>,
public files: Array<DbFile>, public files: Array<DbFile>,
private coverage?: Coverage, private coverage?: Coverage,
public project?: Project, public project?: Project,
@ -351,6 +352,15 @@ export interface License {
sort_order: number; sort_order: number;
} }
export interface Reference {
id: number;
document_id: number;
type: string;
relation: string;
value: string;
label: string;
}
export interface Project { export interface Project {
id: number; id: number;
label: string; // "ALLG_FACHLICH" label: string; // "ALLG_FACHLICH"

View File

@ -230,6 +230,31 @@
<p v-else>-</p> <p v-else>-</p>
</div> </div>
</div> </div>
<div class="card">
<div class="column">
<h3 class="label uppercase">Referenzen/References</h3>
<ul v-if="dataset.references.length > 0">
<li v-for="(reference, i) in dataset.references" v-bind:key="reference.id">
<a
v-if="reference.type == 'DOI' || reference.type == 'URL'"
target="_blank"
class="link-label"
v-bind:href="reference.value"
>
{{ `${reference.relation} (${reference.type}): ${reference.label}` }}
</a>
<span v-else class="normal label">
{{ `${reference.relation} (${reference.type}): ${reference.value}` }}
</span>
<span v-if="dataset.references.length > 0 && i < dataset.references.length - 1" class="normal label">--</span>
<!-- <span v-if="openAccessLicences.includes(license.name)" class="normal label uppercase"
><i class="fas fa-lock-open"></i> Open Access</span
> -->
</li>
</ul>
<p v-else>-</p>
</div>
</div>
<div class="card"> <div class="card">
<div class="column"> <div class="column">
<h3 class="label uppercase">Embargo</h3> <h3 class="label uppercase">Embargo</h3>