LP#1748265 SMS Carrier not an option in the patron's list of holds.
authorGarry Collum <gcollum@gmail.com>
Sun, 3 Jun 2018 19:54:25 +0000 (15:54 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 29 May 2019 15:05:51 +0000 (11:05 -0400)
Adds SMS Carrier name as an option in the patron's list of holds.

To test:
1. Set 'Enable features that send SMS text messages' in the Library Settings to true.
2. Place a few holds for a patron, selecting text message notification.
3. Go to the patron's record and view their holds.
4. Display the 'Notifications SMS Carrier' column to view the carrier name.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Dawn Dale <ddale@georgialibraries.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
Open-ILS/web/js/ui/default/staff/circ/services/holds.js

index fd544aa..14a6569 100644 (file)
@@ -84,6 +84,7 @@
   <eg-grid-field path='hold.usr.family_name' parent-idl-class="ahr" label="[% l('Last Name') %]" hidden></eg-grid-field>
   <eg-grid-field path='hold.requestor.id' parent-idl-class="ahr" label="[% l('Requestor ID') %]" hidden></eg-grid-field>
   <eg-grid-field path='hold.requestor.usrname' parent-idl-class="ahr" label="[% l('Requestor Username') %]" hidden></eg-grid-field>
+  <eg-grid-field path='hold.sms_carrier.name' parent-idl-class="ahr" label="[% l('Notifications SMS Carrier') %]" hidden></eg-grid-field>
 
   <eg-grid-field path='part.label' parent-idl-class="bmp" label="[% l('Part') %]" hidden></eg-grid-field>
   <eg-grid-field path='volume.*' parent-idl-class="acn" hidden></eg-grid-field>
index dc6f0aa..393aeb3 100644 (file)
@@ -46,6 +46,7 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
                     include_current_copy : true,
                     include_usr          : true,
                     include_cancel_cause : true,
+                    include_sms_carrier  : true,
                     include_requestor    : true
                 }
 
@@ -487,6 +488,11 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
             egCore.pcrud.retrieve('au',hold.usr()).then(function(u) { hold.usr(u) });
         }
 
+        if (hold.sms_carrier() && typeof hold.sms_carrier() != 'object') {
+            console.debug('fetching sms carrier');
+            egCore.pcrud.retrieve('csc',hold.sms_carrier()).then(function(c) { hold.sms_carrier(c) });
+        }
+
         // current_copy is not always fleshed in the API
         if (hold.current_copy() && typeof hold.current_copy() != 'object') {
             hold.current_copy(hold_data.copy);
@@ -795,6 +801,7 @@ function($window , $location , $timeout , egCore , egHolds , egCirc) {
                             include_current_copy : true,
                             include_usr          : true,
                             include_cancel_cause : true,
+                            include_sms_carrier  : true,
                             include_requestor    : true
                         }
                     ).then(function(hold_data) {