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({ ...@@ -25,6 +25,10 @@ export default function DatasetScreen({
/** backend does not specify required fields. should be safe here */ /** backend does not specify required fields. should be safe here */
const dataset = (data ?? initialData) as DeepRequired<DatasetDto> const dataset = (data ?? initialData) as DeepRequired<DatasetDto>
const license = dataset.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return ( return (
<Fragment> <Fragment>
{dataset !== undefined ? ( {dataset !== undefined ? (
...@@ -39,7 +43,7 @@ export default function DatasetScreen({ ...@@ -39,7 +43,7 @@ export default function DatasetScreen({
about: dataset.properties about: dataset.properties
.filter((property) => property.type.code === 'keyword') .filter((property) => property.type.code === 'keyword')
.map((property) => property.value), .map((property) => property.value),
license: dataset.licenses.map((license) => license.label), license,
version: dataset.version, version: dataset.version,
contributor: dataset.contributors.map( contributor: dataset.contributors.map(
(contributor) => contributor.actor.name, (contributor) => contributor.actor.name,
......
...@@ -25,6 +25,10 @@ export default function PublicationScreen({ ...@@ -25,6 +25,10 @@ export default function PublicationScreen({
/** backend does not specify required fields. should be safe here */ /** backend does not specify required fields. should be safe here */
const publication = (data ?? initialData) as DeepRequired<PublicationDto> const publication = (data ?? initialData) as DeepRequired<PublicationDto>
const license = publication.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return ( return (
<Fragment> <Fragment>
{publication !== undefined ? ( {publication !== undefined ? (
...@@ -39,7 +43,7 @@ export default function PublicationScreen({ ...@@ -39,7 +43,7 @@ export default function PublicationScreen({
about: publication.properties about: publication.properties
.filter((property) => property.type.code === 'keyword') .filter((property) => property.type.code === 'keyword')
.map((property) => property.value), .map((property) => property.value),
license: publication.licenses.map((license) => license.label), license,
version: publication.version, version: publication.version,
contributor: publication.contributors.map( contributor: publication.contributors.map(
(contributor) => contributor.actor.name, (contributor) => contributor.actor.name,
......
...@@ -25,6 +25,10 @@ export default function ToolScreen({ ...@@ -25,6 +25,10 @@ export default function ToolScreen({
/** backend does not specify required fields. should be safe here */ /** backend does not specify required fields. should be safe here */
const tool = (data ?? initialData) as DeepRequired<ToolDto> const tool = (data ?? initialData) as DeepRequired<ToolDto>
const license = tool.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return ( return (
<Fragment> <Fragment>
{tool !== undefined ? ( {tool !== undefined ? (
...@@ -39,7 +43,7 @@ export default function ToolScreen({ ...@@ -39,7 +43,7 @@ export default function ToolScreen({
about: tool.properties about: tool.properties
.filter((property) => property.type.code === 'keyword') .filter((property) => property.type.code === 'keyword')
.map((property) => property.value), .map((property) => property.value),
license: tool.licenses.map((license) => license.label), license,
version: tool.version, version: tool.version,
contributor: tool.contributors.map( contributor: tool.contributors.map(
(contributor) => contributor.actor.name, (contributor) => contributor.actor.name,
......
...@@ -26,6 +26,10 @@ export default function TrainingMaterialScreen({ ...@@ -26,6 +26,10 @@ export default function TrainingMaterialScreen({
const trainingMaterial = (data ?? const trainingMaterial = (data ??
initialData) as DeepRequired<TrainingMaterialDto> initialData) as DeepRequired<TrainingMaterialDto>
const license = trainingMaterial.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return ( return (
<Fragment> <Fragment>
{trainingMaterial !== undefined ? ( {trainingMaterial !== undefined ? (
...@@ -40,7 +44,7 @@ export default function TrainingMaterialScreen({ ...@@ -40,7 +44,7 @@ export default function TrainingMaterialScreen({
about: trainingMaterial.properties about: trainingMaterial.properties
.filter((property) => property.type.code === 'keyword') .filter((property) => property.type.code === 'keyword')
.map((property) => property.value), .map((property) => property.value),
license: trainingMaterial.licenses.map((license) => license.label), license,
version: trainingMaterial.version, version: trainingMaterial.version,
contributor: trainingMaterial.contributors.map( contributor: trainingMaterial.contributors.map(
(contributor) => contributor.actor.name, (contributor) => contributor.actor.name,
......
...@@ -26,6 +26,10 @@ export default function WorkflowScreen({ ...@@ -26,6 +26,10 @@ export default function WorkflowScreen({
/** backend does not specify required fields. should be safe here */ /** backend does not specify required fields. should be safe here */
const workflow = (data ?? initialData) as DeepRequired<WorkflowDto> const workflow = (data ?? initialData) as DeepRequired<WorkflowDto>
const license = workflow.properties.find((property) => {
return property.type.code === 'license'
})?.concept.label
return ( return (
<Fragment> <Fragment>
{workflow !== undefined ? ( {workflow !== undefined ? (
...@@ -40,7 +44,7 @@ export default function WorkflowScreen({ ...@@ -40,7 +44,7 @@ export default function WorkflowScreen({
about: workflow.properties about: workflow.properties
.filter((property) => property.type.code === 'keyword') .filter((property) => property.type.code === 'keyword')
.map((property) => property.value), .map((property) => property.value),
license: workflow.licenses.map((license) => license.label), license,
version: workflow.version, version: workflow.version,
contributor: workflow.contributors.map( contributor: workflow.contributors.map(
(contributor) => contributor.actor.name, (contributor) => contributor.actor.name,
......
Supports Markdown
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