LP2008834 - Option to Hide Strict Barcode user/scottangel/LP2008834-option-to-hide-strict-barcode
authorScott Angel <scottangel@mobiusconsortium.org>
Wed, 17 May 2023 16:17:20 +0000 (11:17 -0500)
committerScott Angel <scottangel@mobiusconsortium.org>
Wed, 17 May 2023 16:17:20 +0000 (11:17 -0500)
Added angular hide strict barcode functionallity.
Updated my release note to better fit the 'style'.

Signed-off-by: Scott Angel <scottangel@mobiusconsortium.org>
Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.html
Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.ts
Open-ILS/src/eg2/src/app/staff/circ/patron/checkout.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/checkout.component.ts
Open-ILS/src/eg2/src/app/staff/circ/renew/renew.component.html
Open-ILS/src/eg2/src/app/staff/circ/renew/renew.component.ts
docs/RELEASE_NOTES_NEXT/Circulation/option-to-hide-strict-barcode.adoc

index 4542213..febb6b3 100644 (file)
       </div>
     </div>
     <div class="mr-3">
-      <div class="form-check form-check-inline">
+      <div class="form-check form-check-inline" *ngIf="hideStrictBarcode">
         <input class="form-check-input" type="checkbox" 
           (ngModelChange)="toggleStrictBarcode($event)"
           id="strict-barcode-cbox" [(ngModel)]="strictBarcode"/>
index f95481f..c193d6c 100644 (file)
@@ -71,6 +71,7 @@ export class CheckinComponent implements OnInit, AfterViewInit {
     fineTally = 0;
     isHoldCapture = false;
     strictBarcode = false;
+    hideStrictBarcode: boolean = false;
     trimList = false;
     itemNeverCirced: string;
     persistKey: string;
@@ -127,6 +128,9 @@ export class CheckinComponent implements OnInit, AfterViewInit {
             CHECKIN_MODIFIERS.map(mod => `eg.circ.checkin.${mod}`)
             .concat(SETTINGS);
 
+        this.store.getItem('ui.circ.hide_patron_strict_barcode')
+            .then(hideStrict => this.hideStrictBarcode = !hideStrict);
+
         this.store.getItemBatch(setNames).then(sets => {
             CHECKIN_MODIFIERS.forEach(mod =>
                 this.modifiers[mod] = sets[`eg.circ.checkin.${mod}`]);
index 491be29..2c51335 100644 (file)
   <div class="col-lg-12 d-flex">
     <div class="flex-1"></div>
     <div class="mr-3">
-      <div class="form-check form-check-inline pt-1">
+      <div class="form-check form-check-inline pt-1" *ngIf="hideStrictBarcode">
         <input class="form-check-input" type="checkbox" 
           (ngModelChange)="toggleStrictBarcode($event)"
           id="strict-barcode-cbox" [(ngModel)]="strictBarcode"/>
index 839b0b6..5a7efdb 100644 (file)
@@ -45,6 +45,7 @@ export class CheckoutComponent implements OnInit, AfterViewInit {
     dueDateOptions: 0 | 1 | 2 = 0; // auto date; specific date; session date
     dueDateInvalid = false;
     printOnComplete = true;
+    hideStrictBarcode = false;
     strictBarcode = false;
 
     private copiesInFlight: {[barcode: string]: boolean} = {};
@@ -100,6 +101,9 @@ export class CheckoutComponent implements OnInit, AfterViewInit {
             );
         });
 
+        this.serverStore.getItem('ui.circ.hide_patron_strict_barcode')
+            .then(hideStrict => this.hideStrictBarcode = !hideStrict);
+
         this.serverStore.getItem('circ.checkout.strict_barcode')
         .then(strict => this.strictBarcode = strict);
     }
index 726aa61..eb98f8c 100644 (file)
       </div>
     </div>
     <div class="mr-3">
-      <div class="form-check form-check-inline">
+      <div class="form-check form-check-inline" *ngIf="hideStrictBarcode">
         <input class="form-check-input" type="checkbox" 
           (ngModelChange)="toggleStrictBarcode($event)"
           id="strict-barcode-cbox" [(ngModel)]="strictBarcode"/>
index 473014c..c654962 100644 (file)
@@ -50,6 +50,7 @@ export class RenewComponent implements OnInit, AfterViewInit {
     dueDate: string;
     useDueDate = false;
     fineTally = 0;
+    hideStrictBarcode: boolean = false;
     strictBarcode = false;
     trimList = false;
     itemNeverCirced: string;
@@ -88,6 +89,9 @@ export class RenewComponent implements OnInit, AfterViewInit {
             return from(this.renewals);
         };
 
+        this.store.getItem('ui.circ.hide_patron_strict_barcode')
+            .then(hideStrict => this.hideStrictBarcode = !hideStrict)
+
         this.store.getItemBatch(['circ.renew.strict_barcode'])
         .then(sets => {
             this.strictBarcode = sets['circ.renew.strict_barcode'];
index 0aecfa0..4695c74 100644 (file)
@@ -1,3 +1,3 @@
 == Option to hide strict barcode ==
 
-Allows libraries the option to hide the strict barcode checkbox via org setting as some libraries don't use the strict barcode feature.
\ No newline at end of file
+Adds option to hide the strict barcode checkbox via org setting.
\ No newline at end of file