mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
added tests, aot fixes, lint fixes
This commit is contained in:
@@ -10,6 +10,9 @@ import { PaginatedList } from '../data/paginated-list';
|
||||
import { Relationship } from './item-relationships/relationship.model';
|
||||
import { ResourceType } from './resource-type';
|
||||
import { getSucceededRemoteData } from './operators';
|
||||
import { GenericConstructor } from './generic-constructor';
|
||||
import { ListableObject } from '../../shared/object-collection/shared/listable-object.model';
|
||||
import { DEFAULT_ENTITY_TYPE } from '../../shared/metadata-representation/metadata-representation.decorator';
|
||||
|
||||
export class Item extends DSpaceObject {
|
||||
static type = new ResourceType('item');
|
||||
@@ -110,10 +113,10 @@ export class Item extends DSpaceObject {
|
||||
}));
|
||||
}
|
||||
|
||||
getRenderTypes(): string[] {
|
||||
getRenderTypes(): Array<string | GenericConstructor<ListableObject>> {
|
||||
let entityType = this.firstMetadataValue('relationship.type');
|
||||
if (isEmpty(entityType)) {
|
||||
entityType = 'Publication';
|
||||
entityType = DEFAULT_ENTITY_TYPE;
|
||||
}
|
||||
return [entityType, ...super.getRenderTypes()];
|
||||
}
|
||||
|
Reference in New Issue
Block a user