From 5f8b54ef2a71ba2df65398c3a53cbb29ee3fcf61 Mon Sep 17 00:00:00 2001 From: Ahmedeldeeb50 Date: Thu, 10 Sep 2020 10:32:48 +0200 Subject: Fix autostart for tour-guide in edit Issue-ID: CCSDK-2705 Signed-off-by: Ahmedeldeeb50 Change-Id: Ib91a0804ff2fab56a20446eb05cada4385961d52 --- .../packages-dashboard/packages-dashboard.component.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-dashboard.component.ts') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-dashboard.component.ts index c6b9c41f6..9862608b4 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-dashboard.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-dashboard.component.ts @@ -39,8 +39,6 @@ export class PackagesDashboardComponent implements OnInit, OnDestroy { ngOnInit() { console.log('PackagesDashboardComponent'); - - this.tourService.initialize([...steps]); this.checkTour(); } @@ -53,10 +51,17 @@ export class PackagesDashboardComponent implements OnInit, OnDestroy { } start() { + + this.tourService.initialize([...steps]); console.log('start .................'); this.tourService.start(); + localStorage.setItem('tour-guide', 'start'); this.tourService.events$.subscribe(res => { console.log(res); + + if (res.name === 'end') { + localStorage.setItem('tour-guide', 'end'); + } if (res.value && res.value.anchorId) { if (res.value.anchorId.includes('mt-')) { $('#nav-metadata-tab').trigger('click'); @@ -76,6 +81,7 @@ export class PackagesDashboardComponent implements OnInit, OnDestroy { if (res.value.anchorId.includes('st-')) { $('#nav-scripts-tab').trigger('click'); } + } }); } -- cgit 1.2.3-korg