two digit day month on reps doc

This commit is contained in:
2025-01-07 11:23:53 +00:00
parent b1edb208c6
commit b0cafb58be
3 changed files with 19 additions and 6 deletions
+2 -2
View File
@@ -111,8 +111,8 @@ let MakeRepresentation = (props) => {
const repDate = new Date(); const repDate = new Date();
let day = repDate.getDate(); let day = ("0" + repDate.getDate()).slice(-2);
let month = repDate.getMonth() + 1; let month = ("0" + repDate.getMonth() + 1).slice(-2);
let year = repDate.getFullYear(); let year = repDate.getFullYear();
switch (values.representationCapacity) { switch (values.representationCapacity) {
@@ -509,9 +509,9 @@ const RepCompleteSubmit = (props) => {
className="govuk-button" className="govuk-button"
data-module="govuk-button" data-module="govuk-button"
onClick={() => { onClick={() => {
setRepresentationSubmitConfirmation( // setRepresentationSubmitConfirmation(
true // true
); // );
setRepresentationSubmit(true); setRepresentationSubmit(true);
}} }}
> >
@@ -17,6 +17,12 @@ import RepresentationProgress_s78 from "./representationProgress/representationP
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement"; import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78"; import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
import {
setRepresentationCapacity,
setRepresentationSubmit,
setFilesForRepresentations,
} from "../../../store/currentView/action";
let RepLPA = (props) => { let RepLPA = (props) => {
let { t } = useTranslation(); let { t } = useTranslation();
const router = useRouter(); const router = useRouter();
@@ -39,6 +45,7 @@ let RepLPA = (props) => {
updateRepresentation, updateRepresentation,
setSavingStatus, setSavingStatus,
savingStatus, savingStatus,
setFilesForRepresentations,
} = props; } = props;
const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
@@ -363,7 +370,9 @@ let RepLPA = (props) => {
].values.filesList) || ].values.filesList) ||
[] []
} }
setFilesForRepresentation={[]} setFilesForRepresentations={
setFilesForRepresentations
}
containerID={ containerID={
props.props.props.accountDetails props.props.props.accountDetails
.containerID .containerID
@@ -583,6 +592,10 @@ RepLPA = connect((state) => {
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
updateField: (form, field, newValue) => updateField: (form, field, newValue) =>
dispatch(change(form, field, newValue)), dispatch(change(form, field, newValue)),
setFilesForRepresentations: (fileList) => {
dispatch(setFilesForRepresentations(fileList));
},
}); });
const mapStateToProps = (state, props) => { const mapStateToProps = (state, props) => {