['ngRoute','ui.bootstrap','egCoreMod','egUiMod','egGridMod'])
.controller('NegBalances',
- ['$scope','$q','$timeout','$location','$window','egCore','egGridDataProvider',
-function($scope , $q , $timeout , $location , $window , egCore , egGridDataProvider) {
+ ['$scope','$q','$timeout','$location','$window','egCore',
+ 'egGridDataProvider','egProgressDialog',
+function($scope , $q , $timeout , $location , $window , egCore ,
+ egGridDataProvider , egProgressDialog) {
$scope.grid_provider = egGridDataProvider.instance({});
// API does not currenlty support paging, so it's all or none.
$scope.grid_provider.get = function(offset, count) {
if (!$scope.context_org) return $q.when();
+ egProgressDialog.open();
var deferred = $q.defer();
'open-ils.actor.users.negative_balance',
egCore.auth.token(), $scope.context_org.id())
.then(deferred.resolve, null, function(blob) {
+ egProgressDialog.increment();
// Give the grid a top-level identifier field
blob.usr_id = blob.usr.id();
deferred.notify(blob)
- });
+ }).finally(egProgressDialog.close);
return deferred.promise;
}