Restoring selfcheck.js to stock version
authorChris Sharp <csharp@georgialibraries.org>
Wed, 23 Nov 2016 13:21:34 +0000 (08:21 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 14 Sep 2021 17:38:08 +0000 (13:38 -0400)
Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js

index 153a44b..c8859ac 100644 (file)
@@ -100,8 +100,7 @@ function SelfCheckManager() {
 
     this.checkouts = [];
     this.itemsOut = [];
-       this.holds = [];
-       this.fines = [];
+    this.holds = []; 
 
     // During renewals, keep track of the ID of the previous circulation. 
     // Previous circ is used for tracking failed renewals (for receipts).
@@ -332,12 +331,8 @@ SelfCheckManager.prototype.loadOrgSettings = function() {
             this.orgSettings[k] = settings[k].value;
     }
 
-    if(settings[SET_BARCODE_REGEX]) {
+    if(settings[SET_BARCODE_REGEX]) 
         this.patronBarcodeRegex = new RegExp(settings[SET_BARCODE_REGEX].value);
-    } else {
-        this.patronBarcodeRegex = new RegExp(/^\d/); 
-        // this assumes barcodes start with digits
-    }
 
     // Subtract the timeout warning interval from the configured timeout 
     // so that when taken together they add up to the configured amount.
@@ -816,8 +811,6 @@ SelfCheckManager.prototype.drawHoldsPage = function() {
                     return;
                 }
 
-                               self.holds = ids;       
-                                                               
                 fieldmapper.standardRequest( // fetch the hold objects with fleshed details
                     ['open-ils.circ', 'open-ils.circ.hold.details.batch.retrieve'],
                     {   async : true,
@@ -828,7 +821,6 @@ SelfCheckManager.prototype.drawHoldsPage = function() {
                         }
                     }
                 );
-                               
             }
         }
     );
@@ -1454,6 +1446,7 @@ SelfCheckManager.prototype.printData = function(data, numItems, callback) {
  * Print a receipt for this user's items out
  */
 SelfCheckManager.prototype.printItemsOutReceipt = function(callback) {
+
     if(!this.itemsOut.length) return;
 
     progressDialog.show(true);
@@ -1496,6 +1489,7 @@ SelfCheckManager.prototype.printItemsOutReceipt = function(callback) {
  * Print a receipt for this user's holds
  */
 SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
+
     if(!this.holds.length) return;
 
     progressDialog.show(true);
@@ -1535,7 +1529,8 @@ SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
         null,
         'format.selfcheck.holds',
         'print-on-demand',
-        this.holds
+        holdIds,
+        holdData
     ];
 
     var self = this;
@@ -1607,7 +1602,7 @@ SelfCheckManager.prototype.printFinesReceipt = function(callback) {
         null,
         'format.selfcheck.fines',
         'print-on-demand',
-        this.patron.id()
+        [this.patron.id()]
     ];
 
     var self = this;