fix fleshing set of next copy statuses
authorGalen Charlton <gmc@esilibrary.com>
Fri, 5 Aug 2016 20:37:36 +0000 (16:37 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 27 Mar 2017 20:22:46 +0000 (16:22 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/ui/default/staff/services/ui.js

index 3457591..f56b41d 100644 (file)
@@ -508,9 +508,9 @@ function($uibModal , $interpolate , egCore) {
                         return defer.promise;
                     }
 
-                    // returns a promise resolved with the list of circ mods
+                    // returns a promise resolved with the list of circ statuses
                     $scope.get_copy_statuses = function() {
-                        if (egCore.env.ccm)
+                        if (egCore.env.ccs)
                             return $q.when(egCore.env.ccs.list);
 
                         return egCore.pcrud.retrieveAll('ccs', null, {atomic : true})
@@ -549,8 +549,8 @@ function($uibModal , $interpolate , egCore) {
                         if ($scope.mode == 'checkin' && next_statuses.length > 0) {
                             $scope.get_copy_statuses().then(function() {
                                 angular.forEach(next_statuses, function(st) {
-                                    if (egCore.env.ccs.list[st])
-                                       $scope.next_statuses.push(egCore.env.ccs.list[st]);
+                                    if (egCore.env.ccs.map[st])
+                                       $scope.next_statuses.push(egCore.env.ccs.map[st]);
                                 });
                                 $scope.params.the_next_status = $scope.next_statuses[0].id();
                             });