not show payment plan on employee view
parent
234511e5a4
commit
5e73a168f9
|
@ -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: <WalletOutlined />,
|
||||
|
@ -233,35 +235,36 @@ export function SideMenuContent({
|
|||
<div>
|
||||
<Divider style={{ margin: 0 }} />
|
||||
|
||||
{showPaymentPlanInfoBanner && (
|
||||
<Card
|
||||
style={{ backgroundColor: "#6878d6", margin: 8 }}
|
||||
styles={{ body: { padding: 10 } }}
|
||||
>
|
||||
<Flex justify="center" align="center">
|
||||
<Typography.Title
|
||||
level={5}
|
||||
style={{ color: "#fff", textAlign: "center" }}
|
||||
>
|
||||
{t("sideMenu.paymentPlanTrailingDaysLeft", {
|
||||
daysLeft: accountPlanExpiry,
|
||||
dayUnit:
|
||||
accountPlanExpiry > 1
|
||||
? t("common.unit.days")
|
||||
: t("common.unit.day"),
|
||||
})}
|
||||
</Typography.Title>
|
||||
</Flex>
|
||||
|
||||
<Button
|
||||
block
|
||||
style={{ fontWeight: "bold", fontSize: 13 }}
|
||||
onClick={() => navigate(Constants.ROUTE_PATHS.PAYMENT_PLAN)}
|
||||
{sideBarContext.permissions.includes("paymentPlan") &&
|
||||
showPaymentPlanInfoBanner && (
|
||||
<Card
|
||||
style={{ backgroundColor: "#6878d6", margin: 8 }}
|
||||
styles={{ body: { padding: 10 } }}
|
||||
>
|
||||
{t("sideMenu.paymentPlanUpgradeButton")}
|
||||
</Button>
|
||||
</Card>
|
||||
)}
|
||||
<Flex justify="center" align="center">
|
||||
<Typography.Title
|
||||
level={5}
|
||||
style={{ color: "#fff", textAlign: "center" }}
|
||||
>
|
||||
{t("sideMenu.paymentPlanTrailingDaysLeft", {
|
||||
daysLeft: accountPlanExpiry,
|
||||
dayUnit:
|
||||
accountPlanExpiry > 1
|
||||
? t("common.unit.days")
|
||||
: t("common.unit.day"),
|
||||
})}
|
||||
</Typography.Title>
|
||||
</Flex>
|
||||
|
||||
<Button
|
||||
block
|
||||
style={{ fontWeight: "bold", fontSize: 13 }}
|
||||
onClick={() => navigate(Constants.ROUTE_PATHS.PAYMENT_PLAN)}
|
||||
>
|
||||
{t("sideMenu.paymentPlanUpgradeButton")}
|
||||
</Button>
|
||||
</Card>
|
||||
)}
|
||||
|
||||
<Menu
|
||||
selectable={true}
|
||||
|
|
Loading…
Reference in New Issue