Skip to content

Commit

Permalink
Update date import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgain committed Jan 7, 2025
1 parent 4d49220 commit 28e8ef5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/client/modules/ExportWins/Form/WinDetailsStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Countries from '../../../components/Resource/Countries'
import Sector from '../../../components/Resource/Sector'

import { useFormContext } from '../../../../client/components/Form/hooks'
import { getStartDateOfTwelveMonthsAgo } from '../../../utils/date'
import { getStartDateOfTwelveMonthsAgo } from './date'
import { formatValue, sumAllWinTypeYearlyValues } from './utils'
import { BLACK, WHITE } from '../../../../client/utils/colours'
import { validateWinDate, validateTextField } from './validators'
Expand Down
6 changes: 2 additions & 4 deletions src/client/modules/ExportWins/Form/transformers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { isEmpty } from 'lodash'
import { OPTION_YES, OPTION_NO } from '../../../../common/constants'
import { idNameToValueLabel } from '../../../../client/utils'
import { sumWinTypeYearlyValues } from './utils'
import {
convertDateToFieldDateObject,
isWithinLastTwelveMonths,
} from '../../../utils/date'
import { isWithinLastTwelveMonths } from './date'
import { convertDateToFieldDateObject } from '../../../utils/date'
import {
winTypeId,
GOODS_ID,
Expand Down
2 changes: 1 addition & 1 deletion src/client/modules/ExportWins/Form/validators.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isWithinLastTwelveMonths } from '../../../utils/date'
import { isWithinLastTwelveMonths } from './date'

const TEXT_FIELD_MAX_LENGTH = 128

Expand Down
2 changes: 1 addition & 1 deletion test/functional/cypress/specs/export-win/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { addMonths, subMonths } from 'date-fns'
import {
getRandomDateInRange,
getStartDateOfTwelveMonthsAgo,
} from '../../../../../src/client/utils/date'
} from '../../../../../src/client/modules/ExportWins/Form/date'
import { clickContinueButton } from '../../support/actions'
import { assertUrl } from '../../support/assertions'
import { formFields } from './constants'
Expand Down

0 comments on commit 28e8ef5

Please sign in to comment.