From: Galen Charlton Date: Tue, 1 Sep 2020 01:31:02 +0000 (-0400) Subject: LH#21: tweak holding tag form X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f443560a555785a009eeec5fbb3d6d6b3538efb7;p=working%2FEvergreen.git LH#21: tweak holding tag form Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.html index 57cd3f5005..897ddf8c91 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.html @@ -4,6 +4,8 @@ + + @@ -21,14 +23,19 @@ - +
+
+ +
+ +
+
+ +
+
+
- + diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.ts index 699b2004ca..d79a954d74 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.ts @@ -33,6 +33,8 @@ export class ProviderHoldingsComponent implements OnInit, AfterViewInit { @ViewChild('updateFailedString', { static: false }) updateFailedString: StringComponent; @ViewChild('deleteFailedString', { static: true }) deleteFailedString: StringComponent; @ViewChild('deleteSuccessString', { static: true }) deleteSuccessString: StringComponent; + @ViewChild('successTagString', { static: true }) successTagString: StringComponent; + @ViewChild('updateFailedTagString', { static: false }) updateFailedTagString: StringComponent; cellTextGenerator: GridCellTextGenerator; provider: IdlObject; @@ -101,9 +103,23 @@ export class ProviderHoldingsComponent implements OnInit, AfterViewInit { } updateProvider(providerId: any) { - this.providerRecord.refreshCurrent().then(() => { - this.provider = this.providerRecord.current(); - }); + this.provider.holding_tag(this.provider._holding_tag); + this.provider.ischanged(true); + this.providerRecord.batchUpdate([this.provider]).subscribe( + val => { + this.successTagString.current() + .then(str => this.toast.success(str)); + }, + err => { + this.updateFailedTagString.current() + .then(str => this.toast.danger(str)); + }, + () => { + this.providerRecord.refreshCurrent().then( + () => { this.provider = this.providerRecord.current(); } + ); + } + ); } getDataSource(): GridDataSource {