Feature/extend promotion system by label (#4181)

* Extend promotion system by label
pull/1685/merge
Thomas Kaul 4 days ago committed by GitHub
parent ffa21edd8e
commit d7171b9221
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -34,6 +34,7 @@ export class PricingPageComponent implements OnDestroy, OnInit {
'DATA_IMPORT_AND_EXPORT_TOOLTIP_PREMIUM' 'DATA_IMPORT_AND_EXPORT_TOOLTIP_PREMIUM'
); );
public isLoggedIn: boolean; public isLoggedIn: boolean;
public label: string;
public price: number; public price: number;
public priceId: string; public priceId: string;
public professionalDataProviderTooltipPremium = translate( public professionalDataProviderTooltipPremium = translate(
@ -59,6 +60,7 @@ export class PricingPageComponent implements OnDestroy, OnInit {
this.coupon = subscriptionOffers?.default?.coupon; this.coupon = subscriptionOffers?.default?.coupon;
this.durationExtension = subscriptionOffers?.default?.durationExtension; this.durationExtension = subscriptionOffers?.default?.durationExtension;
this.label = subscriptionOffers?.default?.label;
this.price = subscriptionOffers?.default?.price; this.price = subscriptionOffers?.default?.price;
this.userService.stateChanged this.userService.stateChanged
@ -80,6 +82,8 @@ export class PricingPageComponent implements OnDestroy, OnInit {
subscriptionOffers?.[ subscriptionOffers?.[
this.user?.subscription?.offer this.user?.subscription?.offer
]?.durationExtension; ]?.durationExtension;
this.label =
subscriptionOffers?.[this.user?.subscription?.offer]?.label;
this.price = this.price =
subscriptionOffers?.[this.user?.subscription?.offer]?.price; subscriptionOffers?.[this.user?.subscription?.offer]?.price;
this.priceId = this.priceId =

@ -179,6 +179,11 @@
[ngClass]="{ active: user?.subscription?.type === 'Premium' }" [ngClass]="{ active: user?.subscription?.type === 'Premium' }"
> >
<mat-card-content class="d-flex flex-column h-100"> <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="flex-grow-1">
<div class="align-items-center d-flex mb-2"> <div class="align-items-center d-flex mb-2">
<h4 class="align-items-center d-flex flex-grow-1 m-0"> <h4 class="align-items-center d-flex flex-grow-1 m-0">

@ -23,6 +23,12 @@
ion-icon[name='checkmark-circle-outline'] { ion-icon[name='checkmark-circle-outline'] {
color: rgba(var(--palette-primary-500), 1); color: rgba(var(--palette-primary-500), 1);
} }
.badge-container {
left: 0;
right: 0;
top: 0;
}
} }
} }

@ -4,6 +4,7 @@ export interface SubscriptionOffer {
coupon?: number; coupon?: number;
couponId?: string; couponId?: string;
durationExtension?: StringValue; durationExtension?: StringValue;
label?: string;
price: number; price: number;
priceId: string; priceId: string;
} }

Loading…
Cancel
Save