From 40b67778149bd3015a9229fb56ec1a478903e684 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 28 Jan 2024 09:58:38 +0100 Subject: [PATCH] Add upgrade plan button (#2937) --- apps/api/src/app/user/user.service.ts | 8 +++--- .../components/header/header.component.html | 26 +++++++++++++++++++ .../app/components/header/header.module.ts | 2 ++ .../user-account-membership.html | 4 +-- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index a4812c136..734495474 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -219,18 +219,18 @@ export class UserService { new Date(), user.createdAt ); - let frequency = 15; + let frequency = 10; if (daysSinceRegistration > 365) { frequency = 2; } else if (daysSinceRegistration > 180) { frequency = 3; } else if (daysSinceRegistration > 60) { - frequency = 5; + frequency = 4; } else if (daysSinceRegistration > 30) { - frequency = 8; + frequency = 6; } else if (daysSinceRegistration > 15) { - frequency = 12; + frequency = 8; } if (Analytics?.activityCount % frequency === 1) { diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index c4a361057..e192d7fee 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -165,6 +165,32 @@ /> + + Upgrade Plan + Renew Plan + +
+