From c00f0c870f7b5af0fbc049d55218889328060515 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 13 Aug 2020 12:37:15 -0400 Subject: [PATCH] LP#1850547: (follow-up) swap in ngbNav for the now-deprecated ngbTab Signed-off-by: Galen Charlton --- .../staff/acq/search/acq-search-form.component.ts | 1 - .../app/staff/acq/search/acq-search.component.html | 33 +++++++++++++--------- .../app/staff/acq/search/acq-search.component.ts | 8 ++++-- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts index f0a4782f46..e9219d7a1b 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts @@ -1,6 +1,5 @@ import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild, OnChanges, SimpleChanges} from '@angular/core'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Router, ActivatedRoute} from '@angular/router'; import {StaffCommonModule} from '@eg/staff/common.module'; import {IdlService, IdlObject} from '@eg/core/idl.service'; diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.html b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.html index d5d5a4d4a9..87bd02c975 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.html @@ -6,19 +6,24 @@
- - - - - - - - - - - - - - + +
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.ts index 1ed74a8c4f..959963f0ac 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit, AfterViewInit, ViewChild, ViewChildren, QueryList, OnDestroy} from '@angular/core'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Router, ActivatedRoute, ParamMap, RouterEvent, NavigationEnd} from '@angular/router'; import {filter, takeUntil} from 'rxjs/operators'; import {Subject} from 'rxjs'; @@ -24,8 +24,8 @@ export class AcqSearchComponent implements OnInit, AfterViewInit, OnDestroy { urlSearchTerms: AcqSearchTerm[] = []; - onTabChange: ($event: NgbTabChangeEvent) => void; - @ViewChild('acqSearchTabs', { static: true }) tabs: NgbTabset; + onTabChange: ($event: NgbNavChangeEvent) => void; + @ViewChild('acqSearchTabs', { static: true }) tabs: NgbNav; @ViewChildren(LineitemResultsComponent) liResults: QueryList; @ViewChildren(PurchaseOrderResultsComponent) poResults: QueryList; @ViewChildren(InvoiceResultsComponent) invResults: QueryList; @@ -123,6 +123,8 @@ export class AcqSearchComponent implements OnInit, AfterViewInit, OnDestroy { this.searchType = this.defaultSearchType; this.router.navigate(['/staff', 'acq', 'search', this.searchType]); } + } else { + this.searchType = this.defaultSearchType; } this.onTabChange = ($event) => { -- 2.11.0