refactor phase 3a components chunk 1 targeted actions imports
This commit is contained in:
@@ -5,12 +5,13 @@ import { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||
|
||||
import { consoleLogger, createNewCaseBlob } from "../../actions";
|
||||
import { consoleLogger } from "../../actions/core/logger";
|
||||
import { createNewCaseBlob } from "../../actions/services/caseService";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
setAppealLPA,
|
||||
setAppealTypeID,
|
||||
setAppealTypeTitle,
|
||||
setAppealTypeTitle
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID } from "../utils";
|
||||
import Aboutyou from "./aboutyou";
|
||||
@@ -21,7 +22,7 @@ const RenderLPAList = ({
|
||||
optionsObj,
|
||||
meta: { touched, error },
|
||||
label,
|
||||
errorMsg,
|
||||
errorMsg
|
||||
}) => {
|
||||
let { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
@@ -71,7 +72,7 @@ const RenderLPAList = ({
|
||||
optionsObj[key].name +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].name}
|
||||
</option>
|
||||
@@ -90,7 +91,7 @@ const RenderAppealTypeList = ({
|
||||
optionsObj,
|
||||
meta: { touched, error },
|
||||
label,
|
||||
errorMsg,
|
||||
errorMsg
|
||||
}) => {
|
||||
let { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
@@ -133,31 +134,35 @@ const RenderAppealTypeList = ({
|
||||
_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.attributevalue
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.attributevalue
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key].value)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key].value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
})
|
||||
: optionsObj[key].value}
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].value}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -255,7 +260,7 @@ const RenderRadio = ({
|
||||
{
|
||||
["documentCheckList_" +
|
||||
id]:
|
||||
custom.requiredDocumentLabel,
|
||||
custom.requiredDocumentLabel
|
||||
}
|
||||
))
|
||||
: delete docListObj[
|
||||
@@ -289,7 +294,7 @@ function Radiofield(props) {
|
||||
form,
|
||||
formProps,
|
||||
parentFieldShowOnValue,
|
||||
validation,
|
||||
validation
|
||||
} = props;
|
||||
let { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
@@ -401,9 +406,9 @@ let CreateCase = (props) => {
|
||||
values.appealTypes == "846040004" && values.confirmHASCAS == "true"
|
||||
? "846040004"
|
||||
: values.appealTypes == "846040004" &&
|
||||
values.confirmHASCAS == "false"
|
||||
? "846040000"
|
||||
: values.appealTypes;
|
||||
values.confirmHASCAS == "false"
|
||||
? "846040000"
|
||||
: values.appealTypes;
|
||||
|
||||
var whichAppealType = whichAppealType;
|
||||
|
||||
@@ -570,7 +575,7 @@ const mapStateToProps = (state) => {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
appealType: state.appealType
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -587,7 +592,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
onChangeSelectLPA: (lpaId) => {
|
||||
dispatch(setAppealLPA(lpaId));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -599,6 +604,6 @@ export default connect(
|
||||
)(
|
||||
reduxForm({
|
||||
form: "caseForm",
|
||||
destroyOnUnmount: false,
|
||||
destroyOnUnmount: false
|
||||
})(CreateCase)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user