From: Dan Briem Date: Wed, 27 Oct 2021 14:06:33 +0000 (-0400) Subject: LP#1948886 No indicator while checkout receipt is being emailed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fdbriem%2Flp_1948886_sending_email_receipt_indicator;p=working%2FEvergreen.git LP#1948886 No indicator while checkout receipt is being emailed Adds a message underneath the receipt buttons in the check out interface when a receipt is emailing. Disables the Email Receipt buttons when sending. Disables Quick Receipt and Done button when sending if circ.send_email_checkout_receipts is true. Signed-off-by: Dan Briem --- 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 2fab3c24a6..1b61dfec29 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 @@ -183,13 +183,15 @@
- +
@@ -197,6 +199,7 @@ +
+
+ + [% l('Emailing checkout receipt') %]... + +
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 6715dd6473..3233028f66 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 @@ -359,8 +359,11 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , }); } + $scope.is_emailing_receipt = false; $scope.email_receipt = function() { - if ($scope.has_email_address() && $scope.checkouts.length) { + if ($scope.has_email_address() && $scope.checkouts.length + && !$scope.is_emailing_receipt) { + $scope.is_emailing_receipt = true; return egCore.net.request( 'open-ils.circ', 'open-ils.circ.checkout.batch_notify.session.atomic', @@ -370,6 +373,8 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , ).then(function() { ngToast.create(egCore.strings.EMAILED_CHECKOUT_RECEIPT); return $q.when(); + }).finally(function() { + $scope.is_emailing_receipt = false; }); } return $q.when();