mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 13:03:04 +00:00
fix issue where combining entities and authority control in the same field wouldn't work
This commit is contained in:
@@ -9,6 +9,7 @@ import { hasValue, isNotEmpty, isNotNull } from '../../shared/empty.util';
|
||||
import { SubmissionSectionError, SubmissionSectionObject } from '../objects/submission-objects.reducer';
|
||||
import parseSectionErrorPaths, { SectionErrorPath } from '../utils/parseSectionErrorPaths';
|
||||
import { SubmissionService } from '../submission.service';
|
||||
import { SectionsType } from './sections-type';
|
||||
|
||||
/**
|
||||
* Directive for handling generic section functionality
|
||||
@@ -31,6 +32,12 @@ export class SectionsDirective implements OnDestroy, OnInit {
|
||||
*/
|
||||
@Input() sectionId: string;
|
||||
|
||||
/**
|
||||
* The section type
|
||||
* @type {SectionsType}
|
||||
*/
|
||||
@Input() sectionType: SectionsType;
|
||||
|
||||
/**
|
||||
* The submission id
|
||||
* @type {string}
|
||||
@@ -104,7 +111,7 @@ export class SectionsDirective implements OnDestroy, OnInit {
|
||||
}));
|
||||
|
||||
this.subs.push(
|
||||
this.sectionService.getSectionState(this.submissionId, this.sectionId).pipe(
|
||||
this.sectionService.getSectionState(this.submissionId, this.sectionId, this.sectionType).pipe(
|
||||
map((state: SubmissionSectionObject) => state.errors))
|
||||
.subscribe((errors: SubmissionSectionError[]) => {
|
||||
if (isNotEmpty(errors)) {
|
||||
|
Reference in New Issue
Block a user