Skip to content

Commit

Permalink
bug: fix min commitment copy with intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Mar 19, 2024
1 parent ac3aed7 commit 8005da8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion ditto/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,6 @@
"text_65d601bffb11e0f9d1d9f565": "Add a min. commitment",
"text_65d601bffb11e0f9d1d9f567": "Commitments",
"text_65d601bffb11e0f9d1d9f569": "Minimum commitments",
"text_65d601bffb11e0f9d1d9f56b": "A fee will be issued if the total invoiced fees for a {{interval}} fall below the minimum commitment, in order to meet the required minimum.",
"text_65d601bffb11e0f9d1d9f571": "Spending minimum",
"text_65d620fda73c6f007f6f238b": "A fee will be issued if the total invoiced fees for a week falls below the minimum commitment, in order to meet the required minimum.",
"text_65d620fda73c6f007f6f238c": "A fee will be issued if the total invoiced fees for a month falls below the minimum commitment, in order to meet the required minimum.",
Expand Down
3 changes: 2 additions & 1 deletion src/components/plans/CommitmentsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useCurrentUser } from '~/hooks/useCurrentUser'
import { NAV_HEIGHT, theme } from '~/styles'

import { mapChargeIntervalCopy } from './ChargeAccordion'
import { intervalDescriptionLookupTranslation } from './details/PlanDetailsCommitmentsSection'
import { PlanFormInput } from './types'

import { AmountInputField, ComboBox } from '../form'
Expand Down Expand Up @@ -148,7 +149,7 @@ export const CommitmentsSection = ({
{translate('text_65d601bffb11e0f9d1d9f569')}
</Typography>
<Typography variant="caption" color="grey600">
{translate('text_65d601bffb11e0f9d1d9f56b')}
{translate(intervalDescriptionLookupTranslation[formikProps.values.interval])}
</Typography>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { DetailsInfoGrid, DetailsInfoItem } from '~/styles/detailsPage'

import PlanDetailsChargeTableDisplay from './PlanDetailsChargeTableDisplay'

const intervalDescriptionLookupTranslation = {
export const intervalDescriptionLookupTranslation = {
[PlanInterval.Monthly]: 'text_65d620fda73c6f007f6f238c',
[PlanInterval.Quarterly]: 'text_65d620fda73c6f007f6f238d',
[PlanInterval.Weekly]: 'text_65d620fda73c6f007f6f238b',
Expand Down

0 comments on commit 8005da8

Please sign in to comment.