16435 logic to disable continue button so cant submit empty rep

This commit is contained in:
2025-04-28 17:14:59 +01:00
parent 4bd1cf9744
commit eae42c3622
11 changed files with 47 additions and 32 deletions
@@ -10,6 +10,7 @@ import {
RenderCondtionalRadioList,
RenderPickList,
RenderRichMultiline,
shouldDisableButton,
} from "./representationElements";
import { useDropzone } from "react-dropzone";
@@ -246,24 +247,14 @@ const RepAgent = (props) => {
type="submit"
className="govuk-button"
data-module="govuk-button"
disabled={shouldDisableButton({
props,
formObj,
})}
>
{t("common:continue-button")}
</button>
{/* {router.query.state != "edit" && (
<a
onClick={() => {
setRepresentationCapacity();
props.updateField(
"representationForm",
"representationCapacity",
""
);
}}
className="govuk-link"
>
{t("common:back-link")}
</a>
)} */}
{savingStatus ? (
<span className=" progress-save-active">
{router.locale == "cy"