Browse Source
Feature/extend promotion system by label (#4181)
* Extend promotion system by label
pull/1685/merge
Thomas Kaul
6 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
16 additions and
0 deletions
-
apps/client/src/app/pages/pricing/pricing-page.component.ts
-
apps/client/src/app/pages/pricing/pricing-page.html
-
apps/client/src/app/pages/pricing/pricing-page.scss
-
libs/common/src/lib/interfaces/subscription-offer.interface.ts
|
|
@ -34,6 +34,7 @@ export class PricingPageComponent implements OnDestroy, OnInit { |
|
|
|
'DATA_IMPORT_AND_EXPORT_TOOLTIP_PREMIUM' |
|
|
|
); |
|
|
|
public isLoggedIn: boolean; |
|
|
|
public label: string; |
|
|
|
public price: number; |
|
|
|
public priceId: string; |
|
|
|
public professionalDataProviderTooltipPremium = translate( |
|
|
@ -59,6 +60,7 @@ export class PricingPageComponent implements OnDestroy, OnInit { |
|
|
|
|
|
|
|
this.coupon = subscriptionOffers?.default?.coupon; |
|
|
|
this.durationExtension = subscriptionOffers?.default?.durationExtension; |
|
|
|
this.label = subscriptionOffers?.default?.label; |
|
|
|
this.price = subscriptionOffers?.default?.price; |
|
|
|
|
|
|
|
this.userService.stateChanged |
|
|
@ -80,6 +82,8 @@ export class PricingPageComponent implements OnDestroy, OnInit { |
|
|
|
subscriptionOffers?.[ |
|
|
|
this.user?.subscription?.offer |
|
|
|
]?.durationExtension; |
|
|
|
this.label = |
|
|
|
subscriptionOffers?.[this.user?.subscription?.offer]?.label; |
|
|
|
this.price = |
|
|
|
subscriptionOffers?.[this.user?.subscription?.offer]?.price; |
|
|
|
this.priceId = |
|
|
|
|
|
@ -179,6 +179,11 @@ |
|
|
|
[ngClass]="{ active: user?.subscription?.type === 'Premium' }" |
|
|
|
> |
|
|
|
<mat-card-content class="d-flex flex-column h-100"> |
|
|
|
@if (label) { |
|
|
|
<div class="badge-container position-absolute text-right"> |
|
|
|
<span class="badge badge-warning m-1">{{ label }}</span> |
|
|
|
</div> |
|
|
|
} |
|
|
|
<div class="flex-grow-1"> |
|
|
|
<div class="align-items-center d-flex mb-2"> |
|
|
|
<h4 class="align-items-center d-flex flex-grow-1 m-0"> |
|
|
|
|
|
@ -23,6 +23,12 @@ |
|
|
|
ion-icon[name='checkmark-circle-outline'] { |
|
|
|
color: rgba(var(--palette-primary-500), 1); |
|
|
|
} |
|
|
|
|
|
|
|
.badge-container { |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
top: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -4,6 +4,7 @@ export interface SubscriptionOffer { |
|
|
|
coupon?: number; |
|
|
|
couponId?: string; |
|
|
|
durationExtension?: StringValue; |
|
|
|
label?: string; |
|
|
|
price: number; |
|
|
|
priceId: string; |
|
|
|
} |
|
|
|