mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
[CST-5270] Fixing ISSN removal and unit testing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, Inject, QueryList, ViewChildren } from '@angular/core';
|
||||
|
||||
import { BehaviorSubject, Observable, of, Subscription } from 'rxjs';
|
||||
import { BehaviorSubject, interval, Observable, of, Subscription } from 'rxjs';
|
||||
|
||||
import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder/json-patch-operation-path-combiner';
|
||||
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
|
||||
@@ -14,6 +14,7 @@ import { SectionsService } from '../sections.service';
|
||||
import { SectionModelComponent } from '../models/section.model';
|
||||
import { SubmissionService } from '../../submission.service';
|
||||
import { hasValue, isEmpty } from '../../../shared/empty.util';
|
||||
import { debounce, debounceTime, timeInterval } from 'rxjs/operators';
|
||||
|
||||
/**
|
||||
* This component represents a section for managing item's access conditions.
|
||||
@@ -77,9 +78,11 @@ export class SubmissionSectionSherpaPoliciesComponent extends SectionModelCompon
|
||||
* Expand all primary accordions
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
this.acc.forEach(accordion => {
|
||||
accordion.expandAll();
|
||||
});
|
||||
if (this.acc) {
|
||||
this.acc.forEach(accordion => {
|
||||
accordion.expandAll();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,9 +96,20 @@ export class SubmissionSectionSherpaPoliciesComponent extends SectionModelCompon
|
||||
this.sectionService.getSectionData(this.submissionId, this.sectionData.id, this.sectionData.sectionType)
|
||||
.subscribe((sherpaPolicies: WorkspaceitemSectionSherpaPoliciesObject) => {
|
||||
this.sherpaPoliciesData$.next(sherpaPolicies);
|
||||
console.log(this.sherpaPoliciesData$.value)
|
||||
})
|
||||
);
|
||||
|
||||
this.subs.push(
|
||||
this.sherpaPoliciesData$.pipe(
|
||||
debounceTime(500)
|
||||
).subscribe((sherpaPolicies: WorkspaceitemSectionSherpaPoliciesObject) => {
|
||||
if (this.acc) {
|
||||
this.acc.forEach(accordion => {
|
||||
accordion.expandAll();
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user