From: Bill Erickson Date: Wed, 4 Aug 2021 17:09:05 +0000 (-0400) Subject: LP1936233 Default to list if no item ID present X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7a45da746ca58a9123b6014c9823f7bffdb57732;p=working%2FEvergreen.git LP1936233 Default to list if no item ID present Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts index f9a9dacf5f..f4032a73d1 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts @@ -178,12 +178,18 @@ export class ItemStatusComponent implements OnInit, AfterViewInit { // Avoid watching for changes until after ngOnInit is complete // so we don't grab the same copy twice. this.route.paramMap.subscribe((params: ParamMap) => { - this.tab = params.get('tab') || 'summary'; + this.tab = params.get('tab'); const id = +params.get('id'); - if (id && id !== this.currentItemId) { - this.currentItemId = id; - this.getItemById(id); + if (id) { + if (!this.tab) { this.tab = 'summary'; } + + if (id !== this.currentItemId) { + this.currentItemId = id; + this.getItemById(id); + } + } else if (!this.tab) { + this.tab = 'list'; } }); });