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
parent
commit
d7171b9221
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      apps/client/src/app/pages/pricing/pricing-page.component.ts
  2. 5
      apps/client/src/app/pages/pricing/pricing-page.html
  3. 6
      apps/client/src/app/pages/pricing/pricing-page.scss
  4. 1
      libs/common/src/lib/interfaces/subscription-offer.interface.ts

4
apps/client/src/app/pages/pricing/pricing-page.component.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 =

5
apps/client/src/app/pages/pricing/pricing-page.html

@ -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">

6
apps/client/src/app/pages/pricing/pricing-page.scss

@ -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;
}
}
}

1
libs/common/src/lib/interfaces/subscription-offer.interface.ts

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

Loading…
Cancel
Save