Skip to content

Commit

Permalink
feat: risk custom question fix
Browse files Browse the repository at this point in the history
  • Loading branch information
9sneha-n committed Oct 17, 2024
1 parent 7f38e7d commit 83eb705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/webapp/pages/form-page/mapFormStateToEntityData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,9 @@ function mapFormStateToRiskAssessmentQuestionnaire(
formData.options,
index.toString()
);
const idWithoutIdentifier = customSection.id.replace("additionalQuestions", "");
return {
id: customSection.id.replace("additionalQuestions", ""),
id: idWithoutIdentifier.length < 11 ? "" : idWithoutIdentifier, //TO DO : Temp fix
question: allFields.find(field => field.id.includes(`custom-question${index}`))
?.value as string,
likelihood: likelihoodOption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ function getRiskAssessmentCustomQuestionSection(
options;
const riskAssesssmentQuestionFormSection: FormSectionState = {
title: title,
id: questionId ? `${id}${questionId}` : `${id}`,
id: questionId ? `${id}${questionId}` : `${id}${index}`,
isVisible: true,
fields: [
{
Expand Down

0 comments on commit 83eb705

Please sign in to comment.