}])
.controller('OfflineSessionCtrl',
- ['$scope','$location','$window','egCore','$routeParams','$http','$q','$timeout','egPromptDialog','ngToast','egProgressDialog',
- function($scope , $location , $window , egCore , $routeParams , $http , $q , $timeout , egPromptDialog , ngToast , egProgressDialog) {
+ ['$scope','$window','egCore','$routeParams','$http','$q','$timeout','egPromptDialog','ngToast','egProgressDialog',
+ function($scope , $window , egCore , $routeParams , $http , $q , $timeout , egPromptDialog , ngToast , egProgressDialog) {
$scope.active_session_tab = 'pending';
$scope.lookupNoncatTypeName = function (type) {
])
.controller('OfflineCtrl',
- ['$q','$scope','$location','$window','egCore','egLovefield','$routeParams','$timeout','$http','ngToast','egConfirmDialog',
- function($q , $scope , $location , $window , egCore , egLovefield , $routeParams , $timeout , $http , ngToast , egConfirmDialog) {
+ ['$q','$scope','$location','$rootScope','egCore','egLovefield','$routeParams','$timeout','$http','ngToast','egConfirmDialog',
+ function($q , $scope , $location , $rootScope , egCore , egLovefield , $routeParams , $timeout , $http , ngToast , egConfirmDialog) {
$scope.active_tab = $routeParams.tab || 'checkout';
$scope.minDate = new Date();
});
}
+ $rootScope.save_offline_xacts = function () { return $scope.save() };
+
$scope.clear_pending = function (skip_confirm) {
if (skip_confirm) {
return egLovefield.destroyPendingOfflineXacts().then(function () {
.controller('PatronRegCtrl',
['$scope','$routeParams','$q','$uibModal','$window','egCore',
'patronSvc','patronRegSvc','egUnloadPrompt','egAlertDialog',
- 'egWorkLog','$timeout','egLovefield',
+ 'egWorkLog','$timeout','egLovefield','$rootScope',
function($scope , $routeParams , $q , $uibModal , $window , egCore ,
patronSvc , patronRegSvc , egUnloadPrompt, egAlertDialog ,
- egWorkLog , $timeout , egLovefield) {
+ egWorkLog , $timeout , egLovefield , $rootScope) {
+ $scope.rs = $rootScope;
patronRegSvc.org = $scope.workstation_obj.owning_lib;
$scope.offline = true;
var updated_user;
patronRegSvc.save_user($scope.patron)
+ .then($scope.rs.save_offline_xacts)
.then(function(new_user) {
// reload the current page
$window.location.href = location.href;