mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 21:13:07 +00:00
[CST-9636] WIP Create unit tests
This commit is contained in:
@@ -1,20 +1,34 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import {
|
||||
AccessControlFormContainerComponent
|
||||
} from '../../../shared/access-control-form-container/access-control-form-container.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-bulk-access-settings',
|
||||
templateUrl: './bulk-access-settings.component.html',
|
||||
styleUrls: ['./bulk-access-settings.component.scss']
|
||||
templateUrl: 'bulk-access-settings.component.html',
|
||||
styleUrls: ['./bulk-access-settings.component.scss'],
|
||||
exportAs: 'dsBulkSettings'
|
||||
})
|
||||
export class BulkAccessSettingsComponent implements OnInit {
|
||||
export class BulkAccessSettingsComponent {
|
||||
|
||||
/**
|
||||
* The selection list id
|
||||
* The SectionsDirective reference
|
||||
*/
|
||||
@Input() listId!: string;
|
||||
@ViewChild('dsAccessControlForm') controlForm: AccessControlFormContainerComponent<any>;
|
||||
|
||||
constructor() { }
|
||||
/**
|
||||
* Will be used from a parent component to read the value of the form
|
||||
*/
|
||||
getValue() {
|
||||
return this.controlForm.getFormValue();
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
/**
|
||||
* Reset the form to its initial state
|
||||
* This will also reset the state of the child components (bitstream and item access)
|
||||
*/
|
||||
reset() {
|
||||
this.controlForm.reset()
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user