From ff62a98d0459aef0e3fe0b03c8e997d784255804 Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Sun, 3 Jun 2018 15:54:25 -0400 Subject: [PATCH] LP#1748265 SMS Carrier not an option in the patron's list of holds. 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 Signed-off-by: Dawn Dale Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2 | 1 + Open-ILS/web/js/ui/default/staff/circ/services/holds.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2 index 9c8962e31a..0b36120d89 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2 @@ -84,6 +84,7 @@ + diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js index 7507a764be..2faab7de80 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js @@ -37,6 +37,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 } @@ -478,6 +479,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); @@ -684,6 +690,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) { -- 2.43.2