From b0cafb58beacb2e3927af5388e2f8d9a7ec6f6be Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 7 Jan 2025 11:23:53 +0000 Subject: [PATCH] two digit day month on reps doc --- components/case/representation/index.js | 4 ++-- .../representationCompleteSubmit.js | 6 +++--- .../case/representation/representationLPA.js | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/components/case/representation/index.js b/components/case/representation/index.js index f4d482bd..55684919 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -111,8 +111,8 @@ let MakeRepresentation = (props) => { const repDate = new Date(); - let day = repDate.getDate(); - let month = repDate.getMonth() + 1; + let day = ("0" + repDate.getDate()).slice(-2); + let month = ("0" + repDate.getMonth() + 1).slice(-2); let year = repDate.getFullYear(); switch (values.representationCapacity) { diff --git a/components/case/representation/representationCompleteSubmit.js b/components/case/representation/representationCompleteSubmit.js index 0a3c45ae..6e8cc68d 100644 --- a/components/case/representation/representationCompleteSubmit.js +++ b/components/case/representation/representationCompleteSubmit.js @@ -509,9 +509,9 @@ const RepCompleteSubmit = (props) => { className="govuk-button" data-module="govuk-button" onClick={() => { - setRepresentationSubmitConfirmation( - true - ); + // setRepresentationSubmitConfirmation( + // true + // ); setRepresentationSubmit(true); }} > diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 2edf9771..9b54a752 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -17,6 +17,12 @@ import RepresentationProgress_s78 from "./representationProgress/representationP import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement"; import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78"; +import { + setRepresentationCapacity, + setRepresentationSubmit, + setFilesForRepresentations, +} from "../../../store/currentView/action"; + let RepLPA = (props) => { let { t } = useTranslation(); const router = useRouter(); @@ -39,6 +45,7 @@ let RepLPA = (props) => { updateRepresentation, setSavingStatus, savingStatus, + setFilesForRepresentations, } = props; const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); @@ -363,7 +370,9 @@ let RepLPA = (props) => { ].values.filesList) || [] } - setFilesForRepresentation={[]} + setFilesForRepresentations={ + setFilesForRepresentations + } containerID={ props.props.props.accountDetails .containerID @@ -583,6 +592,10 @@ RepLPA = connect((state) => { const mapDispatchToProps = (dispatch) => ({ updateField: (form, field, newValue) => dispatch(change(form, field, newValue)), + + setFilesForRepresentations: (fileList) => { + dispatch(setFilesForRepresentations(fileList)); + }, }); const mapStateToProps = (state, props) => {