Skip to content

Commit f90ef54

Browse files
atarix83vins01-4science
authored andcommitted
Merged in task/dspace-cris-2023_02_x/DSC-2265 (pull request DSpace#3063)
[DSC-2265] Add param for handling bundle name Approved-by: Vincenzo Mecca
2 parents 78a83cb + f412007 commit f90ef54

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/app/lucky-search/search/lucky-search.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export class LuckySearchComponent implements OnInit {
6363
private DESCRIPTION_METADATA = 'dc.description';
6464

6565
bitstreamFilters$ = new BehaviorSubject<MetadataFilter[]>(null);
66+
bundleName: string;
6667
item$ = new Subject<Item>();
6768
bitstreams$: BehaviorSubject<Bitstream[]> = new BehaviorSubject([]);
6869

@@ -92,6 +93,7 @@ export class LuckySearchComponent implements OnInit {
9293
}
9394
});
9495
const value = this.parseBitstreamFilters(queryParams);
96+
this.bundleName = queryParams?.bundleName ?? 'ORIGINAL';
9597
this.bitstreamFilters$.next(value);
9698
} else {
9799
this.bitstreamFilters$.next([]);
@@ -208,7 +210,7 @@ export class LuckySearchComponent implements OnInit {
208210
}
209211

210212
private loadBitstreamsAndRedirectIfNeeded(item: Item, bitstreamFilters: MetadataFilter[]): Observable<Bitstream[]> {
211-
return this.bitstreamDataService.findByItem(item.uuid, 'ORIGINAL', bitstreamFilters, {})
213+
return this.bitstreamDataService.findByItem(item.uuid, this.bundleName, bitstreamFilters, {})
212214
.pipe(
213215
getFirstCompletedRemoteData(),
214216
map(bitstreamsResult => bitstreamsResult.payload?.page),

0 commit comments

Comments
 (0)