diff --git a/src/locales/messages.pot b/src/locales/messages.pot
index 67b84491ed..dd53f22962 100644
--- a/src/locales/messages.pot
+++ b/src/locales/messages.pot
@@ -2921,6 +2921,9 @@ msgstr ""
msgid "Twitter handle"
msgstr ""
+msgid "Check your changes carefully. Each deploy will incur a gas fee."
+msgstr ""
+
msgid "<0/> fee"
msgstr ""
@@ -3317,9 +3320,6 @@ msgstr ""
msgid "Previous value"
msgstr ""
-msgid "Please check your changes carefully. Each deploy will incur a gas fee."
-msgstr ""
-
msgid "Owner token minting:"
msgstr ""
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx
index c3a865bc23..fb455be122 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx
@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
import { Form } from 'antd'
import { AdvancedDropdown } from 'components/Project/ProjectSettings/AdvancedDropdown'
import TooltipLabel from 'components/TooltipLabel'
+import { JuiceDatePicker } from 'components/inputs/JuiceDatePicker'
import { JuiceSwitch } from 'components/inputs/JuiceSwitch'
import {
CONTROLLER_CONFIG_EXPLANATION,
@@ -9,6 +10,7 @@ import {
TERMINAL_CONFIG_EXPLANATION,
TERMINAL_MIGRATION_EXPLANATION,
} from 'components/strings'
+import moment from 'moment'
export function DetailsSectionAdvanced() {
return (
@@ -56,6 +58,30 @@ export function DetailsSectionAdvanced() {
}
/>
+
+
+ Start time
+
+ }
+ >
+
+ {
+ if (!current) return false
+ const now = moment()
+ if (current.isSame(now, 'day') || current.isAfter(now, 'day'))
+ return false
+ return true
+ }}
+ showTime={{ defaultValue: moment('00:00:00') }}
+ />
+
+
)
}
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormFields.ts b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormFields.ts
index 997759f1dd..5c0007ee65 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormFields.ts
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormFields.ts
@@ -12,6 +12,7 @@ type DetailsSectionFields = {
allowControllerMigration: boolean
allowTerminalMigration: boolean
pausePay: boolean
+ mustStartAtOrAfter: string
}
type PayoutsSectionFields = {
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx
index f24754dd42..f0ccc1e241 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx
@@ -40,6 +40,9 @@ export function DetailsSectionDiff() {
newSetController,
currentSetController,
allowSetControllerHasDiff,
+
+ mustStartAtOrAfter,
+ hasMustStartAtOrAfter,
} = useDetailsSectionValues()
if (!sectionHasDiff) {
@@ -156,6 +159,16 @@ export function DetailsSectionDiff() {
}
/>
)}
+ {hasMustStartAtOrAfter && (
+
+ {mustStartAtOrAfter.toString()}
+
+ }
+ />
+ )}
>
)
}
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
index f2b364fa8f..8a76889ba1 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
@@ -67,7 +67,7 @@ export function ReviewConfirmModal({
>
- Please check your changes carefully. Each deploy will incur a gas
+ Check your changes carefully. Each deploy will incur a gas
fee.
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts
index 8b1b2b4b59..23ba07dafb 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts
@@ -2,6 +2,7 @@ import { BigNumber } from '@ethersproject/bignumber'
import { V2V3ProjectContext } from 'packages/v2v3/contexts/Project/V2V3ProjectContext'
import { getBallotStrategyByAddress } from 'packages/v2v3/utils/ballotStrategies'
import { useContext } from 'react'
+import { DEFAULT_MUST_START_AT_OR_AFTER } from 'redux/slices/v2v3/creatingV2Project'
import { otherUnitToSeconds } from 'utils/format/formatTime'
import { useEditCycleFormContext } from '../../EditCycleFormContext'
@@ -67,12 +68,17 @@ export const useDetailsSectionValues = () => {
)
const allowSetControllerHasDiff = currentSetController !== newSetController
+ const mustStartAtOrAfter = editCycleForm?.getFieldValue('mustStartAtOrAfter')
+ const hasMustStartAtOrAfter =
+ mustStartAtOrAfter !== DEFAULT_MUST_START_AT_OR_AFTER
+
const advancedOptionsHasDiff =
pausePayHasDiff ||
allowSetTerminalsHasDiff ||
allowSetControllerHasDiff ||
allowControllerMigrationHasDiff ||
- allowTerminalMigrationHasDiff
+ allowTerminalMigrationHasDiff ||
+ hasMustStartAtOrAfter
const sectionHasDiff =
durationHasDiff || ballotHasDiff || advancedOptionsHasDiff
@@ -108,5 +114,8 @@ export const useDetailsSectionValues = () => {
advancedOptionsHasDiff,
sectionHasDiff,
+
+ mustStartAtOrAfter,
+ hasMustStartAtOrAfter,
}
}
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx
index ca0a199152..d1a4ec3f5d 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx
@@ -14,6 +14,7 @@ import {
} from 'packages/v2v3/utils/math'
import { deserializeV2V3FundingCycleData } from 'packages/v2v3/utils/serializers'
import { useEffect, useRef, useState } from 'react'
+import { DEFAULT_MUST_START_AT_OR_AFTER } from 'redux/slices/v2v3/creatingV2Project'
import {
deriveDurationOption,
deriveDurationUnit,
@@ -78,6 +79,7 @@ export const useLoadEditCycleData = () => {
: DefaultTokenSettings.pauseTransfers
const formData = {
+ mustStartAtOrAfter: DEFAULT_MUST_START_AT_OR_AFTER,
duration: secondsToOtherUnit({
duration,
unit: deriveDurationUnit(duration),
diff --git a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx
index e2478baf32..fef8159006 100644
--- a/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx
+++ b/src/packages/v2v3/components/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx
@@ -1,5 +1,6 @@
import { BigNumber } from '@ethersproject/bignumber'
import { ETH_TOKEN_ADDRESS } from 'constants/juiceboxTokens'
+import moment from 'moment'
import { V2V3ProjectContractsContext } from 'packages/v2v3/contexts/ProjectContracts/V2V3ProjectContractsContext'
import {
V2V3FundAccessConstraint,
@@ -122,7 +123,9 @@ export const usePrepareSaveEditCycleData = () => {
editingFundingCycleData,
editingFundAccessConstraints,
editingNftRewards,
- editingMustStartAtOrAfter: DEFAULT_MUST_START_AT_OR_AFTER,
+ editingMustStartAtOrAfter: formValues.mustStartAtOrAfter
+ ? moment(formValues.mustStartAtOrAfter).unix().toString()
+ : DEFAULT_MUST_START_AT_OR_AFTER,
}
return {
diff --git a/src/packages/v4/views/V4ProjectSettings/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx b/src/packages/v4/views/V4ProjectSettings/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
index c2d81a670d..bed014b630 100644
--- a/src/packages/v4/views/V4ProjectSettings/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
+++ b/src/packages/v4/views/V4ProjectSettings/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
@@ -73,7 +73,7 @@ export function ReviewConfirmModal({
>
- Please check your changes carefully. Each deploy will incur a gas
+ Check your changes carefully. Each deploy will incur a gas
fee.