Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/extend subscription offer key type (#6022)

Thomas Kauld0d1a2ac8873
diff --git a/apps/api/src/app/subscription/subscription.service.ts b/apps/api/src/app/subscription/subscription.service.ts
index 0458005c9d..0fad8c8ac6 100644
--- a/apps/api/src/app/subscription/subscription.service.ts
+++ b/apps/api/src/app/subscription/subscription.service.ts
@@ -179,6 +179,8 @@ export class SubscriptionService {
offerKey = 'renewal-early-bird-2023';
} else if (isBefore(createdAt, parseDate('2024-01-01'))) {
offerKey = 'renewal-early-bird-2024';
+ } else if (isBefore(createdAt, parseDate('2025-12-01'))) {
+ offerKey = 'renewal-early-bird-2025';
}
const offer = await this.getSubscriptionOffer({
diff --git a/libs/common/src/lib/types/subscription-offer-key.type.ts b/libs/common/src/lib/types/subscription-offer-key.type.ts
index f6d898a01f..89322a4002 100644
--- a/libs/common/src/lib/types/subscription-offer-key.type.ts
+++ b/libs/common/src/lib/types/subscription-offer-key.type.ts
@@ -2,4 +2,5 @@ export type SubscriptionOfferKey =
| 'default'
| 'renewal'
| 'renewal-early-bird-2023'
- | 'renewal-early-bird-2024';
+ | 'renewal-early-bird-2024'
+ | 'renewal-early-bird-2025';