From 5e73a168f908fad3de78c292ffe01ec519e80a42 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 25 Feb 2024 16:26:58 +0100 Subject: [PATCH] not show payment plan on employee view --- src/Components/SideMenu/index.js | 63 +++++++++++++++++--------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/src/Components/SideMenu/index.js b/src/Components/SideMenu/index.js index 95832d3..f1f24a3 100644 --- a/src/Components/SideMenu/index.js +++ b/src/Components/SideMenu/index.js @@ -101,7 +101,6 @@ export function SideMenuContent({ }; const showPaymentPlanInfoBanner = - sideBarContext.permissions.includes("paymentPlan") && sideBarContext.paymentPlanStatus === "trialing" && sideBarContext.paymentPlanTrialEnd !== null && sideBarContext.paymentPlanCanceledAt !== null; @@ -124,7 +123,10 @@ export function SideMenuContent({ ); } - if (!showPaymentPlanInfoBanner) { + if ( + sideBarContext.permissions.includes("paymentPlan") && + !showPaymentPlanInfoBanner + ) { items.push({ label: t("sideMenu.paymentPlan"), icon: , @@ -233,35 +235,36 @@ export function SideMenuContent({
- {showPaymentPlanInfoBanner && ( - - - - {t("sideMenu.paymentPlanTrailingDaysLeft", { - daysLeft: accountPlanExpiry, - dayUnit: - accountPlanExpiry > 1 - ? t("common.unit.days") - : t("common.unit.day"), - })} - - - - - - )} + + + {t("sideMenu.paymentPlanTrailingDaysLeft", { + daysLeft: accountPlanExpiry, + dayUnit: + accountPlanExpiry > 1 + ? t("common.unit.days") + : t("common.unit.day"), + })} + + + + + + )}