ok, great but make the slide go from 0% to 90%

0% = 50 hours

90% 5 hou
This commit is contained in:
Leon Serfaty G
2025-07-18 04:39:23 +00:00
parent dcd7f4c89d
commit de13810f4d
@@ -25,12 +25,13 @@ const stageLabels = [
"70%", // 70
"80%", // 80
"90%", // 90
"100%", // 100
];
const calculateHours = (projectStage: number): number => {
// Scale hours from 50 down to 0 as projectStage goes from 0 to 100.
return Math.round(((100 - projectStage) / 100) * 50);
// 0% -> 50 hours
// 90% -> 5 hours
// Linear interpolation: H(p) = 50 - (45/90) * p = 50 - 0.5 * p
return 50 - (0.5 * projectStage);
};
export function Step3ProjectStage({ onNext, onBack, onUpdateData, formData }: Step3Props) {
@@ -61,13 +62,13 @@ export function Step3ProjectStage({ onNext, onBack, onUpdateData, formData }: St
<Slider
defaultValue={value}
onValueChange={handleSliderChange}
max={100}
max={90}
step={10}
className="w-full"
/>
<div className="flex justify-between text-xs text-muted-foreground mt-2">
<span>0%</span>
<span>100%</span>
<span>90%</span>
</div>
</div>
<div className="mt-16 flex w-full items-center justify-between">