diff --git a/components/case/representation/representationComplete.js b/components/case/representation/representationComplete.js index b34bc891..0bfa4b12 100644 --- a/components/case/representation/representationComplete.js +++ b/components/case/representation/representationComplete.js @@ -36,9 +36,17 @@ const RepComplete = (props) => { )); + const isSIPS = + props.props.currentView.caseReference.appealType === 846040002; + useEffect(() => { - const reference = "PEDW-REPRESENTATION-COMPLETE"; - const templateId = "c49785e7-3217-40b6-b33f-dffc4e58d5c1"; + const reference = isSIPS + ? "PEDW-CONSULTATION-COMPLETE" + : "PEDW-REPRESENTATION-COMPLETE"; + const templateId = isSIPS + ? "c3f373ca-df9d-4967-bea0-3ad3a57f8dcc" + : "c49785e7-3217-40b6-b33f-dffc4e58d5c1"; + const emailAddress = props.props.props.props.accountDetails.accountDetails.emailaddress1; const personalisation = { @@ -83,7 +91,8 @@ const RepComplete = (props) => { : props.props.currentView.caseReference .representationType, }), - setRepresentationMessageSent(true)); + setRepresentationMessageSent(true)), + window.scrollTo({ top: 0, behavior: "smooth" }); }); return (
diff --git a/components/newappeal/complete.js b/components/newappeal/complete.js index 68c1e1f8..648980c2 100644 --- a/components/newappeal/complete.js +++ b/components/newappeal/complete.js @@ -65,6 +65,7 @@ let CompleteAppeal = (props) => { console.log("patching///////////////"); // //patchCase(incidentId); + window.scrollTo({ top: 0, behavior: "smooth" }); }, [ props.appealType.caseReference, props.props.form.appealForm.values,