LPXXX Angular Volcopy next bc skips disabled
authorBill Erickson <berickxx@gmail.com>
Mon, 13 Jul 2020 15:45:11 +0000 (11:45 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 13 Jul 2020 15:45:11 +0000 (11:45 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts

index 7f1f8b8..9791282 100644 (file)
@@ -269,6 +269,7 @@ export class VolEditComponent implements OnInit {
         });
     }
 
+    // Focus and select the next editable barcode.
     selectNextBarcode(id: number, previous?: boolean) {
         let found = false;
         let nextId: number = null;
@@ -283,10 +284,12 @@ export class VolEditComponent implements OnInit {
             if (nextId !== null) { return; }
 
             // In case we have to loop back to the first copy.
-            if (firstId === null) { firstId = copy.id(); }
+            if (firstId === null && this.barcodeCanChange(copy)) {
+                firstId = copy.id();
+            }
 
             if (found) {
-                if (nextId === null) {
+                if (nextId === null && this.barcodeCanChange(copy)) {
                     nextId = copy.id();
                 }
             } else if (copy.id() === id) {