From 49508bcd1a5025aa032c4aa959a5d452a369957c Mon Sep 17 00:00:00 2001 From: Scarlett <35635257+Scarlett-Truong@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:20:33 -0700 Subject: [PATCH] fix: issue with closing validation message in Prevention (#490) --- .../outcomes/hwcr-complaint-assessment.tsx | 1 - .../outcomes/hwcr-prevention-education.tsx | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/frontend/src/app/components/containers/complaints/outcomes/hwcr-complaint-assessment.tsx b/frontend/src/app/components/containers/complaints/outcomes/hwcr-complaint-assessment.tsx index d0ed58497..8739533ed 100644 --- a/frontend/src/app/components/containers/complaints/outcomes/hwcr-complaint-assessment.tsx +++ b/frontend/src/app/components/containers/complaints/outcomes/hwcr-complaint-assessment.tsx @@ -251,7 +251,6 @@ export const HWCRComplaintAssessment: FC = () => { dispatch(upsertAssessment(id, updatedAssessmentData)); setEditable(false); - dispatch(setIsInEdit({ showSectionErrors: false })); } else { handleFormErrors(); } diff --git a/frontend/src/app/components/containers/complaints/outcomes/hwcr-prevention-education.tsx b/frontend/src/app/components/containers/complaints/outcomes/hwcr-prevention-education.tsx index e06e3bbe2..027fc4c1d 100644 --- a/frontend/src/app/components/containers/complaints/outcomes/hwcr-prevention-education.tsx +++ b/frontend/src/app/components/containers/complaints/outcomes/hwcr-prevention-education.tsx @@ -75,10 +75,6 @@ export const HWCRComplaintPrevention: FC = () => { const { personGuid } = useAppSelector(selectComplaintHeader(complaintType)); const assigned = useAppSelector(selectComplaintAssignedBy); const cases = useAppSelector((state) => state.cases); - const assessmentRelatedError = - Object.keys(cases.prevention).length === 0 && - cases.assessment.action_required === "Yes" && - cases.isInEdit.showSectionErrors; const showSectionErrors = (editable || !showContent) && cases.isInEdit.showSectionErrors; useEffect(() => { @@ -255,15 +251,6 @@ export const HWCRComplaintPrevention: FC = () => { )} - {assessmentRelatedError && ( -
- - Complete section before closing the complaint. -
- )} {!showContent ? (