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 <ia096e@intl.att.com>
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 143c3c5..54497ba 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 @@
             //-------------------------------------------------
             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);
                 }
             };