this tab is calculating the hours backwards,

0% = 50 hours

100% 0 ho
This commit is contained in:
Leon Serfaty G
2025-07-18 04:37:28 +00:00
parent ed8034c48f
commit dcd7f4c89d
@@ -1,3 +1,4 @@
"use client";
import type { FormData } from './cost-estimator-form';
@@ -28,8 +29,8 @@ const stageLabels = [
];
const calculateHours = (projectStage: number): number => {
// Scale hours linearly from 0 to 50 as projectStage goes from 0 to 100.
return Math.round((projectStage / 100) * 50);
// Scale hours from 50 down to 0 as projectStage goes from 0 to 100.
return Math.round(((100 - projectStage) / 100) * 50);
};
export function Step3ProjectStage({ onNext, onBack, onUpdateData, formData }: Step3Props) {