From 59a69b150f13a82c72de5ebbdde918ef18e696dc Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 30 Jul 2019 16:02:49 -0400 Subject: [PATCH] LP#1831788: (follow-up) update sandbox example - dialog adjusted for LP#1823041 changes - typo fixed Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- .../app/staff/sandbox/sandbox.component.html | 2 +- .../app/staff/sandbox/sandbox.component.ts | 30 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html index 92c0e84b79..37e46d9c86 100644 --- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html +++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html @@ -223,7 +223,7 @@ - +

PCRUD auto flesh and FormatService detection

Fingerprint: {{aMetarecord}}
diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts index 0fd1664d98..0c637b5a7e 100644 --- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts @@ -339,22 +339,26 @@ export class SandboxComponent implements OnInit { this.numConfirmDialog.open(); } - showEditDialog(idlThing: IdlObject) { + showEditDialog(idlThing: IdlObject): Promise { this.editDialog.mode = 'update'; this.editDialog.recId = idlThing['id'](); - return this.editDialog.open({size: 'lg'}).then( - ok => { - this.successString.current() - .then(str => this.toast.success(str)); - this.acpGrid.reloadSansPagerReset(); - }, - rejection => { - if (!rejection.dismissed) { - this.updateFailedString.current() - .then(str => this.toast.danger(str)); + return new Promise((resolve, reject) => { + this.editDialog.open({size: 'lg'}).subscribe( + ok => { + this.successString.current() + .then(str => this.toast.success(str)); + this.acpGrid.reloadSansPagerReset(); + resolve(ok); + }, + rejection => { + if (!rejection.dismissed) { + this.updateFailedString.current() + .then(str => this.toast.danger(str)); + reject(rejection); + } } - } - ); + ) + }); } } -- 2.43.2