not show payment plan on employee view
parent
234511e5a4
commit
5e73a168f9
|
@ -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,35 +235,36 @@ export function SideMenuContent({
|
||||||
<div>
|
<div>
|
||||||
<Divider style={{ margin: 0 }} />
|
<Divider style={{ margin: 0 }} />
|
||||||
|
|
||||||
{showPaymentPlanInfoBanner && (
|
{sideBarContext.permissions.includes("paymentPlan") &&
|
||||||
<Card
|
showPaymentPlanInfoBanner && (
|
||||||
style={{ backgroundColor: "#6878d6", margin: 8 }}
|
<Card
|
||||||
styles={{ body: { padding: 10 } }}
|
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)}
|
|
||||||
>
|
>
|
||||||
{t("sideMenu.paymentPlanUpgradeButton")}
|
<Flex justify="center" align="center">
|
||||||
</Button>
|
<Typography.Title
|
||||||
</Card>
|
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
|
<Menu
|
||||||
selectable={true}
|
selectable={true}
|
||||||
|
|
Loading…
Reference in New Issue