fix: scope ActivationStep validation to current step only

The "Continue to Add-ons" button was unresponsive when selecting
scheduled activation because validate() ran full-form schema validation
(all steps), silently failing on incomplete fields from other steps.
Now only checks that a date is selected for scheduled activation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Temuulen Ankhbayar 2026-03-07 13:24:38 +09:00
parent 1ef2c5e125
commit 1fa8c6b5ad
3 changed files with 3 additions and 4 deletions

View File

@ -79,7 +79,6 @@ function SimConfigureStep(props: Omit<Props, "loading"> & { plan: NonNullable<Pr
scheduledActivationDate={scheduledActivationDate}
setScheduledActivationDate={setScheduledActivationDate}
activationFee={activationFeeDetails}
validate={validate}
onNext={() => setCurrentStep(3)}
onBack={() => setCurrentStep(1)}
/>

View File

@ -13,12 +13,13 @@ export function ActivationStep({
scheduledActivationDate,
setScheduledActivationDate,
activationFee,
validate,
onNext,
onBack,
}: ActivationStepProps) {
const handleContinue = () => {
if (activationType === "Scheduled" && !validate()) {
// Only validate that a date is selected for scheduled activation —
// full-form validation runs at checkout, not mid-wizard.
if (activationType === "Scheduled" && !scheduledActivationDate) {
return;
}
onNext();

View File

@ -35,7 +35,6 @@ export interface ActivationStepProps extends BaseStepProps {
scheduledActivationDate: string;
setScheduledActivationDate: (date: string) => void;
activationFee?: ActivationFeeDetails | undefined;
validate: () => boolean;
}
export interface AddonsStepProps extends BaseStepProps {