From be2b1b8604360653ecf6574e936759327c12e57c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 1 Apr 2020 18:10:19 -0400 Subject: [PATCH] update summary after editing provider Signed-off-by: Galen Charlton --- .../src/app/staff/acq/provider/acq-provider.component.html | 2 +- .../src/app/staff/acq/provider/provider-details.component.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) 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(() => { -- 2.11.0