Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit 684442d8 authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: remove licenses field

parent 33b0df83
......@@ -25,6 +25,10 @@ export default function DatasetScreen({
/** backend does not specify required fields. should be safe here */
const dataset = (data ?? initialData) as DeepRequired<DatasetDto>
const license = dataset.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return (
<Fragment>
{dataset !== undefined ? (
......@@ -39,7 +43,7 @@ export default function DatasetScreen({
about: dataset.properties
.filter((property) => property.type.code === 'keyword')
.map((property) => property.value),
license: dataset.licenses.map((license) => license.label),
license,
version: dataset.version,
contributor: dataset.contributors.map(
(contributor) => contributor.actor.name,
......
......@@ -25,6 +25,10 @@ export default function PublicationScreen({
/** backend does not specify required fields. should be safe here */
const publication = (data ?? initialData) as DeepRequired<PublicationDto>
const license = publication.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return (
<Fragment>
{publication !== undefined ? (
......@@ -39,7 +43,7 @@ export default function PublicationScreen({
about: publication.properties
.filter((property) => property.type.code === 'keyword')
.map((property) => property.value),
license: publication.licenses.map((license) => license.label),
license,
version: publication.version,
contributor: publication.contributors.map(
(contributor) => contributor.actor.name,
......
......@@ -25,6 +25,10 @@ export default function ToolScreen({
/** backend does not specify required fields. should be safe here */
const tool = (data ?? initialData) as DeepRequired<ToolDto>
const license = tool.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return (
<Fragment>
{tool !== undefined ? (
......@@ -39,7 +43,7 @@ export default function ToolScreen({
about: tool.properties
.filter((property) => property.type.code === 'keyword')
.map((property) => property.value),
license: tool.licenses.map((license) => license.label),
license,
version: tool.version,
contributor: tool.contributors.map(
(contributor) => contributor.actor.name,
......
......@@ -26,6 +26,10 @@ export default function TrainingMaterialScreen({
const trainingMaterial = (data ??
initialData) as DeepRequired<TrainingMaterialDto>
const license = trainingMaterial.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return (
<Fragment>
{trainingMaterial !== undefined ? (
......@@ -40,7 +44,7 @@ export default function TrainingMaterialScreen({
about: trainingMaterial.properties
.filter((property) => property.type.code === 'keyword')
.map((property) => property.value),
license: trainingMaterial.licenses.map((license) => license.label),
license,
version: trainingMaterial.version,
contributor: trainingMaterial.contributors.map(
(contributor) => contributor.actor.name,
......
......@@ -26,6 +26,10 @@ export default function WorkflowScreen({
/** backend does not specify required fields. should be safe here */
const workflow = (data ?? initialData) as DeepRequired<WorkflowDto>
const license = workflow.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return (
<Fragment>
{workflow !== undefined ? (
......@@ -40,7 +44,7 @@ export default function WorkflowScreen({
about: workflow.properties
.filter((property) => property.type.code === 'keyword')
.map((property) => property.value),
license: workflow.licenses.map((license) => license.label),
license,
version: workflow.version,
contributor: workflow.contributors.map(
(contributor) => contributor.actor.name,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment