Browse Source

Task/improve promotion system (#5930)

* Add fallback to promotion logic
pull/5932/head
Thomas Kaul 3 weeks ago
committed by GitHub
parent
commit
da71ee73d0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      apps/client/src/app/app.component.ts

12
apps/client/src/app/app.component.ts

@ -110,10 +110,6 @@ export class GfAppComponent implements OnDestroy, OnInit {
this.deviceType = this.deviceService.getDeviceInfo().deviceType; this.deviceType = this.deviceService.getDeviceInfo().deviceType;
this.info = this.dataService.fetchInfo(); this.info = this.dataService.fetchInfo();
this.hasPromotion =
!!this.info?.subscriptionOffer?.coupon ||
!!this.info?.subscriptionOffer?.durationExtension;
this.impersonationStorageService this.impersonationStorageService
.onChangeHasImpersonation() .onChangeHasImpersonation()
.pipe(takeUntil(this.unsubscribeSubject)) .pipe(takeUntil(this.unsubscribeSubject))
@ -217,9 +213,11 @@ export class GfAppComponent implements OnDestroy, OnInit {
this.hasInfoMessage = this.hasInfoMessage =
this.canCreateAccount || !!this.user?.systemMessage; this.canCreateAccount || !!this.user?.systemMessage;
this.hasPromotion = this.hasPromotion = this.user
!!this.user?.subscription?.offer?.coupon || ? !!this.user.subscription?.offer?.coupon ||
!!this.user?.subscription?.offer?.durationExtension; !!this.user.subscription?.offer?.durationExtension
: !!this.info?.subscriptionOffer?.coupon ||
!!this.info?.subscriptionOffer?.durationExtension;
this.initializeTheme(this.user?.settings.colorScheme); this.initializeTheme(this.user?.settings.colorScheme);

Loading…
Cancel
Save