From: Galen Charlton Date: Tue, 30 Jul 2019 20:02:49 +0000 (-0400) Subject: LP#1831788: (follow-up) update sandbox example X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d0e82eac9f5fd198c6f959a3a0b8ac72a3ca77ad;p=working%2FEvergreen.git LP#1831788: (follow-up) update sandbox example - dialog adjusted for LP#1823041 changes - typo fixed Signed-off-by: Galen Charlton --- 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 3f3bbd40bc..c5a941eab4 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 2f5cc51773..52f4c6cc48 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 @@ -330,22 +330,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); + } } - } - ); + ) + }); } }