<div class="row" id="acq-provider-page">
<div class="col-lg-12">
<ngb-tabset #acqProviderTabs [activeId]="activeTab" (tabChange)="onTabChange($event)">
- <ngb-tab title="Search" i18n-title id="search">
- <ng-template ngbTabContent>PROVIDER SEARCH FORM</ng-template>
- </ngb-tab>
<ngb-tab title="Provider" i18n-title id="details" [disabled]="!id">
- <ng-template ngbTabContent>PROVIDER DETAILS TAB</ng-template>
+ <ng-template ngbTabContent>
+ <div class="col-lg-12" [hidden]="showSearchForm">
+ PROVIDER DETAILS TAB
+ </div>
+ <div class="col-lg-12" [hidden]="!showSearchForm">
+ PROVIDER SEARCH FORM
+ </div>
+ </ng-template>
</ngb-tab>
<ngb-tab title="Addresses" i18n-title id="addresses" [disabled]="!id">
<ng-template ngbTabContent>PROVIDER ADDRESSES TAB</ng-template>
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;
const idParam = this.route.snapshot.paramMap.get('id');
if (idParam) {
+ this.showSearchForm = false;
this.id = idParam;
if (!tabTypeParam) {
this.activeTab = this.defaultTabType;
}
if (tabTypeParam) {
+ this.showSearchForm = false;
if (this.validTabTypes.includes(tabTypeParam)) {
this.activeTab = tabTypeParam;
} else {
this.router.navigate(['/staff', 'acq', 'provider', this.id, this.activeTab]);
}
} else {
- this.activeTab = 'search';
+ this.showSearchForm = true;
}
this.onTabChange = ($event) => {