83635: Keep bitstream param on link

This commit is contained in:
Kristof De Langhe
2021-10-14 11:25:03 +02:00
parent 881eb92fa1
commit a745468b0c
4 changed files with 26 additions and 11 deletions

View File

@@ -22,9 +22,14 @@ export function getBitstreamModuleRoute() {
export function getBitstreamDownloadRoute(bitstream): string {
return new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString();
}
export function getBitstreamRequestACopyRoute(item, bitstream): string {
export function getBitstreamRequestACopyRoute(item, bitstream): { routerLink: string, queryParams: any } {
const url = new URLCombiner(getItemModuleRoute(), item.uuid, 'request-a-copy').toString();
return `${url}?bitstream=${bitstream.uuid}`;
return {
routerLink: url,
queryParams: {
bitstream: bitstream.uuid
}
};
}
export const ADMIN_MODULE_PATH = 'admin';