if the user selects UI/UX design if should take them to this step
opti
This commit is contained in:
@@ -13,6 +13,7 @@ import { Step8Branding } from './step-8-branding';
|
||||
import { Step9AdditionalFeatures } from './step-9-additional-features';
|
||||
import { Step10ShoppingCart } from './step-10-shopping-cart';
|
||||
import { Step11Results, calculateTotalHours } from './step-11-results';
|
||||
import { Step12UiUxDesign } from './step-12-uiux-design';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
|
||||
@@ -41,6 +42,7 @@ export type FormData = {
|
||||
branding: BrandingSelection;
|
||||
additionalFeatures: string[];
|
||||
shoppingCart: ShoppingCartSelection;
|
||||
uiUxDesignProcess: 'custom' | 'concepts' | null;
|
||||
};
|
||||
|
||||
export function CostEstimatorForm() {
|
||||
@@ -64,6 +66,7 @@ export function CostEstimatorForm() {
|
||||
hasCart: null,
|
||||
multiplePurchases: null,
|
||||
},
|
||||
uiUxDesignProcess: null,
|
||||
});
|
||||
const [isPending, startTransition] = useTransition();
|
||||
|
||||
@@ -71,8 +74,12 @@ export function CostEstimatorForm() {
|
||||
startTransition(() => {
|
||||
if (currentStep === 2 && formData.serviceType === 'development') {
|
||||
setCurrentStep(5);
|
||||
} else if (currentStep === 2 && formData.serviceType === 'ui-ux-design') {
|
||||
setCurrentStep(12);
|
||||
} else if (currentStep === 5 && formData.serviceType === 'development') {
|
||||
setCurrentStep(9);
|
||||
} else if (currentStep === 12) {
|
||||
setCurrentStep(11);
|
||||
} else {
|
||||
setCurrentStep((prev) => prev + 1);
|
||||
}
|
||||
@@ -85,7 +92,10 @@ export function CostEstimatorForm() {
|
||||
setCurrentStep(2);
|
||||
} else if (currentStep === 9 && formData.serviceType === 'development') {
|
||||
setCurrentStep(5);
|
||||
} else {
|
||||
} else if (currentStep === 12) {
|
||||
setCurrentStep(2);
|
||||
}
|
||||
else {
|
||||
setCurrentStep((prev) => prev - 1);
|
||||
}
|
||||
});
|
||||
@@ -115,6 +125,7 @@ export function CostEstimatorForm() {
|
||||
hasCart: null,
|
||||
multiplePurchases: null
|
||||
},
|
||||
uiUxDesignProcess: null,
|
||||
});
|
||||
setCurrentStep(1);
|
||||
}
|
||||
@@ -219,6 +230,15 @@ export function CostEstimatorForm() {
|
||||
readyMadeHours={readyMadeHours}
|
||||
/>
|
||||
)
|
||||
case 12:
|
||||
return (
|
||||
<Step12UiUxDesign
|
||||
onNext={handleNextStep}
|
||||
onBack={handlePrevStep}
|
||||
onUpdateData={handleUpdateFormData}
|
||||
formData={formData}
|
||||
/>
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<Step1ProjectType
|
||||
|
||||
Reference in New Issue
Block a user