From: Galen Charlton Date: Wed, 1 Apr 2020 22:10:19 +0000 (-0400) Subject: update summary after editing provider X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=be2b1b8604360653ecf6574e936759327c12e57c;p=working%2FEvergreen.git update summary after editing provider 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 ec691f6d9d..4277ce56b1 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 @@ -35,7 +35,7 @@ - + diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-details.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-details.component.ts index f018a81bb8..3846cf9510 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-details.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-details.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit, Input, ViewChild} from '@angular/core'; +import {Component, OnInit, Output, EventEmitter, ViewChild} from '@angular/core'; import {empty, throwError, Observable, from} from 'rxjs'; import {map} from 'rxjs/operators'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; @@ -25,6 +25,8 @@ export class ProviderDetailsComponent implements OnInit { permissions: {[name: string]: boolean}; + @Output('desireSummarize') summarize: EventEmitter = new EventEmitter(); + constructor( private router: Router, private route: ActivatedRoute, @@ -39,7 +41,12 @@ export class ProviderDetailsComponent implements OnInit { this.refresh(); } - updateProvider(x: any) {} + updateProvider(providerId: any) { + this.providerRecord.refreshCurrent().then(() => { + this.provider = this.providerRecord.current(); + this.summarize.emit(this.provider.id()); + }); + } refresh() { this.providerRecord.refreshCurrent().then(() => {