From 19cf7168b0110573da7ab2e3522e65c8207769ce Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Tue, 17 Oct 2017 20:11:25 +0000 Subject: [PATCH] LP#1646210 Add CN Affixes to Grids WIP Adds Call Number Suffixes and Prefixes to the following grids: - Copy Buckets - Pending Copy Buckets - Checkin/Capture Holds - Patron Holds - Patron Checkout - Patron Items Out - Patron Bill History - Holds Shelf - Renew Items - In-House Uses - Bib Record View Holds - Patron Bill History - Transit List - Copy Editor Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2 modified: Open-ILS/src/templates/staff/cat/bucket/copy/t_view.tt2 modified: Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2 modified: Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 modified: Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2 modified: Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 modified: Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 modified: Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2 modified: Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 modified: Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2 modified: Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 modified: Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 modified: Open-ILS/src/templates/staff/circ/transits/t_list.tt2 modified: Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js modified: Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js modified: Open-ILS/web/js/ui/default/staff/circ/services/circ.js modified: Open-ILS/web/js/ui/default/staff/circ/services/holds.js modified: Open-ILS/web/js/ui/default/staff/circ/transits/list.js Signed-off-by: Kathy Lussier --- .../src/templates/staff/cat/bucket/copy/t_pending.tt2 | 2 ++ .../src/templates/staff/cat/bucket/copy/t_view.tt2 | 2 ++ Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2 | 2 ++ Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 | 2 ++ .../templates/staff/circ/checkin/t_checkin_table.tt2 | 2 ++ .../src/templates/staff/circ/holds/t_shelf_list.tt2 | 2 ++ .../src/templates/staff/circ/in_house_use/index.tt2 | 2 ++ .../staff/circ/patron/t_bill_history_xacts.tt2 | 2 ++ .../src/templates/staff/circ/patron/t_checkout.tt2 | 2 ++ .../src/templates/staff/circ/patron/t_holds_list.tt2 | 2 ++ .../src/templates/staff/circ/patron/t_items_out.tt2 | 2 ++ Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 | 8 +++++++- Open-ILS/src/templates/staff/circ/transits/t_list.tt2 | 2 ++ .../web/js/ui/default/staff/circ/in_house_use/app.js | 2 +- .../web/js/ui/default/staff/circ/patron/items_out.js | 2 +- .../web/js/ui/default/staff/circ/services/circ.js | 8 ++++++++ .../web/js/ui/default/staff/circ/services/holds.js | 11 +++++++++++ .../web/js/ui/default/staff/circ/transits/list.js | 2 +- 18 files changed, 53 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2 b/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2 index 6391625678..2396333289 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2 @@ -47,7 +47,9 @@ {{item['barcode']}} + + + + + + diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 index ba58c126a9..1404983701 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 @@ -122,7 +122,9 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2 b/Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2 index 4d34a6148c..8ff4853001 100644 --- a/Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2 +++ b/Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2 @@ -104,6 +104,8 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 b/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 index 73c3cd12c7..649e346ca0 100644 --- a/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 +++ b/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 @@ -95,6 +95,8 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 index 0e3ab44848..988955758a 100644 --- a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 @@ -74,7 +74,9 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2 index d3bb64f275..361eb79b39 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2 @@ -47,6 +47,8 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 index 773d91104d..ebcfb44bce 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 @@ -141,6 +141,8 @@ + + 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 286b7ec7eb..82bfee69e4 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,8 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 index 4c354fd40d..4efa432bca 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 @@ -99,6 +99,8 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 b/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 index a84373ac5b..344e851b8f 100644 --- a/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 +++ b/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 @@ -87,9 +87,15 @@ - + + + + diff --git a/Open-ILS/src/templates/staff/circ/transits/t_list.tt2 b/Open-ILS/src/templates/staff/circ/transits/t_list.tt2 index 89e69727a5..f4507bb181 100644 --- a/Open-ILS/src/templates/staff/circ/transits/t_list.tt2 +++ b/Open-ILS/src/templates/staff/circ/transits/t_list.tt2 @@ -52,7 +52,9 @@ + + {{item['target_copy.call_number.record.simple_record.title']}} diff --git a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js index 69427d1d11..887e60bfd2 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js @@ -95,7 +95,7 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog) { flesh : 3, flesh_fields : { acp : ['call_number','location'], - acn : ['record'], + acn : ['record', 'prefix', 'suffix'], bre : ['simple_record'] }, select : { bre : ['id'] } // avoid fleshing MARC diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index 7df204ab92..6679af6b1d 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -107,7 +107,7 @@ function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $ flesh_fields : { circ : ['target_copy', 'workstation', 'checkin_workstation'], acp : ['call_number', 'holds_count', 'status', 'circ_lib'], - acn : ['record', 'owning_lib'], + acn : ['record', 'owning_lib', 'prefix', 'suffix'], bre : ['simple_record'] }, // avoid fetching the MARC blob by specifying which diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 4a5130b9f7..27f9caafd7 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -277,6 +277,14 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, return; } + // retrieve call number affixes prior to sending payload data to the grid + if (payload.volume && typeof payload.volume.prefix() != 'object') { + egCore.pcrud.retrieve('acnp',payload.volume.prefix()).then(function(p) {payload.volume.prefix(p)}); + }; + if (payload.volume && typeof payload.volume.suffix() != 'object') { + egCore.pcrud.retrieve('acns',payload.volume.suffix()).then(function(s) {payload.volume.suffix(s)}); + }; + data.circ = payload.circ; data.parent_circ = payload.parent_circ; data.hold = payload.hold; 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 02546903b5..8b1d0f447a 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 @@ -455,6 +455,7 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) { || hold_data.status; var hold = hold_data.hold; + var volume = hold_data.volume; hold.pickup_lib(egCore.org.get(hold.pickup_lib())); hold.current_shelf_lib(egCore.org.get(hold.current_shelf_lib())); hold_data.id = hold.id(); @@ -487,6 +488,16 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) { egCore.pcrud.retrieve('ccs',hold.current_copy().status() ).then(function(c) { hold.current_copy().status(c) }); } + + //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)}); + } } return service; diff --git a/Open-ILS/web/js/ui/default/staff/circ/transits/list.js b/Open-ILS/web/js/ui/default/staff/circ/transits/list.js index 47789ae16c..0c13f3ec49 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/transits/list.js +++ b/Open-ILS/web/js/ui/default/staff/circ/transits/list.js @@ -256,7 +256,7 @@ function($scope , $q , $routeParams , $window , egCore , egTransits , egGridData 'flesh_fields' : { 'atc' : ['target_copy','dest','source','hold_transit_copy'], 'acp' : ['call_number','location','circ_lib'], - 'acn' : ['record'], + 'acn' : ['record', 'prefix', 'suffix'], 'bre' : ['simple_record'], 'ahtc' : ['hold'], 'ahr' : ['usr'], -- 2.43.2