From 28e8ef5f372135ea56e4526f1917b1f7d8682e27 Mon Sep 17 00:00:00 2001 From: Paul Gain Date: Tue, 7 Jan 2025 14:22:05 +0000 Subject: [PATCH] Update date import paths --- src/client/modules/ExportWins/Form/WinDetailsStep.jsx | 2 +- src/client/modules/ExportWins/Form/transformers.js | 6 ++---- src/client/modules/ExportWins/Form/validators.js | 2 +- test/functional/cypress/specs/export-win/utils.js | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/client/modules/ExportWins/Form/WinDetailsStep.jsx b/src/client/modules/ExportWins/Form/WinDetailsStep.jsx index 81a6f61b120..9c3e8c40b5c 100644 --- a/src/client/modules/ExportWins/Form/WinDetailsStep.jsx +++ b/src/client/modules/ExportWins/Form/WinDetailsStep.jsx @@ -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' diff --git a/src/client/modules/ExportWins/Form/transformers.js b/src/client/modules/ExportWins/Form/transformers.js index 1c133ac741a..be90b2cbbaf 100644 --- a/src/client/modules/ExportWins/Form/transformers.js +++ b/src/client/modules/ExportWins/Form/transformers.js @@ -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, diff --git a/src/client/modules/ExportWins/Form/validators.js b/src/client/modules/ExportWins/Form/validators.js index 5734fb73ff2..1d426866fe6 100644 --- a/src/client/modules/ExportWins/Form/validators.js +++ b/src/client/modules/ExportWins/Form/validators.js @@ -1,4 +1,4 @@ -import { isWithinLastTwelveMonths } from '../../../utils/date' +import { isWithinLastTwelveMonths } from './date' const TEXT_FIELD_MAX_LENGTH = 128 diff --git a/test/functional/cypress/specs/export-win/utils.js b/test/functional/cypress/specs/export-win/utils.js index bad32da21de..5c81acf65ee 100644 --- a/test/functional/cypress/specs/export-win/utils.js +++ b/test/functional/cypress/specs/export-win/utils.js @@ -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'