Этот коммит содержится в:
Conor Macpherson
2023-03-31 13:38:37 -04:00
родитель 62b46a630d
Коммит 6fe45fe890
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@@ -41,7 +41,7 @@ export default function SelfHostedExpansionCard(props: Props) {
const getMonthsUntilExpiry = () => {
const now = new Date();
return (licenseExpiry.getMonth() - now.getMonth()) + 12 * (licenseExpiry.getFullYear() - now.getFullYear());
return (licenseExpiry.getMonth() - now.getMonth()) + (MONTHS_IN_YEAR * (licenseExpiry.getFullYear() - now.getFullYear()));
};
const getMonthlyPrice = () => {
@@ -208,6 +208,7 @@ export default function SelfHostedExpansionCard(props: Props) {
<br/>
<FormattedMessage
id='self_hosted_expansion_rhs_card_cost_per_user_breakdown'
/* eslint-disable no-template-curly-in-string */
defaultMessage='${costPerUser} x {monthsUntilExpiry} months'
values={{
costPerUser: getMonthlyPrice().toFixed(2),

Просмотреть файл

@@ -3,7 +3,7 @@
import React from 'react';
import {screen, fireEvent, waitFor} from '@testing-library/react';
import {screen, fireEvent} from '@testing-library/react';
import {GlobalState} from 'types/store';