mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
74199: AuthorizedCollectionSelectorComponent current dso query fix
This commit is contained in:
@@ -24,6 +24,13 @@ export class AuthorizedCollectionSelectorComponent extends DSOSelectorComponent
|
|||||||
super(searchService);
|
super(searchService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a query to send for retrieving the current DSO
|
||||||
|
*/
|
||||||
|
getCurrentDSOQuery(): string {
|
||||||
|
return this.currentDSOId;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a search for authorized collections with the current query and page
|
* Perform a search for authorized collections with the current query and page
|
||||||
* @param query Query to search objects for
|
* @param query Query to search objects for
|
||||||
|
@@ -131,7 +131,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
|
|||||||
// Create an observable searching for the current DSO (return empty list if there's no current DSO)
|
// Create an observable searching for the current DSO (return empty list if there's no current DSO)
|
||||||
let currentDSOResult$;
|
let currentDSOResult$;
|
||||||
if (isNotEmpty(this.currentDSOId)) {
|
if (isNotEmpty(this.currentDSOId)) {
|
||||||
currentDSOResult$ = this.search(`search.resourceid:${this.currentDSOId}`, 1);
|
currentDSOResult$ = this.search(this.getCurrentDSOQuery(), 1);
|
||||||
} else {
|
} else {
|
||||||
currentDSOResult$ = observableOf(new PaginatedList(undefined, []));
|
currentDSOResult$ = observableOf(new PaginatedList(undefined, []));
|
||||||
}
|
}
|
||||||
@@ -175,6 +175,13 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a query to send for retrieving the current DSO
|
||||||
|
*/
|
||||||
|
getCurrentDSOQuery(): string {
|
||||||
|
return `search.resourceid:${this.currentDSOId}`;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a search for the current query and page
|
* Perform a search for the current query and page
|
||||||
* @param query Query to search objects for
|
* @param query Query to search objects for
|
||||||
|
Reference in New Issue
Block a user