diff --git a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts index 68bdf7b561..0177cc3a38 100644 --- a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts @@ -6,6 +6,7 @@ import { RemoteData } from '../../../core/data/remote-data'; import { Collection } from '../../../core/shared/collection.model'; import { getRemoteDataPayload, getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { HALLink } from '../../../core/shared/hal-link.model'; +import { hasValue } from '../../../shared/empty.util'; /** * Component for managing a collection's roles @@ -45,25 +46,31 @@ export class CollectionRolesComponent implements OnInit { ); this.comcolRoles$ = this.collection$.pipe( - map((collection) => [ - { - name: 'collection-admin', - href: collection._links.adminGroup.href, - }, - { - name: 'submitters', - href: collection._links.submittersGroup.href, - }, - { - name: 'item_read', - href: collection._links.itemReadGroup.href, - }, - { - name: 'bitstream_read', - href: collection._links.bitstreamReadGroup.href, - }, - ...(collection._links.workflowGroups ? collection._links.workflowGroups : []), - ]), + map((collection) => { + let workflowGroups: HALLink[] | HALLink = hasValue(collection._links.workflowGroups) ? collection._links.workflowGroups : []; + if (!Array.isArray(workflowGroups)) { + workflowGroups = [workflowGroups]; + } + return [ + { + name: 'collection-admin', + href: collection._links.adminGroup.href, + }, + { + name: 'submitters', + href: collection._links.submittersGroup.href, + }, + { + name: 'item_read', + href: collection._links.itemReadGroup.href, + }, + { + name: 'bitstream_read', + href: collection._links.bitstreamReadGroup.href, + }, + ...workflowGroups, + ]; + }), ); } } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 6addb5a81b..97af59d159 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -1179,6 +1179,11 @@ "comcol-role.edit.reviewer.description": "Reviewers are able to accept or reject incoming submissions. However, they are not able to edit the submission's metadata.", + "comcol-role.edit.scorereviewers.name": "Score Reviewers", + + "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", + + "community.form.abstract": "Short Description",