55946: Refactoring of object-select and collection-select component

This commit is contained in:
Kristof De Langhe
2018-10-10 13:30:29 +02:00
parent c4203f25d5
commit 0b3b5d3965
12 changed files with 323 additions and 86 deletions

View File

@@ -0,0 +1,29 @@
import { Component } from '@angular/core';
import { Collection } from '../../../core/shared/collection.model';
import { ObjectSelectComponent } from '../object-select/object-select.component';
import { isNotEmpty } from '../../empty.util';
import { ObjectSelectService } from '../object-select.service';
@Component({
selector: 'ds-collection-select',
styleUrls: ['./collection-select.component.scss'],
templateUrl: './collection-select.component.html'
})
/**
* A component used to select collections from a specific list and returning the UUIDs of the selected collections
*/
export class CollectionSelectComponent extends ObjectSelectComponent<Collection> {
constructor(protected objectSelectService: ObjectSelectService) {
super(objectSelectService);
}
ngOnInit(): void {
super.ngOnInit();
if (!isNotEmpty(this.confirmButton)) {
this.confirmButton = 'collection.select.confirm';
}
}
}