From: Galen Charlton Date: Wed, 4 May 2016 21:16:14 +0000 (-0400) Subject: webstaff: work log: display entries in order X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=64c019eff963556f7e3e21d179164bef6ffa8431;p=working%2FEvergreen.git webstaff: work log: display entries in order Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/log.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/log.js index 39dbc72fcf..b2411e2bb5 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/log.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/log.js @@ -86,7 +86,6 @@ function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataPr if (hold.current_copy()) { entry.item = hold.current_copy().barcode(); } - deferred.notify(entry); } ); } @@ -97,7 +96,6 @@ function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataPr ).then( function(usr) { entry.user = usr.family_name(); - deferred.notify(entry); } ); } @@ -114,6 +112,9 @@ function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataPr entries.forEach( function(el,idx) { el.id = idx; + // notify right away and in order; fetch_* will + // fill in entry later if necessary + promises.push($timeout(function() { deferred.notify(el) })); if (el.action == 'requested_hold') { promises.push(fetch_hold(deferred,el)); } else if (el.action == 'registered_patron') { @@ -122,8 +123,6 @@ function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataPr promises.push(fetch_patron(deferred,el)); } else if (el.action == 'paid_bill') { promises.push(fetch_patron(deferred,el)); - } else { - promises.push($timeout(function() { deferred.notify(el) })); } } ); @@ -144,6 +143,9 @@ function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataPr log_entries.patron_log.forEach( function(el,idx) { el.id = idx; + // notify right away and in order; fetch_* will + // fill in entry later if necessary + promises.push($timeout(function() { deferred.notify(el) })); if (el.action == 'requested_hold') { promises.push(fetch_hold(deferred,el)); } else if (el.action == 'registered_patron') { @@ -152,8 +154,6 @@ function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataPr promises.push(fetch_patron(deferred,el)); } else if (el.action == 'paid_bill') { promises.push(fetch_patron(deferred,el)); - } else { - promises.push($timeout(function() { deferred.notify(el) })); } } );