From fc8efa9c032c15bd10de91b3ebe96d3be7cb703b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 19 Feb 2019 15:12:19 -0500 Subject: [PATCH] LP1806087 Catalog holds display WIP (grid actions) Signed-off-by: Bill Erickson --- .../share/holds-grid/holds-grid.component.html | 67 ++++++++++++---------- .../staff/share/holds-grid/holds-grid.component.ts | 20 +++++++ 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.html b/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.html index d52bd0855f..dfb03f5be6 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.html @@ -27,39 +27,44 @@ [multiSortable]="true" persistKey="cat.catalog.wide_holds"> + [action]="showDetails"> + + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.ts index d72018f5bf..6f04cea29d 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holds-grid/holds-grid.component.ts @@ -73,7 +73,10 @@ export class HoldsGridComponent implements OnInit { } } + // Grid Toolbar Handlers showDetails: (rows: any[]) => void; + showRecentCircs: (rows: any[]) => void; + showPatron: (rows: any[]) => void; constructor( private net: NetService, @@ -82,12 +85,29 @@ export class HoldsGridComponent implements OnInit { ) { this.gridDataSource = new GridDataSource(); + // Grid Toolbar Handlers this.showDetails = (rows: any[]) => { if (rows.length) { this.mode = 'detail'; this.detailHold = rows[0]; } } + + this.showRecentCircs = (rows: any[]) => { + if (rows.length) { + const url = + '/eg/staff/cat/item/' + rows[0].cp_id + '/circ_list'; + window.open(url, '_blank'); + } + } + + this.showPatron = (rows: any[]) => { + if (rows.length) { + const url = + '/eg/staff/circ/patron/' + rows[0].usr_id + '/checkout'; + window.open(url, '_blank'); + } + } } ngOnInit() { -- 2.11.0