fixed page flow from submission of questionnaire
This commit is contained in:
@@ -69,7 +69,7 @@ const RepComplete = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<Link
|
<Link
|
||||||
href="/myportal"
|
href="/"
|
||||||
onClick={() => setRepresentationReset()}
|
onClick={() => setRepresentationReset()}
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useDropzone } from "react-dropzone";
|
|||||||
import RepComplete from "./representationComplete";
|
import RepComplete from "./representationComplete";
|
||||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getFormCollectionByID,
|
getFormCollectionByID,
|
||||||
@@ -35,6 +36,8 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
const [confirmSections, setConfirmSections] = useState(false);
|
||||||
|
|
||||||
const repFormData = formObj.representationForm.values;
|
const repFormData = formObj.representationForm.values;
|
||||||
|
|
||||||
// const repDate = new Date();
|
// const repDate = new Date();
|
||||||
@@ -364,15 +367,31 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
<div className="govuk-checkboxes govuk-checkboxes--small">
|
||||||
className="govuk-label govuk-body-m"
|
<div className="govuk-checkboxes__item">
|
||||||
htmlFor="representationType"
|
<input
|
||||||
>
|
name="pinswg_checkconfirmation"
|
||||||
{" "}
|
id="pinswg_checkconfirmation"
|
||||||
{t(
|
type="checkbox"
|
||||||
"myrepresentations:rep-check-tandc-para-four"
|
className="govuk-checkboxes__input"
|
||||||
)}
|
value=""
|
||||||
</label>
|
onChange={(e) => {
|
||||||
|
setConfirmSections(
|
||||||
|
!confirmSections
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-checkboxes__label"
|
||||||
|
htmlFor="pinswg_checkconfirmation"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-check-tandc-para-four"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* <Field
|
{/* <Field
|
||||||
name="representationType"
|
name="representationType"
|
||||||
component={RenderPickList}
|
component={RenderPickList}
|
||||||
@@ -384,13 +403,16 @@ const RepCompleteSubmit = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<button
|
<button
|
||||||
|
disabled={confirmSections ? false : true}
|
||||||
type="submit"
|
type="submit"
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
// onClick={() => {
|
onClick={() => {
|
||||||
// setRepresentationSubmitConfirmation();
|
setRepresentationSubmitConfirmation(
|
||||||
// setRepresentationSubmit(true);
|
true
|
||||||
// }}
|
);
|
||||||
|
setRepresentationSubmit(true);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user