refactor followlinks to use a single object for all params and add an isOptional param. Also add support for embedding links to search service

This commit is contained in:
Art Lowel
2021-06-28 12:28:59 +02:00
parent 7714ef47c8
commit 0d5fc8a1c0
22 changed files with 170 additions and 64 deletions

View File

@@ -55,10 +55,7 @@ export class ClaimedApprovedSearchResultListElementComponent extends SearchResul
super.ngOnInit();
this.linkService.resolveLinks(this.dso,
followLink('workflowitem',
null,
true,
false,
true,
{ useCachedVersionIfAvailable: false },
followLink('item'),
followLink('submitter')
),

View File

@@ -56,10 +56,7 @@ export class ClaimedDeclinedSearchResultListElementComponent extends SearchResul
super.ngOnInit();
this.linkService.resolveLinks(this.dso,
followLink('workflowitem',
null,
true,
false,
true,
{ useCachedVersionIfAvailable: false },
followLink('item'),
followLink('submitter')
),

View File

@@ -50,7 +50,7 @@ export class ClaimedSearchResultListElementComponent extends SearchResultListEle
*/
ngOnInit() {
super.ngOnInit();
this.linkService.resolveLinks(this.dso, followLink('workflowitem', null, true, true, true,
this.linkService.resolveLinks(this.dso, followLink('workflowitem', {},
followLink('item'), followLink('submitter')
), followLink('action'));
this.workflowitemRD$ = this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>;

View File

@@ -60,7 +60,7 @@ export class PoolSearchResultListElementComponent extends SearchResultListElemen
*/
ngOnInit() {
super.ngOnInit();
this.linkService.resolveLinks(this.dso, followLink('workflowitem', null, true, true, true,
this.linkService.resolveLinks(this.dso, followLink('workflowitem', {},
followLink('item'), followLink('submitter')
), followLink('action'));
this.workflowitemRD$ = this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>;