LP#1722899 - Fix issues with Patron Bill payment annotation dialog/modal
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Fri, 13 Oct 2017 17:23:22 +0000 (13:23 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 7 Nov 2017 16:54:41 +0000 (11:54 -0500)
The annotation modal's result was not actually being returned, so I fixed
 ui.js's egPromptDialog.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
Open-ILS/web/js/ui/default/staff/services/ui.js

index 0aa98d3..5b7c079 100644 (file)
@@ -503,7 +503,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
             function() { // amount confirmed
                 add_payment_note().then(function(pay_note) {
                     add_cc_args().then(function(cc_args) {
-                        sendPayment(pay_note, cc_args);
+                        sendPayment(pay_note.value, cc_args);
                     })
                 });
             },
index b6198db..76d5425 100644 (file)
@@ -459,11 +459,11 @@ function($uibModal, $interpolate) {
                     $scope.args = {value : promptValue || ''};
                     $scope.focus = true;
                     $scope.ok = function() {
-                        if (msg_scope.ok) msg_scope.ok($scope.args.value);
-                        $uibModalInstance.close()
+                        if (msg_scope && msg_scope.ok) msg_scope.ok($scope.args.value);
+                        $uibModalInstance.close($scope.args);
                     }
                     $scope.cancel = function() {
-                        if (msg_scope.cancel) msg_scope.cancel();
+                        if (msg_scope && msg_scope.cancel) msg_scope.cancel();
                         $uibModalInstance.dismiss();
                     }
                 }