From: Mike Risher Date: Tue, 11 Feb 2020 19:22:22 +0000 (+0000) Subject: lp1668352 patrons with negative balance barcode X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fmrisher%2Flp1668352-negative-balances-barcode;p=working%2FEvergreen.git lp1668352 patrons with negative balance barcode WIP Signed-off-by: Mike Risher Changes to be committed: modified: Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2 modified: Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js --- diff --git a/Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2 b/Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2 index 8291796a26..599f7947d2 100644 --- a/Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2 +++ b/Open-ILS/src/templates/staff/admin/local/circ/neg_balance_users.tt2 @@ -41,6 +41,9 @@ label="[% l('Retrieve Patron') %]"> + + [% l('{{usr.card.barcode}}'); %] + diff --git a/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js b/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js index 1386c6c863..098aef550c 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js +++ b/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js @@ -10,6 +10,8 @@ function($scope , $q , $timeout , $location , $window , egCore , $scope.grid_provider = egGridDataProvider.instance({}); + + // API does not currenlty support paging, so it's all or none. $scope.grid_provider.get = function(offset, count) { if (!$scope.context_org) return $q.when(); @@ -22,9 +24,18 @@ function($scope , $q , $timeout , $location , $window , egCore , 'open-ils.actor.users.negative_balance', egCore.auth.token(), $scope.context_org.id()) .then(deferred.resolve, null, function(blob) { + console.log("blob") + console.log(blob) + console.log(blob.usr) + console.log(blob.usr.id()) + // console.log(blob.usr.card().barcode()) egProgressDialog.increment(); + blob.url = "./circ/patron/" + blob.usr.id() + "/checkout/"; // Give the grid a top-level identifier field blob.usr_id = blob.usr.id(); + console.log("after blob") + console.log(blob); + console.log(blob.usr); deferred.notify(blob) }).finally(egProgressDialog.close); @@ -46,14 +57,42 @@ function($scope , $q , $timeout , $location , $window , egCore , if (!selected.length) return; angular.forEach(selected, function(data) { $timeout(function() { + console.log("data") + console.log(data) + console.log(data.usr) var url = $location.absUrl().replace( /admin\/local\/.*/, 'circ/patron/' + data.usr.id() + '/checkout'); + console.log(url) $window.open(url, '_blank') }); }); } + // egCore.net.request( + // 'open-ils.actor', + // 'open-ils.actor.get_barcodes', + // egCore.auth.token(), egCore.auth.user().ws_ou(), + // 'actor', args.barcode) + + // .then(function(resp) { // get_barcodes + + // if (evt = egCore.evt.parse(resp)) { + // console.error(evt.toString()); + // return; + // } + + // if (!resp || !resp[0]) { + // $scope.bcNotFound = args.barcode; + // $scope.selectMe = true; + // return; + // } + + // // see if an opt-in request is needed + // user_id = resp[0].id; + // $location.path($location.path() + '/' + user_id); + // }); + $scope.grid_controls = { activateItem : function(selected) { // activateItem returns a single row.