From: Galen Charlton Date: Tue, 3 Mar 2020 23:33:18 +0000 (-0500) Subject: acq providers: allow search form and details view to share a tab X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea0291a5a02d9d0025c85fa3cadb57d9486aaaef;p=working%2FEvergreen.git acq providers: allow search form and details view to share a tab Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html index e5f5842ce6..f826482fa1 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html @@ -4,11 +4,15 @@
- - PROVIDER SEARCH FORM - - PROVIDER DETAILS TAB + +
+ PROVIDER DETAILS TAB +
+
+ PROVIDER SEARCH FORM +
+
PROVIDER ADDRESSES TAB diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts index 9e5ba3832f..961c3aa3cc 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts @@ -12,8 +12,9 @@ import {PcrudService} from '@eg/core/pcrud.service'; export class AcqProviderComponent implements OnInit, AfterViewInit { activeTab = ''; + showSearchForm = false; id = null; - validTabTypes = ['search', 'details', 'addresses', 'contacts', 'attributes', 'holdings', 'edi_accounts', 'purchase_orders', 'invoices']; + validTabTypes = ['details', 'addresses', 'contacts', 'attributes', 'holdings', 'edi_accounts', 'purchase_orders', 'invoices']; defaultTabType = 'details'; onTabChange: ($event: NgbTabChangeEvent) => void; @@ -33,6 +34,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { const idParam = this.route.snapshot.paramMap.get('id'); if (idParam) { + this.showSearchForm = false; this.id = idParam; if (!tabTypeParam) { this.activeTab = this.defaultTabType; @@ -41,6 +43,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { } if (tabTypeParam) { + this.showSearchForm = false; if (this.validTabTypes.includes(tabTypeParam)) { this.activeTab = tabTypeParam; } else { @@ -48,7 +51,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { this.router.navigate(['/staff', 'acq', 'provider', this.id, this.activeTab]); } } else { - this.activeTab = 'search'; + this.showSearchForm = true; } this.onTabChange = ($event) => {