not show payment plan on employee view

master
alex 2024-02-25 16:26:58 +01:00
parent 234511e5a4
commit 5e73a168f9
1 changed files with 33 additions and 30 deletions

View File

@ -101,7 +101,6 @@ export function SideMenuContent({
}; };
const showPaymentPlanInfoBanner = const showPaymentPlanInfoBanner =
sideBarContext.permissions.includes("paymentPlan") &&
sideBarContext.paymentPlanStatus === "trialing" && sideBarContext.paymentPlanStatus === "trialing" &&
sideBarContext.paymentPlanTrialEnd !== null && sideBarContext.paymentPlanTrialEnd !== null &&
sideBarContext.paymentPlanCanceledAt !== null; sideBarContext.paymentPlanCanceledAt !== null;
@ -124,7 +123,10 @@ export function SideMenuContent({
); );
} }
if (!showPaymentPlanInfoBanner) { if (
sideBarContext.permissions.includes("paymentPlan") &&
!showPaymentPlanInfoBanner
) {
items.push({ items.push({
label: t("sideMenu.paymentPlan"), label: t("sideMenu.paymentPlan"),
icon: <WalletOutlined />, icon: <WalletOutlined />,
@ -233,7 +235,8 @@ export function SideMenuContent({
<div> <div>
<Divider style={{ margin: 0 }} /> <Divider style={{ margin: 0 }} />
{showPaymentPlanInfoBanner && ( {sideBarContext.permissions.includes("paymentPlan") &&
showPaymentPlanInfoBanner && (
<Card <Card
style={{ backgroundColor: "#6878d6", margin: 8 }} style={{ backgroundColor: "#6878d6", margin: 8 }}
styles={{ body: { padding: 10 } }} styles={{ body: { padding: 10 } }}