LPXXX Holds pull list Angular port
authorBill Erickson <berickxx@gmail.com>
Mon, 15 Mar 2021 14:48:54 +0000 (10:48 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 15 Mar 2021 14:48:54 +0000 (10:48 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.html
Open-ILS/src/eg2/src/app/staff/nav.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
Open-ILS/src/sql/Pg/upgrade/XXXX.data.pull-list-print-template.sql [new file with mode: 0644]
Open-ILS/src/templates/staff/navbar.tt2

index 048e8cd..6bec9bf 100644 (file)
@@ -4,6 +4,8 @@
 <eg-holds-grid
   printTemplate="holds_pull_list"
   persistKey="circ.holds.pull_list"
+  preFetchSetting="circ.holds.pull_list.prefetch"
+  printTemplate="hold_pull_list"
   [hidePickupLibFilter]="true"
   [pullListOrg]="targetOrg()">
 </eg-holds-grid>
index 7215c62..e2d0ad7 100644 (file)
@@ -61,7 +61,7 @@
             <span class="material-icons" aria-hidden="true">pin_drop</span>
             <span i18n>Capture Holds</span>
           </a>
-          <a class="dropdown-item" href="/eg/staff/circ/holds/pull">
+          <a class="dropdown-item" routerLink="/staff/circ/holds/pull-list">
             <span class="material-icons" aria-hidden="true">view_list</span>
             <span i18n>Pull List for Hold Requests</span>
           </a>
index 5d8c3be..8bf7e7c 100644 (file)
       [multiSortable]="true" [persistKey]="persistKey"
       (onRowActivate)="showDetail($event)">
 
+      <eg-grid-toolbar-button *ngIf="pullListOrg" 
+        (onClick)="printHolds()" i18n-label label="Print Full List">
+      </eg-grid-toolbar-button>
+
       <eg-grid-toolbar-checkbox
-        (onChange)="preFetchHolds($event)" *ngIf="!hopeless && this.preFetchSetting"
+        (onChange)="preFetchHolds($event)" *ngIf="!hopeless && preFetchSetting"
         [initialValue]="enablePreFetch" i18n-label label="Pre-Fetch All Holds">
       </eg-grid-toolbar-checkbox>
 
index a725629..ab355a3 100644 (file)
@@ -298,6 +298,7 @@ export class HoldsGridComponent implements OnInit {
         } else if (this.pullListOrg) {
             orderBy.push(
                 {copy_location_order_position: {dir: 'asc', nulls: 'last'}},
+                {acpl_name: {dir: 'asc', nulls: 'last'}},
                 {cn_label_sortkey: {dir: 'asc'}}
             );
         }
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.pull-list-print-template.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.pull-list-print-template.sql
new file mode 100644 (file)
index 0000000..6b1c71c
--- /dev/null
@@ -0,0 +1,77 @@
+
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+
+-- NOTE: If the template ID requires changing, beware it appears in
+-- 3 places below.
+
+INSERT INTO config.print_template 
+    (id, name, locale, active, owner, label, template) 
+VALUES (
+    4, 'hold_pull_list', 'en-US', TRUE,
+    (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL),
+    oils_i18n_gettext(4, 'Hold Pull List ', 'cpt', 'label'),
+    ''
+);
+
+UPDATE config.print_template SET template = 
+$TEMPLATE$
+[%-
+    USE date;
+    SET holds = template_data;
+    # template_data is an arry of wide_hold hashes.
+-%]
+<div>
+  <style>
+    #holds-pull-list-table td { 
+      padding: 5px; 
+      border: 1px solid rgba(0,0,0,.05);
+    }
+  </style>
+  <table id="holds-pull-list-table">
+    <thead>
+      <tr>
+        <th>Type</th>
+        <th>Title</th>
+        <th>Author</th>
+        <th>Shelf Location</th>
+        <th>Call Number</th>
+        <th>Barcode/Part</th>
+      </tr>
+    </thead>
+    <tbody>
+      [% FOR hold IN holds %]
+      <tr>
+        <td>[% hold.hold_type %]</td>
+        <td style="width: 30%">[% hold.title %]</td>
+        <td style="width: 25%">[% hold.author %]</td>
+        <td>[% hold.acpl_name %]</td>
+        <td>[% hold.cn_full_label %]</td>
+        <td>[% hold.cp_barcode %][% IF hold.p_label %]/[% hold.p_label %][% END %]</td>
+      </tr>
+      [% END %]
+    </tbody>
+  </table>
+</div>
+$TEMPLATE$ WHERE id = 4;
+
+INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
+VALUES (
+    'eg.grid.circ.holds.pull_list', 'gui', 'object', 
+    oils_i18n_gettext(
+        'circ.holds.pull_list',
+        'Hold Pull List Grid Settings',
+        'cwst', 'label'
+    )
+), (
+    'circ.holds.pull_list.prefetch', 'gui', 'bool', 
+    oils_i18n_gettext(
+        'circ.holds.pull_list.prefetch',
+        'Hold Pull List Prefetch Preference',
+        'cwst', 'label'
+    )
+);
+
+COMMIT;
+
index 5daf52d..bb0409a 100644 (file)
             </a>
           </li>
           <li>
-            <a href="./circ/holds/pull" target="_self">
+            <a href="/eg2/staff/circ/holds/pull-list">
               <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
               [% l('Pull List for Hold Requests') %]
             </a>