From: Jason Etheridge Date: Fri, 27 Mar 2020 04:57:35 +0000 (-0400) Subject: toggle for provider summary pane X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ace03c0d19cf3f10471914651b2a5d45874cb584;p=working%2FEvergreen.git toggle for provider summary pane Signed-off-by: Jason Etheridge 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 a140237652..e209dbbbe6 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 @@ -7,7 +7,7 @@
+ (summaryToggled)="onSummaryToggled($event)" [providerId]="id">
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 1db460efa1..bd009de421 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 @@ -32,6 +32,7 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { onTabChange: ($event: NgbTabChangeEvent) => void; onDesireSummarize: ($event: number) => void; + onSummaryToggled: ($event: boolean) => void; constructor( private router: Router, @@ -92,6 +93,10 @@ export class AcqProviderComponent implements OnInit, AfterViewInit { this.activeTab = this.defaultTabType; this.router.navigate(['/staff', 'acq', 'provider', this.id, this.activeTab]); }; + + this.onSummaryToggled = ($event) => { + // in case this is useful for a better implementation of reflowing the UI + }; } ngAfterViewInit() {} diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.html index ebf0d005d5..a6901b7da2 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.html @@ -1,4 +1,7 @@ -
+ + + +
Provider Deletion Failed diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.ts index de7d3769c7..bc8b447d1a 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/summary-pane.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit, AfterViewInit, Input, ViewChild} from '@angular/core'; +import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild} from '@angular/core'; import {StaffCommonModule} from '@eg/staff/common.module'; import {IdlService, IdlObject} from '@eg/core/idl.service'; import {OrgService} from '@eg/core/org.service'; @@ -17,6 +17,8 @@ import {ProviderRecord, ProviderRecordService} from './provider-record.service'; export class AcqProviderSummaryPaneComponent implements OnInit, AfterViewInit { + collapsed = false; + provider_id = ''; provider_name = ''; provider_code = ''; @@ -60,6 +62,7 @@ export class AcqProviderSummaryPaneComponent implements OnInit, AfterViewInit { @Input() providerId: any; @ViewChild('errorString', { static: true }) errorString: StringComponent; @ViewChild('delConfirm', { static: true }) delConfirm: ConfirmDialogComponent; + @Output('summaryToggled') toggled: EventEmitter = new EventEmitter(); provider: IdlObject; @@ -184,4 +187,9 @@ export class AcqProviderSummaryPaneComponent implements OnInit, AfterViewInit { } + toggleCollapse() { + this.collapsed = ! this.collapsed; + this.toggled.emit(this.collapsed); + } + }