Promise logic to pub-sub 43/45243/2
authorIdan Amit <ia096e@intl.att.com>
Mon, 30 Apr 2018 08:46:34 +0000 (11:46 +0300)
committerTal Gitelman <tg851x@intl.att.com>
Mon, 30 Apr 2018 12:00:46 +0000 (12:00 +0000)
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>
catalog-ui/src/app/utils/change-lifecycle-state-handler.ts

index 143c3c5..54497ba 100644 (file)
@@ -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);
                 }
             };