Skip to content

Commit

Permalink
Merge pull request #1071 from hackforla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sydneywalcoff committed Nov 9, 2023
2 parents a644920 + 5d1ebe2 commit 1a29041
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions products/statement-generator/src/components/FormHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ const FormHeader = () => {
formState: { involvement },
} = useContext(FormStateContext);

const isFrozen = currentStep === AppUrl.Involvement;

const stepNum = convertStepToNum(currentStep, involvement);
let maxNum = 6;

const {
isJobChecked,
isCommunityChecked,
Expand All @@ -128,8 +133,7 @@ const FormHeader = () => {
isSomethingElseChecked,
isUnemploymentChecked,
} = involvement;
let maxNum = 6;
const stepNum = convertStepToNum(currentStep, involvement);

if (isJobChecked) {
maxNum += 1;
}
Expand All @@ -152,11 +156,13 @@ const FormHeader = () => {
maxNum += 1;
}

if (currentStep === AppUrl.Involvement) {
maxNum = 6;
}
let percentageComplete;

const percentageComplete = (stepNum / maxNum) * 100;
if (isFrozen) {
percentageComplete = 20;
} else {
percentageComplete = (stepNum / maxNum) * 100;
}

const formTitle = getSectionTitle(currentStep);

Expand Down

0 comments on commit 1a29041

Please sign in to comment.