From 101c093829189de1e4980c0867bc775c3f656b54 Mon Sep 17 00:00:00 2001 From: Cesar Velez Date: Wed, 4 Oct 2017 14:01:25 -0400 Subject: [PATCH] LP#1712686 - display completed barcode on copy grids not partial input The check in, check out, and renew interfaces were not displaying the actual complete(d) barcode when barcode completion is on. This saves the inputted partial barcode in row_item.input_barcode and let's the returned acp.barcode be in row_item.copy_barcode for display. Signed-off by: Cesar Velez Signed-off-by: Mike Rylander --- Open-ILS/web/js/ui/default/staff/circ/checkin/app.js | 6 ++++-- Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js | 5 ++++- Open-ILS/web/js/ui/default/staff/circ/renew/app.js | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index 62713e4782..46afb5b59d 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -184,7 +184,7 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg var row_item = { index : checkinSvc.checkins.length, - copy_barcode : params.copy_barcode + input_barcode : params.copy_barcode }; // track the item in the grid before sending the request @@ -193,11 +193,13 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg egCirc.checkin(params, options).then( function(final_resp) { - + row_item.evt = final_resp.evt; angular.forEach(final_resp.data, function(val, key) { row_item[key] = val; }); + + row_item['copy_barcode'] = row_item.acp.barcode(); if (row_item.mbts) { var amt = Number(row_item.mbts.balance_owed()); diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index 52f794416c..4234f5c273 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -184,7 +184,7 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , // immediate reaction to their barcode input action. var row_item = { index : $scope.checkouts.length, - copy_barcode : params.copy_barcode, + input_barcode : params.copy_barcode, noncat_type : params.noncat_type }; @@ -212,6 +212,9 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , angular.forEach(co_resp.data, function(val, key) { row_item[key] = val; }); + + row_item['copy_barcode'] = row_item.acp.barcode(); + munge_checkout_resp(co_resp, row_item); }, function() { diff --git a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js index bb20b98d30..23df08d5e8 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js @@ -93,7 +93,7 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) { // immediate reaction to their barcode input action. var row_item = { index : $scope.renewals.length, - copy_barcode : params.copy_barcode, + input_barcode : params.copy_barcode, noncat_type : params.noncat_type }; @@ -111,6 +111,8 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) { row_item[key] = val; }); + row_item['copy_barcode'] = row_item.acp.barcode(); + if (row_item.mbts) { var amt = Number(row_item.mbts.balance_owed()); if (amt != 0) { -- 2.43.2