From: Jason Etheridge Date: Fri, 9 Jun 2017 14:11:21 +0000 (-0400) Subject: webstaff: Item Status bugs with Transfer Items... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e8b62d4be009332ff9c5432aa5998c0b862afc67;p=working%2FEvergreen.git webstaff: Item Status bugs with Transfer Items... ...to Previously Marked Volume Now it throws up the override dialog only if an ils event is returned, and it doesn't prematurely refresh the screen or re-scan a barcode while the dialog is open. Signed-off-by: Jason Etheridge Signed-off-by: Andrea Neiman Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index bada28ccb4..48d2d8270f 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -840,26 +840,32 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog ).then( function(resp) { // oncomplete var evt = egCore.evt.parse(resp); - egConfirmDialog.open( - egCore.strings.OVERRIDE_TRANSFER_COPIES_TO_MARKED_VOLUME_TITLE, - egCore.strings.OVERRIDE_TRANSFER_COPIES_TO_MARKED_VOLUME_BODY, - {'evt_desc': evt} - ).result.then(function() { - egCore.net.request( - 'open-ils.cat', - 'open-ils.cat.transfer_copies_to_volume.override', - egCore.auth.token(), - xfer_target, - copy_ids, - { events: ['TITLE_LAST_COPY', 'COPY_DELETE_WARNING'] } - ); - }); + console.log('evt',evt); + if (evt) { + egConfirmDialog.open( + egCore.strings.OVERRIDE_TRANSFER_COPIES_TO_MARKED_VOLUME_TITLE, + egCore.strings.OVERRIDE_TRANSFER_COPIES_TO_MARKED_VOLUME_BODY, + {'evt_desc': evt} + ).result.then(function() { + egCore.net.request( + 'open-ils.cat', + 'open-ils.cat.transfer_copies_to_volume.override', + egCore.auth.token(), + xfer_target, + copy_ids, + { events: ['TITLE_LAST_COPY', 'COPY_DELETE_WARNING'] } + ); + }).then(function() { + angular.forEach(items, function(cp){service.add_barcode_to_list(cp.barcode)}); + }); + } else { + angular.forEach(items, function(cp){service.add_barcode_to_list(cp.barcode)}); + } + }, null, // onerror null // onprogress - ).then(function() { - angular.forEach(items, function(cp){service.add_barcode_to_list(cp.barcode)}); - }); + ); } }