LP1821382 Request items menu action
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / catalog / record / holdings.component.ts
index bf375bc..623b547 100644 (file)
@@ -1,4 +1,5 @@
 import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Router} from '@angular/router';
 import {Observable, Observer, of} from 'rxjs';
 import {map} from 'rxjs/operators';
 import {Pager} from '@eg/share/util/pager';
@@ -133,6 +134,7 @@ export class HoldingsMaintenanceComponent implements OnInit {
     contextOrg: IdlObject;
 
     constructor(
+        private router: Router,
         private org: OrgService,
         private idl: IdlService,
         private pcrud: PcrudService,
@@ -830,4 +832,11 @@ export class HoldingsMaintenanceComponent implements OnInit {
             dismissed => {}
         );
     }
+
+    requestItems(rows: HoldingsEntry[]) {
+        const copyIds = this.selectedCopyIds(rows);
+        if (copyIds.length === 0) { return; }
+        const params = {target: copyIds, holdFor: 'staff'};
+        this.router.navigate(['/staff/catalog/hold/C'], {queryParams: params});
+    }
 }