adjusted timetable to display correct dates
This commit is contained in:
@@ -3,7 +3,7 @@ import _ from "lodash";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, reduxForm, formValueSelector } from "redux-form";
|
||||
import { Field, reduxForm, formValueSelector, change } from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
@@ -339,7 +339,8 @@ let RepLPA = (props) => {
|
||||
"representationType",
|
||||
]) ||
|
||||
typeof props.representationType != "undefined") &&
|
||||
(props.representationType != "Questionnaire" ? (
|
||||
(props.representationType != "Questionnaire" &&
|
||||
props.representationType != "Select..." ? (
|
||||
<>
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:enter-comment-label")}
|
||||
@@ -480,10 +481,15 @@ let RepLPA = (props) => {
|
||||
<a
|
||||
onClick={() => {
|
||||
//setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationType",
|
||||
""
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:back-link")}
|
||||
{t("common:back-link")}ss
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
@@ -505,6 +511,11 @@ RepLPA = connect((state) => {
|
||||
};
|
||||
})(RepLPA);
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
});
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
let initialValuesTemp = Object.assign(
|
||||
state.currentView.caseReference.hasOwnProperty("repDetails")
|
||||
@@ -534,7 +545,10 @@ const mapStateToProps = (state, props) => {
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
form: "representationForm",
|
||||
enableReinitialize: true,
|
||||
|
||||
Reference in New Issue
Block a user