From 743f4f1efb45124548ed3663ab6bbaa88d029dd2 Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Mon, 30 Apr 2018 11:46:34 +0300 Subject: Promise logic to pub-sub Added a fix where the loader was displayed before waiting for the plugin to finish is work Change-Id: Ie8cb309f6bc65a2dd2d1fef1f33e36030930f45f Issue-ID: SDC-1164 Signed-off-by: Idan Amit --- catalog-ui/src/app/utils/change-lifecycle-state-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app/utils') diff --git a/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts b/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts index 143c3c5360..54497ba187 100644 --- a/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts +++ b/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts @@ -103,14 +103,15 @@ export class ChangeLifecycleStateHandler { //------------------------------------------------- let onOk = (confirmationText):void => { comment.userRemarks = confirmationText; - scope.isLoading = true; if (data.url === "lifecycleState/CHECKIN") { this.eventBusService.notify("CHECK_IN").subscribe(() => { + scope.isLoading = true; component.changeLifecycleState(data.url, comment).then(onSuccess, onError); }); } else { + scope.isLoading = true; component.changeLifecycleState(data.url, comment).then(onSuccess, onError); } }; -- cgit 1.2.3-korg