diff --git a/packages/web/src/components/PaymentInformation/index.ee.tsx b/packages/web/src/components/PaymentInformation/index.ee.tsx deleted file mode 100644 index e0f8e22e..00000000 --- a/packages/web/src/components/PaymentInformation/index.ee.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from 'react'; -import Typography from '@mui/material/Typography'; - -import PageTitle from 'components/PageTitle'; -import { generateExternalLink } from 'helpers/translation-values'; -import usePaymentPortalUrl from 'hooks/usePaymentPortalUrl.ee'; -import useFormatMessage from 'hooks/useFormatMessage'; - -export default function PaymentInformation() { - const paymentPortal = usePaymentPortalUrl(); - const formatMessage = useFormatMessage(); - - return ( - - - {formatMessage('billingAndUsageSettings.paymentInformation')} - - - - {formatMessage( - 'billingAndUsageSettings.paymentPortalInformation', - { link: generateExternalLink(paymentPortal.url) })} - - - ); -} diff --git a/packages/web/src/components/UsageDataInformation/index.ee.tsx b/packages/web/src/components/UsageDataInformation/index.ee.tsx index f655a692..96814ee4 100644 --- a/packages/web/src/components/UsageDataInformation/index.ee.tsx +++ b/packages/web/src/components/UsageDataInformation/index.ee.tsx @@ -1,12 +1,21 @@ import * as React from 'react'; import { DateTime } from 'luxon'; +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; +import Card from '@mui/material/Card'; +import CardActions from '@mui/material/CardActions'; +import CardContent from '@mui/material/CardContent'; +import Chip from '@mui/material/Chip'; +import Divider from '@mui/material/Divider'; +import Grid from '@mui/material/Grid'; import Paper from '@mui/material/Paper'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableContainer'; import TableRow from '@mui/material/TableRow'; +import Typography from '@mui/material/Typography'; import useUsageData from 'hooks/useUsageData.ee'; @@ -15,43 +24,119 @@ export default function UsageDataInformation() { return ( - - - - - - Current plan - - - {usageData.name} - - - - - Total allowed task count - - - {usageData.allowedTaskCount} - - - - - Consumed task count - - - {usageData.consumedTaskCount} - - - - - Next billing date - - - {usageData.nextResetAt?.toLocaleString(DateTime.DATE_FULL)} - - -
-
+ + + + + Subscription plan + + {/* */} + + + + + + + + Monthly quota + + + Free trial + + + + + + + + + + + + Next bill amount + + + --- + + + + {/* */} + + + + + + + + Next bill date + + + --- + + + + {/* */} + + + + + + + Your usage + + + + Last 30 days total usage + + + + + + Tasks + + + 12300 + + + + + + +
); } diff --git a/packages/web/src/pages/BillingAndUsageSettings/index.ee.tsx b/packages/web/src/pages/BillingAndUsageSettings/index.ee.tsx index af12fbdf..62a7de4f 100644 --- a/packages/web/src/pages/BillingAndUsageSettings/index.ee.tsx +++ b/packages/web/src/pages/BillingAndUsageSettings/index.ee.tsx @@ -2,8 +2,7 @@ import * as React from 'react'; import { Navigate } from 'react-router-dom'; import Grid from '@mui/material/Grid'; -import * as URLS from 'config/urls' -import PaymentInformation from 'components/PaymentInformation/index.ee'; +import * as URLS from 'config/urls'; import UsageDataInformation from 'components/UsageDataInformation/index.ee'; import PageTitle from 'components/PageTitle'; import Container from 'components/Container'; @@ -16,27 +15,25 @@ function BillingAndUsageSettings() { // redirect to the initial settings page if (isCloud === false) { - return () + return ; } // render nothing until we know if it's cloud or not // here, `isCloud` is not `false`, but `undefined` - if (!isCloud) return + if (!isCloud) return ; return ( - + - {formatMessage('billingAndUsageSettings.title')} + + {formatMessage('billingAndUsageSettings.title')} + - - - - );