Feature/extend promotion system by label (#4181)
* Extend promotion system by label
This commit is contained in:
parent
ffa21edd8e
commit
d7171b9221
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user