LPXXX Item Status Angular WIP
authorBill Erickson <berickxx@gmail.com>
Mon, 21 Jun 2021 18:18:44 +0000 (14:18 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 29 Jun 2021 20:31:33 +0000 (16:31 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts

index 38f3e1c..65b8a64 100644 (file)
@@ -108,8 +108,13 @@ export class ItemStatusComponent implements OnInit, AfterViewInit {
                 this.noSuchItem = true;
             } else {
                 this.itemBarcode = null;
-                this.selectInput();
-                return this.getItemById(res.id);
+
+                if (this.tab == 'list') {
+                    this.selectInput();
+                    return this.getItemById(res.id);
+                } else {
+                    this.router.navigate([`/staff/cat/item/${res.id}/${this.tab}`]);
+                }
             }
         });
     }
@@ -143,7 +148,7 @@ export class ItemStatusComponent implements OnInit, AfterViewInit {
             }
         };
 
-        return this.pcrud.retrieve('acp', this.itemId, flesh)
+        return this.pcrud.retrieve('acp', id, flesh)
         .toPromise().then(item => {
             this.item = item;
             this.itemId = item.id();