<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0 d-flex justify-content-between">
- <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true"
+ <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" id="templateTab" aria-expanded="true"
aria-controls="collapseOne">
1. Template <span class="accordian-title">{{currentTemplate?.fileName?.split('/')[1]}}</span>
</button>
import { SharedService } from '../shared-service';
import { XmlParser } from '../utils/XmlParser';
import { TourService } from 'ngx-tour-md-menu';
-import {PackageCreationService} from '../../package-creation.service';
+import { PackageCreationService } from '../../package-creation.service';
declare var $: any;
@Component({
this.fileName = '';
this.toastr.success('File is created', 'success');
this.openListView();
- console.log(this.tourService.getStatus());
- this.tourService.goto('tm-templateEdit');
+ if (localStorage.getItem('tour-guide') !== 'end' && localStorage.getItem('tour-guide') !== 'false') {
+ this.tourService.goto('tm-templateEdit');
+ }
} else {
console.log('this file already exist');
this.toastr.error('File name already exist', 'Error');
createNewTemplate() {
this.openCreationView();
this.sharedService.disableEdit();
- this.tourService.goto('tm-templateName');
+ if (localStorage.getItem('tour-guide') !== 'end' && localStorage.getItem('tour-guide') !== 'false') {
+ this.tourService.goto('tm-templateName');
+ }
}
openCreationView() {
this.showCreationView.emit('tell parent to open create views');
ngOnInit() {
console.log('PackagesDashboardComponent');
-
- this.tourService.initialize([...steps]);
this.checkTour();
}
}
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');
if (res.value.anchorId.includes('st-')) {
$('#nav-scripts-tab').trigger('click');
}
+
}
});
}