LP1919465 Pull list prefix/suffix sorting; columns
authorBill Erickson <berickxx@gmail.com>
Tue, 14 Sep 2021 14:27:30 +0000 (10:27 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 24 Sep 2021 19:20:58 +0000 (15:20 -0400)
* Include call number prefix and suffix in hold pull list sorting.
* Apply sane default grid columns.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jennifer Weston <jennifer.weston@equinoxOLI.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts

index 263463a..d60e610 100644 (file)
@@ -4,6 +4,7 @@
 <eg-holds-grid
   persistKey="circ.holds.pull_list"
   printTemplate="hold_pull_list"
+  showFields="acpl_name,cn_full_label,p_label,author,title,cp_barcode,pl_shortname,hold_type,potentials,request_time"
   [enablePreFetch]="true"
   [hidePickupLibFilter]="true"
   [pullListOrg]="targetOrg()">
index 524868c..2910573 100644 (file)
       <eg-grid-column i18n-label label="Hold ID" path='id' [index]="true" datatype="id">
       </eg-grid-column>
 
+      <eg-grid-column i18n-label label="Item Location" path='acpl_name' [hidden]="true"></eg-grid-column>
+      <eg-grid-column i18n-label label="CN Full label" path='cn_full_label' [hidden]="true"></eg-grid-column>
+      <eg-grid-column i18n-label label="Part label" path='p_label' [hidden]="true"></eg-grid-column>
+      <eg-grid-column i18n-label label="Author" path='author' [hidden]="true"></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>
+
       <ng-template #barcodeTmpl let-hold="row">
         <a href="/eg/staff/cat/item/{{hold.cp_id}}/summary">
           {{hold.cp_barcode}}
       <eg-grid-column i18n-label label="Current Item" name='cp_barcode'
         [cellTemplate]="barcodeTmpl">
       </eg-grid-column>
+      <eg-grid-column i18n-label label="Pickup Library" path='pl_shortname'></eg-grid-column>
+      <eg-grid-column i18n-label label="Hold Type" path='hold_type'></eg-grid-column>
+      <eg-grid-column i18n-label label="Potential Items" path='potentials' datatype="int">
+      </eg-grid-column>
+      <eg-grid-column i18n-label label="Request Date" path='request_time' 
+        datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
 
       <ng-template #userBarcodeTmpl let-hold="row">
         <a href="/eg/staff/circ/patron/{{hold.usr_id}}/checkout">
         [cellTemplate]="userBarcodeTmpl" [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" [datePlusTime]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Capture Date" path='capture_time'
           datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Available Date" path='shelf_time'
           datatype="timestamp" [datePlusTime]="true"></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' datatype="int">
-      </eg-grid-column>
       <eg-grid-column i18n-label label="Status" [cellTemplate]="statusTemplate" name="status_string">
       </eg-grid-column>
       <eg-grid-column i18n-label label="Queue Position"
 
      <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='ancp_label' i18n-label label="CN Prefix" [hidden]="true"></eg-grid-column>
+      <eg-grid-column path='ancs_label' i18n-label label="CN Suffix" [hidden]="true"></eg-grid-column>
 
       <eg-grid-column i18n-label label="Fulfillment Date/Time" path='fulfillment_time' datatype="timestamp" [datePlusTime]="true" [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Checkin Time" path='checkin_time' datatype="timestamp" [datePlusTime]="true" [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Hold Cancel Date/Time" path='cancel_time' datatype="timestamp" [datePlusTime]="true" [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 Item" 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="CN 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 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 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="Item Location ID" path='acpl_id' [hidden]="true"></eg-grid-column>
-      <eg-grid-column i18n-label label="Item Location" path='acpl_name' [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Item Location Holdable" path='acpl_holdable' datatype="bool" [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Item Location Hold-Verify" path='acpl_hold_verify' datatype="bool" [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Item Location OPAC Visible" path='acpl_opac_visible' datatype="bool" [hidden]="true"></eg-grid-column>
index ffd9371..521bd9c 100644 (file)
@@ -172,7 +172,9 @@ export class HoldsGridComponent implements OnInit {
                 this.defaultSort = [
                     {name: 'copy_location_order_position', dir: 'asc'},
                     {name: 'acpl_name', dir: 'asc'},
-                    {name: 'cn_label_sortkey', dir: 'asc'}
+                    {name: 'ancp_label', dir: 'asc'}, // NOTE: API typo "ancp"
+                    {name: 'cn_label_sortkey', dir: 'asc'},
+                    {name: 'ancs_label', dir: 'asc'} // NOTE: API typo "ancs"
                 ];
 
             } else {