LP1908614: Show the Age Hold Protection name in the staff catalog
authorJason Boyer <JBoyer@equinoxOLI.org>
Fri, 20 Aug 2021 18:00:25 +0000 (14:00 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 20 Sep 2021 15:32:23 +0000 (11:32 -0400)
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm

index ea6d030..fdb1382 100644 (file)
   </div>
 </ng-template>
 
+<ng-template #ageTemplate let-copy="row">
+  {{copy.age_protect_label}}
+</ng-template>
+
 <div class='eg-copies w-100 mt-3'>
   <eg-grid #copyGrid [dataSource]="gridDataSource" 
     [disableSelect]="true" [cellTextGenerator]="cellTextGenerator"
@@ -69,7 +73,8 @@
     </eg-grid-column>
     <eg-grid-column i18n-label label="Circulation Modifier" path="circ_modifier">
     </eg-grid-column>
-    <eg-grid-column i18n-label label="Age Hold Protection" path="age_protect">
+    <eg-grid-column i18n-label label="Age Hold Protection" path="age_protect"
+      [cellTemplate]="ageTemplate">
     </eg-grid-column>
     <eg-grid-column i18n-label label="Active/Create Date" 
       path="active_date" datatype="timestamp">
index d5da49b..bd82c67 100644 (file)
@@ -2123,6 +2123,9 @@ sub basic_opac_copy_query {
                 {column => 'label', alias => 'part_label'},
             ],
             ($staff ? (erfcc => ['circ_count']) : ()),
+            crahp => [
+                {column => 'name', alias => 'age_protect_label'}
+            ],
             ($iss_id ? (sitem => ["issuance"]) : ())
         },
 
@@ -2158,7 +2161,10 @@ sub basic_opac_copy_query {
                         bmp => { type => 'left', filter => { deleted => 'f' } }
                     }
                 }},
-                ($iss_id ? { # 6 
+                {'crahp' => { # 6
+                    type => 'left'
+                }},
+                ($iss_id ? { # 7
                     sitem => {
                         fkey => 'id',
                         field => 'unit',