LP#1918362 Unchanged workstation settings applied on every checkin
authorDan Briem <dbriem@wlsmail.org>
Fri, 9 Apr 2021 22:19:02 +0000 (18:19 -0400)
committerJane Sandberg <sandbej@linnbenton.edu>
Tue, 18 May 2021 00:58:10 +0000 (17:58 -0700)
* Stop attempting to save the Update Inventory setting on every
checkin - incorrect prefix & redundant (it's a modifier now)
* Stop saving the Strict Barcode setting on every checkin,
renewal, and checkout
* Save Strict Barcode on user interaction with its checkbox

To test:
1. confirm Strict Barcode and Do Inventory Update settings still
apply and are "sticky" on the Circulation->Checkin interface
2. confirm Strict Barcode still applies and is "sticky" on the
Circulation->Renew Items and Circulation->Checkout interfaces

Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>

Open-ILS/src/templates/staff/circ/checkin/t_checkin.tt2
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/src/templates/staff/circ/renew/t_renew.tt2
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
Open-ILS/web/js/ui/default/staff/circ/renew/app.js

index 6e505de..0606ce7 100644 (file)
       <div class="pad-horiz"></div>
       <div class="checkbox">
         <label>
-          <input ng-model="strict_barcode" type="checkbox"/>
+          <input ng-model="strict_barcode" type="checkbox"
+            ng-change="onStrictBarcodeChange()"/>
           [% l('Strict Barcode') %]
         </label>
       </div>
index 8744e0f..2fab3c2 100644 (file)
   <div class="flex-cell"></div>
   <div class="checkbox">
     <label>
-      <input ng-model="strict_barcode" type="checkbox"/>
+      <input ng-model="strict_barcode" type="checkbox"
+        ng-change="onStrictBarcodeChange()"/>
       [% l('Strict Barcode') %]
     </label>
   </div>
index 6447ecc..3f54371 100644 (file)
   <div class="pad-horiz"></div>
   <div class="checkbox">
     <label>
-      <input ng-model="strict_barcode" type="checkbox"/>
+      <input ng-model="strict_barcode" type="checkbox"
+        ng-change="onStrictBarcodeChange()"/>
       [% l('Strict Barcode') %]
     </label>
   </div>
index 5c89922..0cf3439 100644 (file)
@@ -136,6 +136,13 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg
         }
     }
 
+    $scope.onStrictBarcodeChange = function() {
+        egCore.hatch.setItem(
+            'circ.checkin.strict_barcode',
+            $scope.strict_barcode
+        );
+    };
+
     $scope.onUntilLogoutChange = function() {
         if ($scope.backdate.untilLogout)
             egCore.hatch.setSessionItem('eg.circ.checkin.backdate',
@@ -191,8 +198,6 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg
         }
         if ($scope.modifiers.do_inventory_update) params.do_inventory_update = true;
 
-        egCore.hatch.setItem('circ.checkin.strict_barcode', $scope.strict_barcode);
-        egCore.hatch.setItem('circ.checkin.do_inventory_update', $scope.modifiers.do_inventory_update);
         var options = {
             check_barcode : $scope.strict_barcode,
             no_precat_alert : $scope.modifiers.no_precat_alert,
index df4945b..6715dd6 100644 (file)
@@ -201,7 +201,6 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
         $scope.checkouts.unshift(row_item);
         $scope.gridDataProvider.prepend();
 
-        egCore.hatch.setItem('circ.checkout.strict_barcode', $scope.strict_barcode);
         var options = {check_barcode : $scope.strict_barcode};
 
         egCirc.checkout(params, options).then(
@@ -305,6 +304,13 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
         });
     };
 
+    $scope.onStrictBarcodeChange = function() {
+        egCore.hatch.setItem(
+            'circ.checkout.strict_barcode',
+            $scope.strict_barcode
+        );
+    };
+
     $scope.print_receipt = function() {
         var print_data = {circulations : []};
         var cusr = patronSvc.current;
index 95f59eb..93dc6a4 100644 (file)
@@ -103,7 +103,6 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) {
         $scope.renewals.unshift(row_item);
         $scope.gridDataProvider.refresh();
 
-        egCore.hatch.setItem('circ.renew.strict_barcode', $scope.strict_barcode);
         var options = {check_barcode : $scope.strict_barcode};
 
         egCirc.renew(params, options).then(
@@ -236,6 +235,13 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) {
         });
     }
 
+    $scope.onStrictBarcodeChange = function() {
+        egCore.hatch.setItem(
+            'circ.renew.strict_barcode',
+            $scope.strict_barcode
+        );
+    };
+
     $scope.print_receipt = function() {
         var print_data = {circulations : []}