2023-01-10 09:40:46 +13:00
|
|
|
import * as React from 'react';
|
2023-01-31 07:10:45 +13:00
|
|
|
import {useContext, useEffect, useState} from 'react';
|
2023-01-10 09:40:46 +13:00
|
|
|
import Dialog from '@mui/material/Dialog';
|
|
|
|
import DialogContent from '@mui/material/DialogContent';
|
|
|
|
import DialogTitle from '@mui/material/DialogTitle';
|
2023-02-22 16:44:30 +13:00
|
|
|
import {Alert, Badge, CardActionArea, CardContent, Chip, ListItem, Stack, Switch, useMediaQuery} from "@mui/material";
|
2023-01-10 09:40:46 +13:00
|
|
|
import theme from "./theme";
|
|
|
|
import DialogFooter from "./DialogFooter";
|
2023-01-15 00:43:44 +13:00
|
|
|
import Button from "@mui/material/Button";
|
2023-02-22 16:44:30 +13:00
|
|
|
import accountApi, {SubscriptionInterval} from "../app/AccountApi";
|
2023-01-15 00:43:44 +13:00
|
|
|
import session from "../app/Session";
|
|
|
|
import routes from "./routes";
|
|
|
|
import Card from "@mui/material/Card";
|
|
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
import {AccountContext} from "./App";
|
2023-02-22 16:44:30 +13:00
|
|
|
import {formatBytes, formatNumber, formatPrice, formatShortDate} from "../app/utils";
|
2023-01-18 13:40:03 +13:00
|
|
|
import {Trans, useTranslation} from "react-i18next";
|
|
|
|
import List from "@mui/material/List";
|
2023-02-22 16:44:30 +13:00
|
|
|
import {Check, Close} from "@mui/icons-material";
|
2023-01-18 13:40:03 +13:00
|
|
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
|
|
import ListItemText from "@mui/material/ListItemText";
|
2023-01-18 14:21:19 +13:00
|
|
|
import Box from "@mui/material/Box";
|
2023-01-21 16:47:37 +13:00
|
|
|
import {NavLink} from "react-router-dom";
|
2023-02-03 09:19:37 +13:00
|
|
|
import {UnauthorizedError} from "../app/errors";
|
2023-01-10 09:40:46 +13:00
|
|
|
|
|
|
|
const UpgradeDialog = (props) => {
|
2023-01-17 10:35:37 +13:00
|
|
|
const { t } = useTranslation();
|
2023-01-19 07:46:40 +13:00
|
|
|
const { account } = useContext(AccountContext); // May be undefined!
|
2023-02-03 09:19:37 +13:00
|
|
|
const [error, setError] = useState("");
|
2023-01-18 04:09:37 +13:00
|
|
|
const [tiers, setTiers] = useState(null);
|
2023-02-22 16:44:30 +13:00
|
|
|
const [interval, setInterval] = useState(account?.billing?.interval || SubscriptionInterval.YEAR);
|
2023-01-21 16:47:37 +13:00
|
|
|
const [newTierCode, setNewTierCode] = useState(account?.tier?.code); // May be undefined
|
2023-01-18 14:21:19 +13:00
|
|
|
const [loading, setLoading] = useState(false);
|
2023-02-03 09:19:37 +13:00
|
|
|
const fullScreen = useMediaQuery(theme.breakpoints.down('sm'));
|
2023-01-10 09:40:46 +13:00
|
|
|
|
2023-01-18 04:09:37 +13:00
|
|
|
useEffect(() => {
|
2023-02-12 14:38:13 +13:00
|
|
|
const fetchTiers = async () => {
|
|
|
|
setTiers(await accountApi.billingTiers());
|
|
|
|
}
|
|
|
|
fetchTiers(); // Dangle
|
2023-01-18 04:09:37 +13:00
|
|
|
}, []);
|
|
|
|
|
2023-01-19 07:46:40 +13:00
|
|
|
if (!tiers) {
|
2023-01-17 10:35:37 +13:00
|
|
|
return <></>;
|
|
|
|
}
|
|
|
|
|
2023-01-21 16:47:37 +13:00
|
|
|
const tiersMap = Object.assign(...tiers.map(tier => ({[tier.code]: tier})));
|
|
|
|
const newTier = tiersMap[newTierCode]; // May be undefined
|
|
|
|
const currentTier = account?.tier; // May be undefined
|
2023-02-22 16:44:30 +13:00
|
|
|
const currentInterval = account?.billing?.interval; // May be undefined
|
2023-01-21 16:47:37 +13:00
|
|
|
const currentTierCode = currentTier?.code; // May be undefined
|
|
|
|
|
|
|
|
// Figure out buttons, labels and the submit action
|
|
|
|
let submitAction, submitButtonLabel, banner;
|
2023-01-19 07:46:40 +13:00
|
|
|
if (!account) {
|
|
|
|
submitButtonLabel = t("account_upgrade_dialog_button_redirect_signup");
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = Action.REDIRECT_SIGNUP;
|
|
|
|
banner = null;
|
2023-02-22 16:44:30 +13:00
|
|
|
} else if (currentTierCode === newTierCode && currentInterval === interval) {
|
2023-01-18 13:40:03 +13:00
|
|
|
submitButtonLabel = t("account_upgrade_dialog_button_update_subscription");
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = null;
|
|
|
|
banner = (currentTierCode) ? Banner.PRORATION_INFO : null;
|
|
|
|
} else if (!currentTierCode) {
|
2023-01-18 13:40:03 +13:00
|
|
|
submitButtonLabel = t("account_upgrade_dialog_button_pay_now");
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = Action.CREATE_SUBSCRIPTION;
|
|
|
|
banner = null;
|
|
|
|
} else if (!newTierCode) {
|
2023-01-18 13:40:03 +13:00
|
|
|
submitButtonLabel = t("account_upgrade_dialog_button_cancel_subscription");
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = Action.CANCEL_SUBSCRIPTION;
|
|
|
|
banner = Banner.CANCEL_WARNING;
|
2023-01-17 10:35:37 +13:00
|
|
|
} else {
|
2023-01-18 13:40:03 +13:00
|
|
|
submitButtonLabel = t("account_upgrade_dialog_button_update_subscription");
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = Action.UPDATE_SUBSCRIPTION;
|
|
|
|
banner = Banner.PRORATION_INFO;
|
2023-01-17 10:35:37 +13:00
|
|
|
}
|
|
|
|
|
2023-01-21 16:47:37 +13:00
|
|
|
// Exceptional conditions
|
2023-01-18 14:21:19 +13:00
|
|
|
if (loading) {
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = null;
|
2023-01-22 02:55:31 +13:00
|
|
|
} else if (newTier?.code && account?.reservations?.length > newTier?.limits?.reservations) {
|
2023-01-21 16:47:37 +13:00
|
|
|
submitAction = null;
|
|
|
|
banner = Banner.RESERVATIONS_WARNING;
|
2023-01-18 14:21:19 +13:00
|
|
|
}
|
|
|
|
|
2023-01-17 10:35:37 +13:00
|
|
|
const handleSubmit = async () => {
|
2023-01-21 16:47:37 +13:00
|
|
|
if (submitAction === Action.REDIRECT_SIGNUP) {
|
2023-01-19 07:46:40 +13:00
|
|
|
window.location.href = routes.signup;
|
|
|
|
return;
|
|
|
|
}
|
2023-01-15 00:43:44 +13:00
|
|
|
try {
|
2023-01-18 14:21:19 +13:00
|
|
|
setLoading(true);
|
2023-01-21 16:47:37 +13:00
|
|
|
if (submitAction === Action.CREATE_SUBSCRIPTION) {
|
2023-02-22 16:44:30 +13:00
|
|
|
const response = await accountApi.createBillingSubscription(newTierCode, interval);
|
2023-01-17 10:35:37 +13:00
|
|
|
window.location.href = response.redirect_url;
|
2023-01-21 16:47:37 +13:00
|
|
|
} else if (submitAction === Action.UPDATE_SUBSCRIPTION) {
|
2023-02-22 16:44:30 +13:00
|
|
|
await accountApi.updateBillingSubscription(newTierCode, interval);
|
2023-01-21 16:47:37 +13:00
|
|
|
} else if (submitAction === Action.CANCEL_SUBSCRIPTION) {
|
2023-01-16 17:29:46 +13:00
|
|
|
await accountApi.deleteBillingSubscription();
|
2023-01-15 00:43:44 +13:00
|
|
|
}
|
2023-01-17 10:35:37 +13:00
|
|
|
props.onCancel();
|
2023-01-15 00:43:44 +13:00
|
|
|
} catch (e) {
|
2023-01-17 10:35:37 +13:00
|
|
|
console.log(`[UpgradeDialog] Error changing billing subscription`, e);
|
2023-02-03 09:19:37 +13:00
|
|
|
if (e instanceof UnauthorizedError) {
|
2023-01-15 00:43:44 +13:00
|
|
|
session.resetAndRedirect(routes.login);
|
2023-02-03 09:19:37 +13:00
|
|
|
} else {
|
|
|
|
setError(e.message);
|
2023-01-15 00:43:44 +13:00
|
|
|
}
|
2023-01-18 14:21:19 +13:00
|
|
|
} finally {
|
|
|
|
setLoading(false);
|
2023-01-15 00:43:44 +13:00
|
|
|
}
|
2023-01-10 09:40:46 +13:00
|
|
|
}
|
|
|
|
|
2023-02-22 16:44:30 +13:00
|
|
|
// Figure out discount
|
2023-02-23 08:21:23 +13:00
|
|
|
let discount = 0, upto = false;
|
2023-02-22 16:44:30 +13:00
|
|
|
if (newTier?.prices) {
|
|
|
|
discount = Math.round(((newTier.prices.month*12/newTier.prices.year)-1)*100);
|
|
|
|
} else {
|
2023-02-23 08:21:23 +13:00
|
|
|
let n = 0;
|
2023-02-22 16:44:30 +13:00
|
|
|
for (const t of tiers) {
|
|
|
|
if (t.prices) {
|
2023-02-23 08:21:23 +13:00
|
|
|
const tierDiscount = Math.round(((t.prices.month*12/t.prices.year)-1)*100);
|
|
|
|
if (tierDiscount > discount) {
|
|
|
|
discount = tierDiscount;
|
|
|
|
n++;
|
|
|
|
}
|
2023-02-22 16:44:30 +13:00
|
|
|
}
|
|
|
|
}
|
2023-02-23 08:21:23 +13:00
|
|
|
upto = n > 1;
|
2023-02-22 16:44:30 +13:00
|
|
|
}
|
|
|
|
|
2023-01-10 09:40:46 +13:00
|
|
|
return (
|
2023-01-18 13:40:03 +13:00
|
|
|
<Dialog
|
|
|
|
open={props.open}
|
|
|
|
onClose={props.onCancel}
|
2023-02-22 16:44:30 +13:00
|
|
|
maxWidth="lg"
|
2023-01-18 13:40:03 +13:00
|
|
|
fullScreen={fullScreen}
|
|
|
|
>
|
2023-02-22 16:44:30 +13:00
|
|
|
<DialogTitle>
|
|
|
|
<div style={{ display: "flex", flexDirection: "row" }}>
|
|
|
|
<div style={{ flexGrow: 1 }}>{t("account_upgrade_dialog_title")}</div>
|
|
|
|
<div style={{
|
|
|
|
display: "flex",
|
|
|
|
flexDirection: "row",
|
|
|
|
alignItems: "center",
|
|
|
|
marginTop: "4px"
|
|
|
|
}}>
|
|
|
|
<Typography component="span" variant="subtitle1">{t("account_upgrade_dialog_interval_monthly")}</Typography>
|
|
|
|
<Switch
|
|
|
|
checked={interval === SubscriptionInterval.YEAR}
|
|
|
|
onChange={(ev) => setInterval(ev.target.checked ? SubscriptionInterval.YEAR : SubscriptionInterval.MONTH)}
|
|
|
|
/>
|
|
|
|
<Typography component="span" variant="subtitle1">{t("account_upgrade_dialog_interval_yearly")}</Typography>
|
2023-02-23 08:21:23 +13:00
|
|
|
{discount > 0 &&
|
|
|
|
<Chip
|
|
|
|
label={upto ? t("account_upgrade_dialog_interval_yearly_discount_save_up_to", { discount: discount }) : t("account_upgrade_dialog_interval_yearly_discount_save", { discount: discount })}
|
|
|
|
color="primary"
|
|
|
|
size="small"
|
|
|
|
variant={interval === SubscriptionInterval.YEAR ? "filled" : "outlined"}
|
|
|
|
sx={{ marginLeft: "5px" }}
|
|
|
|
/>
|
|
|
|
}
|
2023-02-22 16:44:30 +13:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</DialogTitle>
|
2023-01-10 09:40:46 +13:00
|
|
|
<DialogContent>
|
2023-01-15 00:43:44 +13:00
|
|
|
<div style={{
|
|
|
|
display: "flex",
|
2023-01-18 04:09:37 +13:00
|
|
|
flexDirection: "row",
|
|
|
|
marginBottom: "8px",
|
|
|
|
width: "100%"
|
2023-01-15 00:43:44 +13:00
|
|
|
}}>
|
2023-01-18 04:09:37 +13:00
|
|
|
{tiers.map(tier =>
|
|
|
|
<TierCard
|
2023-01-18 13:40:03 +13:00
|
|
|
key={`tierCard${tier.code || '_free'}`}
|
|
|
|
tier={tier}
|
2023-01-21 16:47:37 +13:00
|
|
|
current={currentTierCode === tier.code} // tier.code or currentTierCode may be undefined!
|
|
|
|
selected={newTierCode === tier.code} // tier.code may be undefined!
|
2023-02-22 16:44:30 +13:00
|
|
|
interval={interval}
|
2023-01-21 16:47:37 +13:00
|
|
|
onClick={() => setNewTierCode(tier.code)} // tier.code may be undefined!
|
2023-01-18 04:09:37 +13:00
|
|
|
/>
|
|
|
|
)}
|
2023-01-15 00:43:44 +13:00
|
|
|
</div>
|
2023-01-21 16:47:37 +13:00
|
|
|
{banner === Banner.CANCEL_WARNING &&
|
2023-02-22 16:44:30 +13:00
|
|
|
<Alert severity="warning" sx={{ fontSize: "1rem" }}>
|
2023-01-18 13:40:03 +13:00
|
|
|
<Trans
|
|
|
|
i18nKey="account_upgrade_dialog_cancel_warning"
|
2023-01-19 07:46:40 +13:00
|
|
|
values={{ date: formatShortDate(account?.billing?.paid_until || 0) }} />
|
2023-01-17 10:35:37 +13:00
|
|
|
</Alert>
|
|
|
|
}
|
2023-01-21 16:47:37 +13:00
|
|
|
{banner === Banner.PRORATION_INFO &&
|
2023-02-22 16:44:30 +13:00
|
|
|
<Alert severity="info" sx={{ fontSize: "1rem" }}>
|
2023-01-18 13:40:03 +13:00
|
|
|
<Trans i18nKey="account_upgrade_dialog_proration_info" />
|
2023-01-18 04:09:37 +13:00
|
|
|
</Alert>
|
|
|
|
}
|
2023-01-21 16:47:37 +13:00
|
|
|
{banner === Banner.RESERVATIONS_WARNING &&
|
2023-02-22 16:44:30 +13:00
|
|
|
<Alert severity="warning" sx={{ fontSize: "1rem" }}>
|
2023-01-21 16:47:37 +13:00
|
|
|
<Trans
|
|
|
|
i18nKey="account_upgrade_dialog_reservations_warning"
|
|
|
|
count={account?.reservations.length - newTier?.limits.reservations}
|
|
|
|
components={{
|
|
|
|
Link: <NavLink to={routes.settings}/>,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Alert>
|
|
|
|
}
|
2023-01-10 09:40:46 +13:00
|
|
|
</DialogContent>
|
2023-02-03 09:19:37 +13:00
|
|
|
<DialogFooter status={error}>
|
2023-01-18 14:21:19 +13:00
|
|
|
<Button onClick={props.onCancel}>{t("account_upgrade_dialog_button_cancel")}</Button>
|
2023-01-21 16:47:37 +13:00
|
|
|
<Button onClick={handleSubmit} disabled={!submitAction}>{submitButtonLabel}</Button>
|
2023-01-10 09:40:46 +13:00
|
|
|
</DialogFooter>
|
|
|
|
</Dialog>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2023-01-15 00:43:44 +13:00
|
|
|
const TierCard = (props) => {
|
2023-01-18 13:40:03 +13:00
|
|
|
const { t } = useTranslation();
|
|
|
|
const tier = props.tier;
|
2023-02-22 16:44:30 +13:00
|
|
|
|
2023-01-21 16:47:37 +13:00
|
|
|
let cardStyle, labelStyle, labelText;
|
|
|
|
if (props.selected) {
|
2023-02-22 16:44:30 +13:00
|
|
|
cardStyle = { background: "#eee", border: "3px solid #338574" };
|
2023-01-21 16:47:37 +13:00
|
|
|
labelStyle = { background: "#338574", color: "white" };
|
|
|
|
labelText = t("account_upgrade_dialog_tier_selected_label");
|
|
|
|
} else if (props.current) {
|
2023-02-22 16:44:30 +13:00
|
|
|
cardStyle = { border: "3px solid #eee" };
|
2023-01-21 16:47:37 +13:00
|
|
|
labelStyle = { background: "#eee", color: "black" };
|
|
|
|
labelText = t("account_upgrade_dialog_tier_current_label");
|
|
|
|
} else {
|
2023-02-22 16:44:30 +13:00
|
|
|
cardStyle = { border: "3px solid transparent" };
|
|
|
|
}
|
|
|
|
|
|
|
|
let monthlyPrice;
|
|
|
|
if (!tier.prices) {
|
|
|
|
monthlyPrice = 0;
|
|
|
|
} else if (props.interval === SubscriptionInterval.YEAR) {
|
|
|
|
monthlyPrice = tier.prices.year/12;
|
|
|
|
} else if (props.interval === SubscriptionInterval.MONTH) {
|
|
|
|
monthlyPrice = tier.prices.month;
|
2023-01-21 16:47:37 +13:00
|
|
|
}
|
2023-01-18 13:40:03 +13:00
|
|
|
|
2023-01-15 00:43:44 +13:00
|
|
|
return (
|
2023-01-18 14:21:19 +13:00
|
|
|
<Box sx={{
|
|
|
|
m: "7px",
|
2023-02-22 16:44:30 +13:00
|
|
|
minWidth: "240px",
|
2023-01-18 13:40:03 +13:00
|
|
|
flexGrow: 1,
|
|
|
|
flexShrink: 1,
|
|
|
|
flexBasis: 0,
|
2023-02-22 16:44:30 +13:00
|
|
|
borderRadius: "5px",
|
2023-01-19 07:46:40 +13:00
|
|
|
"&:first-of-type": { ml: 0 },
|
|
|
|
"&:last-of-type": { mr: 0 },
|
2023-01-18 04:09:37 +13:00
|
|
|
...cardStyle
|
|
|
|
}}>
|
2023-01-18 14:21:19 +13:00
|
|
|
<Card sx={{ height: "100%" }}>
|
|
|
|
<CardActionArea sx={{ height: "100%" }}>
|
|
|
|
<CardContent onClick={props.onClick} sx={{ height: "100%" }}>
|
2023-01-21 16:47:37 +13:00
|
|
|
{labelStyle &&
|
2023-01-18 14:21:19 +13:00
|
|
|
<div style={{
|
|
|
|
position: "absolute",
|
|
|
|
top: "0",
|
|
|
|
right: "15px",
|
|
|
|
padding: "2px 10px",
|
|
|
|
borderRadius: "3px",
|
2023-01-21 16:47:37 +13:00
|
|
|
...labelStyle
|
|
|
|
}}>{labelText}</div>
|
2023-01-18 14:21:19 +13:00
|
|
|
}
|
2023-02-22 16:44:30 +13:00
|
|
|
<Typography variant="subtitle1" component="div">
|
2023-02-10 09:24:12 +13:00
|
|
|
{tier.name || t("account_basics_tier_free")}
|
2023-01-18 04:09:37 +13:00
|
|
|
</Typography>
|
2023-02-22 16:44:30 +13:00
|
|
|
<div>
|
|
|
|
<Typography component="span" variant="h4" sx={{ fontWeight: 500, marginRight: "3px" }}>{formatPrice(monthlyPrice)}</Typography>
|
|
|
|
{monthlyPrice > 0 && <>/ {t("account_upgrade_dialog_tier_price_per_month")}</>}
|
|
|
|
</div>
|
2023-01-18 14:21:19 +13:00
|
|
|
<List dense>
|
2023-02-22 16:44:30 +13:00
|
|
|
{tier.limits.reservations > 0 && <Feature>{t("account_upgrade_dialog_tier_features_reservations", { reservations: tier.limits.reservations })}</Feature>}
|
|
|
|
{tier.limits.reservations === 0 && <NoFeature>{t("account_upgrade_dialog_tier_features_no_reservations")}</NoFeature>}
|
|
|
|
<Feature>{t("account_upgrade_dialog_tier_features_messages", { messages: formatNumber(tier.limits.messages) })}</Feature>
|
|
|
|
<Feature>{t("account_upgrade_dialog_tier_features_emails", { emails: formatNumber(tier.limits.emails) })}</Feature>
|
|
|
|
<Feature>{t("account_upgrade_dialog_tier_features_attachment_file_size", { filesize: formatBytes(tier.limits.attachment_file_size, 0) })}</Feature>
|
|
|
|
<Feature>{t("account_upgrade_dialog_tier_features_attachment_total_size", { totalsize: formatBytes(tier.limits.attachment_total_size, 0) })}</Feature>
|
2023-01-18 14:21:19 +13:00
|
|
|
</List>
|
2023-02-22 16:44:30 +13:00
|
|
|
{tier.prices && props.interval === SubscriptionInterval.MONTH &&
|
|
|
|
<Typography variant="body2" color="gray">
|
|
|
|
{t("account_upgrade_dialog_tier_price_billed_monthly", { price: formatPrice(tier.prices.month*12) })}
|
|
|
|
</Typography>
|
|
|
|
}
|
|
|
|
{tier.prices && props.interval === SubscriptionInterval.YEAR &&
|
|
|
|
<Typography variant="body2" color="gray">
|
|
|
|
{t("account_upgrade_dialog_tier_price_billed_yearly", { price: formatPrice(tier.prices.year), save: formatPrice(tier.prices.month*12-tier.prices.year) })}
|
2023-01-18 14:21:19 +13:00
|
|
|
</Typography>
|
|
|
|
}
|
|
|
|
</CardContent>
|
|
|
|
</CardActionArea>
|
|
|
|
</Card>
|
|
|
|
</Box>
|
|
|
|
|
2023-01-15 00:43:44 +13:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-02-22 16:44:30 +13:00
|
|
|
const Feature = (props) => {
|
|
|
|
return <FeatureItem feature={true}>{props.children}</FeatureItem>;
|
|
|
|
}
|
|
|
|
|
|
|
|
const NoFeature = (props) => {
|
|
|
|
return <FeatureItem feature={false}>{props.children}</FeatureItem>;
|
|
|
|
}
|
|
|
|
|
2023-01-18 13:40:03 +13:00
|
|
|
const FeatureItem = (props) => {
|
|
|
|
return (
|
|
|
|
<ListItem disableGutters sx={{m: 0, p: 0}}>
|
|
|
|
<ListItemIcon sx={{minWidth: "24px"}}>
|
2023-02-22 16:44:30 +13:00
|
|
|
{props.feature && <Check fontSize="small" sx={{ color: "#338574" }}/>}
|
|
|
|
{!props.feature && <Close fontSize="small" sx={{ color: "gray" }}/>}
|
2023-01-18 13:40:03 +13:00
|
|
|
</ListItemIcon>
|
|
|
|
<ListItemText
|
|
|
|
sx={{mt: "2px", mb: "2px"}}
|
|
|
|
primary={
|
2023-02-22 16:44:30 +13:00
|
|
|
<Typography variant="body1">
|
2023-01-18 13:40:03 +13:00
|
|
|
{props.children}
|
|
|
|
</Typography>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</ListItem>
|
|
|
|
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2023-01-17 10:35:37 +13:00
|
|
|
const Action = {
|
2023-01-21 16:47:37 +13:00
|
|
|
REDIRECT_SIGNUP: 1,
|
|
|
|
CREATE_SUBSCRIPTION: 2,
|
|
|
|
UPDATE_SUBSCRIPTION: 3,
|
|
|
|
CANCEL_SUBSCRIPTION: 4
|
2023-01-17 10:35:37 +13:00
|
|
|
};
|
|
|
|
|
2023-01-21 16:47:37 +13:00
|
|
|
const Banner = {
|
|
|
|
CANCEL_WARNING: 1,
|
|
|
|
PRORATION_INFO: 2,
|
|
|
|
RESERVATIONS_WARNING: 3
|
|
|
|
};
|
|
|
|
|
2023-01-10 09:40:46 +13:00
|
|
|
export default UpgradeDialog;
|