|
|
@ -47,6 +47,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
public canCreateAccount: boolean;
|
|
|
|
public canCreateAccount: boolean;
|
|
|
|
public currentRoute: string;
|
|
|
|
public currentRoute: string;
|
|
|
|
|
|
|
|
public currentSubRoute: string;
|
|
|
|
public currentYear = new Date().getFullYear();
|
|
|
|
public currentYear = new Date().getFullYear();
|
|
|
|
public deviceType: string;
|
|
|
|
public deviceType: string;
|
|
|
|
public hasImpersonationId: boolean;
|
|
|
|
public hasImpersonationId: boolean;
|
|
|
@ -54,6 +55,8 @@ export class AppComponent implements OnDestroy, OnInit {
|
|
|
|
public hasPermissionForStatistics: boolean;
|
|
|
|
public hasPermissionForStatistics: boolean;
|
|
|
|
public hasPermissionForSubscription: boolean;
|
|
|
|
public hasPermissionForSubscription: boolean;
|
|
|
|
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
|
|
|
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
|
|
|
|
|
|
|
public hasPermissionToChangeDateRange: boolean;
|
|
|
|
|
|
|
|
public hasPermissionToChangeFilters: boolean;
|
|
|
|
public hasTabs = false;
|
|
|
|
public hasTabs = false;
|
|
|
|
public info: InfoItem;
|
|
|
|
public info: InfoItem;
|
|
|
|
public pageTitle: string;
|
|
|
|
public pageTitle: string;
|
|
|
@ -147,6 +150,35 @@ export class AppComponent implements OnDestroy, OnInit {
|
|
|
|
const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
|
|
|
|
const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
|
|
|
|
const urlSegments = urlSegmentGroup.segments;
|
|
|
|
const urlSegments = urlSegmentGroup.segments;
|
|
|
|
this.currentRoute = urlSegments[0].path;
|
|
|
|
this.currentRoute = urlSegments[0].path;
|
|
|
|
|
|
|
|
this.currentSubRoute = urlSegments[1]?.path;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
(this.currentRoute === 'home' && !this.currentSubRoute) ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'home' &&
|
|
|
|
|
|
|
|
this.currentSubRoute === 'holdings') ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'portfolio' && !this.currentSubRoute) ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'zen' && !this.currentSubRoute) ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'zen' && this.currentSubRoute === 'holdings')
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
this.hasPermissionToChangeDateRange = true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.hasPermissionToChangeDateRange = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
(this.currentRoute === 'home' &&
|
|
|
|
|
|
|
|
this.currentSubRoute === 'holdings') ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'portfolio' && !this.currentSubRoute) ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'portfolio' &&
|
|
|
|
|
|
|
|
this.currentSubRoute === 'activities') ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'portfolio' &&
|
|
|
|
|
|
|
|
this.currentSubRoute === 'allocations') ||
|
|
|
|
|
|
|
|
(this.currentRoute === 'zen' && this.currentSubRoute === 'holdings')
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
this.hasPermissionToChangeFilters = true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.hasPermissionToChangeFilters = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.hasTabs =
|
|
|
|
this.hasTabs =
|
|
|
|
(this.currentRoute === this.routerLinkAbout[0].slice(1) ||
|
|
|
|
(this.currentRoute === this.routerLinkAbout[0].slice(1) ||
|
|
|
@ -182,6 +214,8 @@ export class AppComponent implements OnDestroy, OnInit {
|
|
|
|
this.changeDetectorRef.markForCheck();
|
|
|
|
this.changeDetectorRef.markForCheck();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.userService.stateChanged
|
|
|
|
this.userService.stateChanged
|
|
|
|