|
|
@ -13,6 +13,7 @@ import { |
|
|
Component, |
|
|
Component, |
|
|
CUSTOM_ELEMENTS_SCHEMA, |
|
|
CUSTOM_ELEMENTS_SCHEMA, |
|
|
DestroyRef, |
|
|
DestroyRef, |
|
|
|
|
|
inject, |
|
|
OnInit |
|
|
OnInit |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
@ -48,35 +49,28 @@ import { catchError } from 'rxjs/operators'; |
|
|
templateUrl: './pricing-page.html' |
|
|
templateUrl: './pricing-page.html' |
|
|
}) |
|
|
}) |
|
|
export class GfPricingPageComponent implements OnInit { |
|
|
export class GfPricingPageComponent implements OnInit { |
|
|
public baseCurrency: string; |
|
|
protected baseCurrency: string; |
|
|
public coupon: number; |
|
|
protected coupon: number | undefined; |
|
|
public couponId: string; |
|
|
protected durationExtension: StringValue | undefined; |
|
|
public durationExtension: StringValue; |
|
|
protected hasPermissionToCreateUser: boolean; |
|
|
public hasPermissionToCreateUser: boolean; |
|
|
protected hasPermissionToUpdateUserSettings: boolean; |
|
|
public hasPermissionToUpdateUserSettings: boolean; |
|
|
|
|
|
|
|
|
protected readonly importAndExportTooltipBasic = translate( |
|
|
public importAndExportTooltipBasic = translate( |
|
|
|
|
|
'DATA_IMPORT_AND_EXPORT_TOOLTIP_BASIC' |
|
|
'DATA_IMPORT_AND_EXPORT_TOOLTIP_BASIC' |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
public importAndExportTooltipOSS = translate( |
|
|
protected readonly importAndExportTooltipOSS = translate( |
|
|
'DATA_IMPORT_AND_EXPORT_TOOLTIP_OSS' |
|
|
'DATA_IMPORT_AND_EXPORT_TOOLTIP_OSS' |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
public importAndExportTooltipPremium = translate( |
|
|
protected label: string | undefined; |
|
|
'DATA_IMPORT_AND_EXPORT_TOOLTIP_PREMIUM' |
|
|
protected price: number | undefined; |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
public isLoggedIn: boolean; |
|
|
|
|
|
public label: string; |
|
|
|
|
|
public price: number; |
|
|
|
|
|
public priceId: string; |
|
|
|
|
|
|
|
|
|
|
|
public professionalDataProviderTooltipPremium = translate( |
|
|
protected readonly professionalDataProviderTooltipPremium = translate( |
|
|
'PROFESSIONAL_DATA_PROVIDER_TOOLTIP_PREMIUM' |
|
|
'PROFESSIONAL_DATA_PROVIDER_TOOLTIP_PREMIUM' |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
public referralBrokers = [ |
|
|
protected readonly referralBrokers = [ |
|
|
'Alpian', |
|
|
'Alpian', |
|
|
'DEGIRO', |
|
|
'DEGIRO', |
|
|
'finpension', |
|
|
'finpension', |
|
|
@ -87,19 +81,22 @@ export class GfPricingPageComponent implements OnInit { |
|
|
'Swissquote', |
|
|
'Swissquote', |
|
|
'VIAC', |
|
|
'VIAC', |
|
|
'Zak' |
|
|
'Zak' |
|
|
]; |
|
|
] as const; |
|
|
|
|
|
|
|
|
public routerLinkFeatures = publicRoutes.features.routerLink; |
|
|
protected readonly routerLinkFeatures = publicRoutes.features.routerLink; |
|
|
public routerLinkRegister = publicRoutes.register.routerLink; |
|
|
protected readonly routerLinkRegister = publicRoutes.register.routerLink; |
|
|
public user: User; |
|
|
protected user: User; |
|
|
|
|
|
|
|
|
public constructor( |
|
|
private couponId: string | undefined; |
|
|
private changeDetectorRef: ChangeDetectorRef, |
|
|
private priceId: string; |
|
|
private dataService: DataService, |
|
|
|
|
|
private destroyRef: DestroyRef, |
|
|
private readonly changeDetectorRef = inject(ChangeDetectorRef); |
|
|
private notificationService: NotificationService, |
|
|
private readonly dataService = inject(DataService); |
|
|
private userService: UserService |
|
|
private readonly destroyRef = inject(DestroyRef); |
|
|
) { |
|
|
private readonly notificationService = inject(NotificationService); |
|
|
|
|
|
private readonly userService = inject(UserService); |
|
|
|
|
|
|
|
|
|
|
|
public constructor() { |
|
|
addIcons({ |
|
|
addIcons({ |
|
|
checkmarkCircleOutline, |
|
|
checkmarkCircleOutline, |
|
|
checkmarkOutline, |
|
|
checkmarkOutline, |
|
|
@ -147,7 +144,7 @@ export class GfPricingPageComponent implements OnInit { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onCheckout() { |
|
|
protected onCheckout() { |
|
|
this.dataService |
|
|
this.dataService |
|
|
.createStripeCheckoutSession({ |
|
|
.createStripeCheckoutSession({ |
|
|
couponId: this.couponId, |
|
|
couponId: this.couponId, |
|
|
|