LP#1685929 - Prep check-in grid for print spine labels user/cesardv/lp1685929_Rebuilt_checkin_actions_itemSvc_Refactr
authorCesar Velez <Cesar.Velez@equinoxinitiative.org>
Tue, 1 Aug 2017 21:42:00 +0000 (22:42 +0100)
committerCesar Velez <Cesar.Velez@equinoxinitiative.org>
Fri, 11 Aug 2017 15:39:23 +0000 (16:39 +0100)
Leave code ready for when Print Spine Label LP1704873
is in master in order to easily add feature.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Open-ILS/web/js/ui/default/staff/circ/checkin/app.js
Open-ILS/web/js/ui/default/staff/circ/services/item.js

index e3bf69a..7f86eb3 100644 (file)
@@ -374,5 +374,9 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg
             itemSvc.mark_missing_pieces(i.acp);
         });
     }
+
+    $scope.printSpineLabels = function(items){
+        itemSvc.print_spine_labels(items);
+    }
 }])
 
index 6c17a39..2346080 100644 (file)
@@ -881,5 +881,32 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
         });
     }
 
+    service.print_spine_labels = function(copies){
+
+        // delete me:
+        console.warn("Print Spine Labels is not implemented yet! See LP 1704873");
+        $timeout(function() { $window.open(egCore.env.basePath, '_blank') });
+
+        // TODO : LP# 1704873 needs to be in master
+        // for the below to work. Commented out until then
+
+        /*
+        egCore.net.request(
+            'open-ils.actor',
+            'open-ils.actor.anon_cache.set_value',
+            null, 'print-labels-these-copies', {
+                copies : service.gatherSelectedHoldingsIds(copies)
+            }
+        ).then(function(key) {
+            if (key) {
+                var url = egCore.env.basePath + 'cat/printlabels/' + key;
+                $timeout(function() { $window.open(url, '_blank') });
+            } else {
+                alert('Could not create anonymous cache key!');
+            }
+        });
+        */
+    }
+
     return service;
 }])
\ No newline at end of file