From 3cf003ef50496d6742bebda43862655d14241dc4 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Tue, 29 May 2018 16:06:59 +0000 Subject: [PATCH] lp1749502 Prefix patch - Ensure prefix information is properly set Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 modified: Open-ILS/web/js/ui/default/staff/circ/services/holds.js Signed-off-by: Jason Stephenson Signed-off-by: Josh Stompro Signed-off-by: John Amundson --- .../print_templates/t_hold_pull_list.tt2 | 2 +- .../ui/default/staff/circ/services/holds.js | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 index 8be65d4416..5a06dde9c8 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 @@ -29,7 +29,7 @@ Template for printing a table of holds to pull. Fields include: - + {{hold_data.hold.hold_type}} {{hold_data.title}} {{hold_data.author}} 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 0401ac20f6..02b495f72b 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 @@ -517,16 +517,18 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) { }); } - if (volume) { - //Call number affixes are not always fleshed in the API - if (volume.prefix() && typeof volume.prefix() != 'object') { - console.debug('fetching call number prefix'); - egCore.pcrud.retrieve('acnp',volume.prefix()).then(function(p) {volume.prefix(p)}); - } - if (volume.suffix() && typeof volume.suffix() != 'object') { - console.debug('fetching call number prefix'); - egCore.pcrud.retrieve('acns',volume.suffix()).then(function(s) {volume.suffix(s)}); - } + //Call number affixes are not always fleshed in the API + if (hold_data.volume.prefix) { + console.debug('fetching call number prefix'); + console.log(hold_data.volume.prefix()); + egCore.pcrud.retrieve('acnp',hold_data.volume.prefix()) + .then(function(p) {hold_data.volume.prefix = p.label()}); + } + if (hold_data.volume.suffix) { + console.debug('fetching call number suffix'); + console.log(hold_data.volume.suffix()); + egCore.pcrud.retrieve('acns',hold_data.volume.suffix()) + .then(function(s) {hold_data.volume.suffix = s.label()}); } } -- 2.43.2