Skip to content

Commit 42559b8

Browse files
committed
chore: schemas updated
1 parent 962e0d2 commit 42559b8

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

webapp/src/ee/billing/component/Plan/migration/PlanMigrationDetail.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const PlanMigrationDetail = ({ migration, editLink }: Props) => {
3131
const { t } = useTranslate();
3232
if (!migration) {
3333
return (
34-
<Box padding={3}>
34+
<Box p={3}>
3535
<Typography variant={'subtitle2'}>
3636
{t('administration_plan_migration_not_found')}
3737
</Typography>
@@ -56,11 +56,22 @@ export const PlanMigrationDetail = ({ migration, editLink }: Props) => {
5656
/>
5757
)}
5858
</Box>
59-
<MigrationDetailBox className={clsx(!migration.enabled && 'inactive')}>
59+
<MigrationDetailBox className={clsx({ inactive: !migration.enabled })}>
6060
<Box display="flex" gap={1} alignItems="center" mb={1}>
61-
<PlanMigrationPlanPriceDetail plan={migration.sourcePlan} />
62-
<ArrowRight width={18} height={18} />
63-
<PlanMigrationPlanPriceDetail plan={migration.targetPlan} />
61+
<PlanMigrationPlanPriceDetail
62+
plan={migration.sourcePlan}
63+
label={t('administration_plan_migration_from')}
64+
/>
65+
<ArrowRight
66+
width={18}
67+
height={18}
68+
aria-hidden="true"
69+
focusable="false"
70+
/>
71+
<PlanMigrationPlanPriceDetail
72+
plan={migration.targetPlan}
73+
label={t('administration_plan_migration_to')}
74+
/>
6475
</Box>
6576
<Box mt={2}>
6677
<Typography variant={'subtitle2'}>
@@ -84,7 +95,6 @@ export const PlanMigrationDetail = ({ migration, editLink }: Props) => {
8495
</MigrationDetailBox>
8596
<Box display="flex" justifyContent="center" mt={3}>
8697
<Button
87-
key="edit-migration"
8898
variant="contained"
8999
size="medium"
90100
startIcon={<Settings01 width={19} height={19} />}

webapp/src/ee/billing/component/Plan/migration/PlanMigrationPlanPriceDetail.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Box, Chip, styled, Typography } from '@mui/material';
22
import { PricePrimary } from 'tg.ee.module/billing/component/Price/PricePrimary';
33
import React from 'react';
4-
import { useTranslate } from '@tolgee/react';
54
import { components } from 'tg.service/billingApiSchema.generated';
65

76
type CloudPlan = components['schemas']['CloudPlanModel'];
@@ -16,14 +15,15 @@ const TooltipTitle = styled('div')`
1615

1716
const TooltipText = styled('div')`
1817
white-space: nowrap;
18+
overflow-wrap: anywhere;
1919
`;
2020

2121
type Props = {
2222
plan: CloudPlan | SelfHostedEePlanAdministrationModel;
23+
label: string;
2324
};
2425

25-
export const PlanMigrationPlanPriceDetail = ({ plan }: Props) => {
26-
const { t } = useTranslate();
26+
export const PlanMigrationPlanPriceDetail = ({ plan, label }: Props) => {
2727
return (
2828
<Chip
2929
sx={{
@@ -36,9 +36,7 @@ export const PlanMigrationPlanPriceDetail = ({ plan }: Props) => {
3636
}}
3737
label={
3838
<Box>
39-
<Typography variant="caption">
40-
{t('administration_plan_migration_from')}
41-
</Typography>
39+
<Typography variant="caption">{label}</Typography>
4240
<TooltipTitle>{plan.name}</TooltipTitle>
4341
{plan.prices && (
4442
<TooltipText>

0 commit comments

Comments
 (0)