LP#1845556: Adds back the ability to edit duplicate call numbers.
authorAdam Bowling <abowling@emeralddata.net>
Thu, 21 Oct 2021 20:51:50 +0000 (16:51 -0400)
committerAdam Bowling <abowling@emeralddata.net>
Thu, 21 Oct 2021 20:51:50 +0000 (16:51 -0400)
Signed-off-by: Adam Bowling <abowling@emeralddata.net>
Open-ILS/src/templates/staff/cat/printlabels/t_view.tt2
Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js

index 47ccde6..6b172b5 100644 (file)
                             [% l('Manual adjustments may be made here. These do not get saved with templates.') %]<br/>
                         </span>
                     </div>
-                    <div ng-repeat="cn in rendered_call_number_set">
+                    <div ng-repeat="cn in rendered_cn_key_by_copy_id">
                         <textarea ng-model="cn.value" class="cn-template-text">
                         </textarea>
                     </div>
@@ -267,4 +267,4 @@ label. Use pocket label left margin to identify how much space to provide betwee
           context="preview_scope"></div>
     </div>
     <!-- col -->
-</div>
\ No newline at end of file
+</div>
index e8803e0..11905ab 100644 (file)
@@ -168,7 +168,7 @@ function ($scope, $q, $window, $routeParams, $location, $timeout, egCore, egNet,
                     , 'get_cn_for': function (copy) {
                         var key = $scope.rendered_cn_key_by_copy_id[copy.id];
                         if (key) {
-                            var manual_cn = $scope.rendered_call_number_set[key];
+                            var manual_cn = $scope.rendered_call_number_set[copy.id];
                             if (manual_cn && manual_cn.value) {
                                 return manual_cn.value;
                             } else {
@@ -517,7 +517,7 @@ function ($scope, $q, $window, $routeParams, $location, $timeout, egCore, egNet,
                             value: key
                         };
                     }
-                    $scope.rendered_cn_key_by_copy_id[copy.id] = key;
+                    $scope.rendered_cn_key_by_copy_id[copy.id] = { value: key };
                 }
             }
             $scope.preview_scope.tickle = Date() + ' ' + Math.random();