[open-ils-commits] [GIT] Evergreen ILS branch master updated. 58d7812bdb4b51be08bcac1522282841c056bfac
Evergreen Git
git at git.evergreen-ils.org
Wed Jan 2 08:21:33 EST 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 58d7812bdb4b51be08bcac1522282841c056bfac (commit)
from c78ddc8c1c9785ddcabd287ad241ff7fb97ab1c9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 58d7812bdb4b51be08bcac1522282841c056bfac
Author: Cesar Velez <cesar.velez at equinoxinitiative.org>
Date: Fri Dec 7 18:50:43 2018 -0500
LP1765179 - fix issue with pending/staged user reg
After completing a staged user registration, the controller
in regctl.js was refreshing to the same route, and
trying to fetch the same staged user, but never finding it
as it was no longer staged/pending. This addresses that bug
and adds a bChannel refresh to the pending grid, so once
the user is registered in the child tab, it closes the tab and
the pending user grid is updated.
Signed-off by: Cesar Velez <cesar.velez at equinoxinitiative.org>
Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/pending.js b/Open-ILS/web/js/ui/default/staff/circ/patron/pending.js
index 0690b3c..0912eb8 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/pending.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/pending.js
@@ -50,6 +50,18 @@ function($scope , $q , $routeParams , $window , $location , egCore , egGridDataP
provider.refresh();
}
+ if (typeof BroadcastChannel != 'undefined') {
+ // connect 2 bChannel
+ holdings_bChannel = new BroadcastChannel('eg.pending_usr.update');
+ holdings_bChannel.onmessage = function(e){
+ if (e.data && e.data.usr.home_ou == $scope.context_org.id()){
+ // pending usr was registered, refresh grid!
+ console.log("Got broadcast from channel eg.pending_usr.update for usr id: " + e.data.usr.id);
+ refresh_page();
+ }
+ }
+ };
+
provider.get = function(offset, count) {
var deferred = $q.defer();
var recv_index = 0;
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index cd8843a..4e2e9a2 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -1226,10 +1226,10 @@ angular.module('egCoreMod')
.controller('PatronRegCtrl',
['$scope','$routeParams','$q','$uibModal','$window','egCore',
'patronSvc','patronRegSvc','egUnloadPrompt','egAlertDialog',
- 'egWorkLog',
+ 'egWorkLog', '$timeout',
function($scope , $routeParams , $q , $uibModal , $window , egCore ,
patronSvc , patronRegSvc , egUnloadPrompt, egAlertDialog ,
- egWorkLog) {
+ egWorkLog, $timeout) {
$scope.page_data_loaded = false;
$scope.hold_notify_type = { phone : null, email : null, sms : null };
@@ -2127,6 +2127,19 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
+ updated_user.id();
$window.open(url, '_blank').focus();
+ } else if ($window.location.href.indexOf('stage') > -1 ){
+ // we're here after deleting a self-reg staged user.
+ // Just close tab, since refresh won't find staged user
+ $timeout(function(){
+ if (typeof BroadcastChannel != 'undefined') {
+ var bChannel = new BroadcastChannel("eg.pending_usr.update");
+ bChannel.postMessage({
+ usr: egCore.idl.toHash(updated_user)
+ });
+ }
+
+ $window.close();
+ });
} else {
// reload the current page
$window.location.href = location.href;
-----------------------------------------------------------------------
Summary of changes:
.../web/js/ui/default/staff/circ/patron/pending.js | 12 ++++++++++++
.../web/js/ui/default/staff/circ/patron/regctl.js | 17 +++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list