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>
Fri, 3 Nov 2017 20:04:40 +0000 (16:04 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/services/ui.js

index e0cfb3c..6c966b1 100644 (file)
@@ -671,9 +671,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})
@@ -712,8 +712,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();
                             });