this tab is calculating the hours backwards,
0% = 50 hours 100% 0 ho
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FormData } from './cost-estimator-form';
|
import type { FormData } from './cost-estimator-form';
|
||||||
@@ -28,8 +29,8 @@ const stageLabels = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const calculateHours = (projectStage: number): number => {
|
const calculateHours = (projectStage: number): number => {
|
||||||
// Scale hours linearly from 0 to 50 as projectStage goes from 0 to 100.
|
// Scale hours from 50 down to 0 as projectStage goes from 0 to 100.
|
||||||
return Math.round((projectStage / 100) * 50);
|
return Math.round(((100 - projectStage) / 100) * 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function Step3ProjectStage({ onNext, onBack, onUpdateData, formData }: Step3Props) {
|
export function Step3ProjectStage({ onNext, onBack, onUpdateData, formData }: Step3Props) {
|
||||||
|
|||||||
Reference in New Issue
Block a user