@ -40,20 +40,21 @@ import { catchError } from 'rxjs/operators';
templateUrl : './user-account-membership.html'
templateUrl : './user-account-membership.html'
} )
} )
export class GfUserAccountMembershipComponent {
export class GfUserAccountMembershipComponent {
public baseCurrency : string ;
protected baseCurrency : string ;
public coupon : number | undefined ;
protected coupon : number | undefined ;
public couponId : string | undefined ;
protected defaultDateFormat : string ;
public defaultDateFormat : string ;
protected durationExtension : StringValue | undefined ;
public durationExtension : StringValue | undefined ;
protected hasPermissionForSubscription : boolean ;
public hasPermissionForSubscription : boolean ;
protected hasPermissionToCreateApiKey : boolean ;
public hasPermissionToCreateApiKey : boolean ;
protected hasPermissionToUpdateUserSettings : boolean ;
public hasPermissionToUpdateUserSettings : boolean ;
protected price : number ;
public price : number ;
protected trySubscriptionMail =
public priceId : string ;
public routerLinkPricing = publicRoutes . pricing . routerLink ;
public trySubscriptionMail =
'mailto:hi@ghostfol.io?subject=Ghostfolio Premium Trial&body=Hello%0D%0DI am interested in Ghostfolio Premium. Can you please send me a coupon code to try it for some time?%0D%0DKind regards' ;
'mailto:hi@ghostfol.io?subject=Ghostfolio Premium Trial&body=Hello%0D%0DI am interested in Ghostfolio Premium. Can you please send me a coupon code to try it for some time?%0D%0DKind regards' ;
public user : User ;
protected user : User ;
private couponId : string | undefined ;
private priceId : string ;
private routerLinkPricing = publicRoutes . pricing . routerLink ;
public constructor (
public constructor (
private changeDetectorRef : ChangeDetectorRef ,
private changeDetectorRef : ChangeDetectorRef ,
@ -104,7 +105,7 @@ export class GfUserAccountMembershipComponent {
} ) ;
} ) ;
}
}
public onCheckout() {
protected onCheckout() {
this . dataService
this . dataService
. createStripeCheckoutSession ( {
. createStripeCheckoutSession ( {
couponId : this.couponId ,
couponId : this.couponId ,
@ -125,7 +126,7 @@ export class GfUserAccountMembershipComponent {
} ) ;
} ) ;
}
}
public onGenerateApiKey() {
protected onGenerateApiKey() {
this . notificationService . confirm ( {
this . notificationService . confirm ( {
confirmFn : ( ) = > {
confirmFn : ( ) = > {
this . dataService
this . dataService
@ -158,7 +159,7 @@ export class GfUserAccountMembershipComponent {
} ) ;
} ) ;
}
}
public onRedeemCoupon() {
protected onRedeemCoupon() {
this . notificationService . prompt ( {
this . notificationService . prompt ( {
confirmFn : ( value ) = > {
confirmFn : ( value ) = > {
const couponCode = value ? . trim ( ) ;
const couponCode = value ? . trim ( ) ;