LP1806087 Catalog holds display WIP
authorBill Erickson <berickxx@gmail.com>
Sat, 16 Feb 2019 19:42:14 +0000 (11:42 -0800)
committerBill Erickson <berickxx@gmail.com>
Sat, 16 Feb 2019 19:42:14 +0000 (11:42 -0800)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/catalog/catalog.module.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/holds.component.html [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/catalog/record/holds.component.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts

index 2d30199..cc30f6c 100644 (file)
@@ -21,6 +21,7 @@ import {PartsComponent} from './record/parts.component';
 import {PartMergeDialogComponent} from './record/part-merge-dialog.component';
 import {BrowseComponent} from './browse.component';
 import {BrowseResultsComponent} from './browse/results.component';
+import {HoldsComponent} from './record/holds.component';
 
 @NgModule({
   declarations: [
@@ -39,7 +40,8 @@ import {BrowseResultsComponent} from './browse/results.component';
     PartsComponent,
     PartMergeDialogComponent,
     BrowseComponent,
-    BrowseResultsComponent
+    BrowseResultsComponent,
+    HoldsComponent
   ],
   imports: [
     StaffCommonModule,
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/holds.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/holds.component.html
new file mode 100644 (file)
index 0000000..29fd2d3
--- /dev/null
@@ -0,0 +1,218 @@
+
+<div class='eg-holds w-100 mt-3'>
+
+  <eg-grid #holdsGrid [dataSource]="gridDataSource" 
+    [useLocalSort]="true"
+    persistKey="cat.catalog.wide_holds" 
+    >
+
+    <!--
+    <eg-grid-menu-item handler="detail_view" 
+      i18n-label label="Detail View"></eg-grid-menu-item>
+
+    <eg-grid-action handler="grid_actions.show_recent_circs_wide" group="Item"
+      i18n-label label="Show Last Few Circulations"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.show_patrons_wide" group="Patron"
+      i18n-label label="Retrieve Patron"></eg-grid-action>
+    <eg-grid-action group="Hold" handler="grid_actions.set_copy_quality_wide"
+      i18n-label label="Set Desired Item Quality"></eg-grid-action>
+    <eg-grid-action group="Hold" handler="grid_actions.edit_pickup_lib_wide"
+      i18n-label label="Edit Pickup Library"></eg-grid-action>
+    <eg-grid-action group="Hold" handler="grid_actions.edit_notify_prefs_wide"
+      i18n-label label="Edit Notification Settings"></eg-grid-action>
+    <eg-grid-action group="Hold" handler="grid_actions.edit_dates_wide"
+      i18n-label label="Edit Hold Dates"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.activate_wide" group="Hold"
+      i18n-label label="Activate"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.suspend_wide" group="Hold"
+      i18n-label label="Suspend"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.set_top_of_queue_wide" group="Hold"
+      i18n-label label="Set Top of Queue"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.clear_top_of_queue_wide" group="Hold"
+      i18n-label label="Un-Set Top of Queue"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.transfer_to_marked_title_wide" group="Hold"
+      i18n-label label="Transfer To Marked Title"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.mark_damaged_wide" group="Item"
+      i18n-label label="Mark Item Damaged"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.mark_missing_wide" group="Item"
+      i18n-label label="Mark Item Missing"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.retarget_wide" group="Hold"
+      i18n-label label="Find Another Target"></eg-grid-action>
+    <eg-grid-action handler="grid_actions.cancel_wide_hold" group="Hold"
+      i18n-label label="Cancel Hold"></eg-grid-action>
+      -->
+
+    <eg-grid-column i18n-label label="Hold ID" path='id' [index]="true">
+    </eg-grid-column>
+
+    <ng-template #barcodeTmpl let-hold="row">
+      <a href="/eg/staff/cat/item/{{cp_id}}/summary">
+        {{cp_barcode}}
+      </a>
+    </ng-template>
+    <eg-grid-column i18n-label label="Current Item" name='cp_barcode'
+      [cellTemplate]="barcodeTmpl">
+    </eg-grid-column>
+
+    <eg-grid-column i18n-label label="Patron Barcode" 
+        path='ucard_barcode' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Patron alias" path="usr_alias"></eg-grid-column>
+    <eg-grid-column i18n-label label="Request Date" 
+        path='request_time' datatype="timestamp"></eg-grid-column>
+    <eg-grid-column i18n-label label="Capture Date" path='capture_time' 
+        datatype="timestamp"></eg-grid-column>
+    <eg-grid-column i18n-label label="Available Date" path='shelf_time' 
+        datatype="timestamp"></eg-grid-column>
+    <eg-grid-column i18n-label label="Hold Type" path='hold_type'></eg-grid-column>
+    <eg-grid-column i18n-label label="Pickup Library" path='pl_shortname'></eg-grid-column>
+
+    <ng-template #titleTmpl let-hold="row">
+      <a class="no-href" routerLink="/staff/catalog/record/{{hold.record_id}}">
+        {{hold.title}}
+      </a>
+    </ng-template>
+    <eg-grid-column i18n-label label="Title" [hidden]="true"
+        name='title' [cellTemplate]="titleTmpl"></eg-grid-column>
+    <eg-grid-column i18n-label label="Author" path='author'
+        [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Potential Items" path='potentials'>
+    </eg-grid-column>
+    <eg-grid-column i18n-label label="Status" path='status_string'>
+    </eg-grid-column>
+    <eg-grid-column i18n-label label="Queue Position" 
+        path='relative_queue_position' [hidden]="true"></eg-grid-column>
+
+    <!--
+
+
+    <eg-grid-column path='usr_id' i18n-label label="User ID" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='usr_usrname' i18n-label label="Username" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='usr_first_given_name' i18n-label label="First Name" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='usr_family_name' i18n-label label="Last Name" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='rusr_id' i18n-label label="Requestor ID" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='rusr_usrname' i18n-label label="Requestor Username" [hidden]="true"></eg-grid-column>
+
+   <eg-grid-column i18n-label label="Item Status" path="cs_name" [hidden]="true"></eg-grid-column>
+
+    <eg-grid-column path='acnp_label' i18n-label label="CN Prefix" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='acns_label' i18n-label label="CN Suffix" [hidden]="true"></eg-grid-column>
+    <eg-grid-column path='mvr.*' parent-idl-class="mvr" [hidden]="true"></eg-grid-column>
+
+    <eg-grid-column i18n-label label="Copy Status" path="cs_name" [hidden]="true"></eg-grid-column>
+
+    <eg-grid-column i18n-label label="Fulfillment Date/Time" path='fulfillment_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Checkin Time" path='checkin_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Return Time" path='return_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Last Targeting Date/Time" path='prev_check_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Expire Time" path='expire_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Hold Cancel Date/Time" path='cancel_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Cancelation note" path='cancel_note' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Hold Target" path='target' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Current Copy" path='current_copy' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Fulfilling Staff" path='fulfillment_staff' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Fulfilling Library" path='fulfillment_lib' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Requesting Library" path='request_lib' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Requesting User" path='requestor' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="User" path='usr' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Selection Library" path='selection_ou' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Item Selection Depth" path='selection_depth' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Holdable Formats (for M-type hold)" path='holdable_formats' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Notifications Phone Number" path='phone_notify' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Notifications SMS Number" path='sms_notify' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Notify by Email?" path='email_notify' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="SMS Carrier" path='sms_carrier' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Currently Frozen" path='frozen' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Activation Date" path='thaw_date' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Top of Queue" path='cut_in_line' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Is Mint Condition" path='mint_condition' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Shelf Expire Time" path='shelf_expire_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Current Shelf Library" path='current_shelf_lib' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Behind Desk" path='behind_desk' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Status" path='hold_status' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Clearable" path='clear_me' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Is Staff-placed Hold" path='is_staff_hold' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Cancelation Cause ID" path='cc_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Cancelation Cause" path='cc_label' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Pickup Library" path='pl_shortname'></eg-grid-column>
+    <eg-grid-column i18n-label label="Pickup Library Name" path='pl_name' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Pickup Library Email" path='pl_email' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Pickup Library Phone" path='pl_phone' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Pickup Library Opac Visible" path='pl_opac_visible' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit ID" path='tr_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Send Time" path='tr_source_send_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Receive Time" path='tr_dest_recv_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Copy" path='tr_target_copy' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Source" path='tr_source' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Destination" path='tr_dest' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Copy Status" path='tr_copy_status' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Hold" path='tr_hold' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Transit Cancel Time" path='tr_cancel_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Hold Note Count" path='note_count' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="User Display Name" path='usr_display_name' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Requestor Username" path='rusr_usrname' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy ID" path='cp_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Number on Volume" path='cp_copy_number' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Fine Level" path='cp_fine_level' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Can Circulate" path='cp_circulate' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Deposit Amount" path='cp_deposit_amount' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Is Deposit Required" path='cp_deposit' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Is Reference" path='cp_ref' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Is Holdable" path='cp_holdable' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Price" path='cp_price' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Barcode" path='cp_barcode' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Circulation Modifier" path='cp_circ_modifier' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Circulate as MARC Type" path='cp_circ_as_type' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Precat Dummy Title" path='cp_dummy_title' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Precat Dummy Author" path='cp_dummy_author' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Alert Message (deprecated)" path='cp_alert_message' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy OPAC Visible" path='cp_opac_visible' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Deleted" path='cp_deleted' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Floating Group" path='cp_floating' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Precat Dummy ISBN" path='cp_dummy_isbn' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Status Change Time" path='cp_status_change_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Active Date" path='cp_active_date' datatype="timestamp" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Is Mint Condition" path='cp_mint_condition' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Cost" path='cp_cost' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Status" path='cs_name' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Status Is Holdable" path='cs_holdable' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Status Is OPAC Visible" path='cs_opac_visible' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Status Is Copy-Active" path='cs_copy_active' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Status Is Deleted" path='cs_restrict_copy_delete' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Status Is Available" path='cs_is_available' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Issuance i18n-label label" path='issuance_label' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Call Number ID" path='cn_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="CN i18n-label label" path='cn_label' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="CN i18n-label label Class" path='cn_label_class' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="CN Sort Key" path='cn_label_sortkey' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Part ID" path='p_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Part i18n-label label" path='p_label' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Part Sort Key" path='p_label_sortkey' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Part Is Deleted" path='p_deleted' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="CN Full i18n-label label" path='cn_full_label' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Record ID" path='record_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location ID" path='acpl_id' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location" path='acpl_name' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Holdable" path='acpl_holdable' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Hold-Verify" path='acpl_hold_verify' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location OPAC Visible" path='acpl_opac_visible' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Can Circulate" path='acpl_circulate' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Prefix" path='acpl_label_prefix' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Suffix" path='acpl_label_suffix' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Checkin Alert" path='acpl_checkin_alert' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Is Deleted" path='acpl_deleted' datatype="bool" [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location URL" path='acpl_url' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Copy Location Order" path='copy_location_order_position' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Default Estimated Wait Time" path='default_estimated_wait' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Minimum Estimated Wait Time" path='min_estimated_wait' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Peer Hold Count" path='other_holds' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Total Wait Time" path='total_wait_time' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Notify Count" path='notification_count' [hidden]="true"></eg-grid-column>
+    <eg-grid-column i18n-label label="Last Notify Time" path='last_notification_time' datatype="timestamp" [hidden]="true"></eg-grid-column>
+
+-->
+
+  </eg-grid>
+
+</div>
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/holds.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/holds.component.ts
new file mode 100644 (file)
index 0000000..75517ce
--- /dev/null
@@ -0,0 +1,99 @@
+import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Observable, of} from 'rxjs';
+import {map, filter} from 'rxjs/operators';
+import {IdlObject} from '@eg/core/idl.service';
+import {NetService} from '@eg/core/net.service';
+import {OrgService} from '@eg/core/org.service';
+import {AuthService} from '@eg/core/auth.service';
+import {StaffCatalogService} from '../catalog.service';
+import {Pager} from '@eg/share/util/pager';
+import {GridDataSource} from '@eg/share/grid/grid';
+import {GridComponent} from '@eg/share/grid/grid.component';
+
+@Component({
+  selector: 'eg-catalog-holds',
+  templateUrl: 'holds.component.html'
+})
+export class HoldsComponent implements OnInit {
+
+    recId: number;
+    initDone = false;
+    gridDataSource: GridDataSource;
+    pickupLib: IdlObject;
+    holdsCount: number;
+    holdsContext: any;
+    @ViewChild('holdsGrid') copyGrid: GridComponent;
+
+    @Input() set recordId(id: number) {
+        this.recId = id;
+        // Only force new data collection when recordId()
+        // is invoked after ngInit() has already run.
+        if (this.initDone) {
+            this.copyGrid.reload();
+        }
+    }
+
+    constructor(
+        private net: NetService,
+        private org: OrgService,
+        private auth: AuthService,
+        private staffCat: StaffCatalogService,
+    ) {
+        this.gridDataSource = new GridDataSource();
+    }
+
+    ngOnInit() {
+        this.initDone = true;
+
+        this.gridDataSource.getRows = (pager: Pager, sort: any[]) => {
+            // sorting not currently supported
+            return this.fetchHolds(pager);
+        };
+
+        this.holdsContext = {
+            
+        }
+    }
+
+    fetchHolds(pager: Pager): Observable<any> {
+        if (!this.recId) { return of([]); }
+
+        const orgs = 
+            this.org.descendants(this.staffCat.searchContext.searchOrg, true);
+
+        const restrictions = {
+            is_staff_request: true,
+            fulfillment_time: null,
+            cancel_time: null,
+            record_id: this.recId,
+            pickup_lib: orgs
+        };
+
+        let first = true;
+        return this.net.request(
+            'open-ils.circ',
+            'open-ils.circ.hold.wide_hash.stream',
+            this.auth.token(),
+            restrictions
+            //restrictions, order_by, limit, offset
+        ).pipe(
+
+            filter(holdData => {
+                // First API response is the hold count.
+                if (first) {
+                    this.holdsCount = holdData;
+                    first = false;
+                    return false;
+                }
+                return true;
+            }),
+
+            map(holdData => {
+                console.log(holdData);
+                return holdData;
+            })
+        );
+    }
+}
+
+
index d138523..5f3bf73 100644 (file)
@@ -41,6 +41,9 @@
         </ng-template>
       </ngb-tab>
       <ngb-tab title="View Holds" i18n-title id="holds">
+        <ng-template ngbTabContent>
+          <eg-catalog-holds [recordId]="recordId"></eg-catalog-holds>
+        </ng-template>
       </ngb-tab>
       <ngb-tab title="Monograph Parts" i18n-title id="monoparts">
         <ng-template ngbTabContent>
index e6832f1..6c935ff 100644 (file)
@@ -12,7 +12,6 @@ import {StoreService} from '@eg/core/store.service';
 
 const ANGJS_TABS: any = {
     marc_edit: true,
-    holds: true,
     holdings: true,
     conjoined: true
 };