Commit 63291ee2 authored by Leandro Nunes's avatar Leandro Nunes

Merge branch 'develop' into 'master'

Develop

Closes #267

See merge request !95
parents 32cee902 00b2cfcd
Pipeline #18609970 passed with stages
in 8 minutes and 22 seconds
......@@ -39,6 +39,8 @@ export class CategoryComponent implements OnDestroy {
this.profile = profile;
});
this.route.params.subscribe(params => {
this.sendTagToOneSignal(params.slug);
categoryService.get(params.slug).subscribe(categorySerialized => {
this.category = Object.assign(new Category(), categorySerialized);
this.styles = this.category ? this.category.getStyle() : null;
......@@ -81,6 +83,20 @@ export class CategoryComponent implements OnDestroy {
}
sendTagToOneSignal(slug): void {
const OneSignal = window['OneSignal'] || [];
if (OneSignal) {
OneSignal.push(() => {
const key = 'category';
const value = slug;
OneSignal.sendTag(key, value, (tagsSent) => {
console.log('OneSignal: Sent tag with key ' + key + ' and value ' + value);
});
});
}
}
ngOnDestroy() {
this.categoryService.setCurrent(null);
}
......
......@@ -75,6 +75,9 @@ export class TourInterceptor implements HttpInterceptor, OnInit {
if (_.isNil(this.profile)) {
activateTour = true;
} else {
if(_.isNil(this.profile.tour_step)) {
this.profile.tour_step = Tour.STEP_TWO
}
activateTour = this.tourService.existStep(this.profile.tour_step);
activateTour = activateTour && (this.profile.tour_step !== Tour.STEP_FINISH);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment