Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
684442d8
Commit
684442d8
authored
Jun 23, 2021
by
Stefan Probst
Browse files
fix: remove licenses field
parent
33b0df83
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/screens/item/dataset/DatasetScreen.tsx
View file @
684442d8
...
...
@@ -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
,
...
...
src/screens/item/publication/PublicationScreen.tsx
View file @
684442d8
...
...
@@ -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
,
...
...
src/screens/item/tool/ToolScreen.tsx
View file @
684442d8
...
...
@@ -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
,
...
...
src/screens/item/training-material/TrainingMaterialScreen.tsx
View file @
684442d8
...
...
@@ -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
,
...
...
src/screens/item/workflow/WorkflowScreen.tsx
View file @
684442d8
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment