create incident record in new appeal
This commit is contained in:
@@ -374,12 +374,7 @@ const RenderPickList = ({
|
||||
<option>Select...</option>
|
||||
{Object.keys(dropdownObj).map((key, index) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
dropdownObj[key].Label.LocalizedLabels[0].Label
|
||||
}
|
||||
>
|
||||
<option key={key} value={dropdownObj[key].Value}>
|
||||
{dropdownObj[key].Label.LocalizedLabels[0].Label}
|
||||
</option>
|
||||
);
|
||||
|
||||
@@ -32,7 +32,10 @@ export default function BuildField(props) {
|
||||
<ReadOnlyfield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
value={props.props.props.appealType.caseReference}
|
||||
value={
|
||||
props.props.props.appealType.caseReference
|
||||
.ticketnumber
|
||||
}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -144,7 +144,6 @@ let BuildSection = (props) => {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
|
||||
<BuildRow
|
||||
rowXML={rowXML}
|
||||
whichSection={props.whichSection}
|
||||
|
||||
@@ -7,11 +7,16 @@ import BuildRow from "./buildrow";
|
||||
import { reduxForm, formValueSelector } from "redux-form";
|
||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||
import { setCurrentSection } from "../../store/appealType/action";
|
||||
import { updateCase } from "../../actions";
|
||||
|
||||
let CompleteAppeal = (props) => {
|
||||
// un comment to update incident with an appealtype id
|
||||
// useEffect(() => {
|
||||
// window.scrollTo(0, 0);
|
||||
// });
|
||||
// updateCase(
|
||||
// props.appealType.caseReference.incidentid,
|
||||
// props.appealType.appealTypeID
|
||||
// );
|
||||
// }, []);
|
||||
|
||||
let { t } = useTranslation();
|
||||
|
||||
@@ -62,7 +67,9 @@ let CompleteAppeal = (props) => {
|
||||
<div className="govuk-panel__body">
|
||||
Your reference number
|
||||
<br />
|
||||
<strong>{props.appealType.caseReference}</strong>
|
||||
<strong>
|
||||
{props.appealType.caseReference.ticketnumber}
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ let CreateCase = (props) => {
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: jsonpath.query(props.LPAData.LPAData, "$..name");
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: props.LPAData.LPAData.value;
|
||||
|
||||
const RenderLPAList = ({
|
||||
name,
|
||||
@@ -94,9 +96,9 @@ let CreateCase = (props) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={optionsObj[key]}
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{optionsObj[key]}
|
||||
{optionsObj[key].name}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -167,7 +169,10 @@ let CreateCase = (props) => {
|
||||
.value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key].value
|
||||
: optionsObj[key]
|
||||
.attributevalue +
|
||||
"," +
|
||||
optionsObj[key].value
|
||||
.replace(
|
||||
/[\s\-\+\(\)\,]/g,
|
||||
""
|
||||
@@ -198,9 +203,18 @@ let CreateCase = (props) => {
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
event.preventDefault();
|
||||
router.replace("/newappeal/" + values.appealTypes, null, {
|
||||
shallow: true,
|
||||
});
|
||||
router.replace(
|
||||
"/newappeal/" +
|
||||
values.appealTypes.split(",")[1] +
|
||||
"?lpa=" +
|
||||
values.lpaTypes +
|
||||
"&apt=" +
|
||||
values.appealTypes.split(",")[0],
|
||||
null,
|
||||
{
|
||||
shallow: true,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -254,8 +268,8 @@ const mapDispatchToProps = (dispatch) => {
|
||||
);
|
||||
dispatch(setAppealTypeID(event.target.value));
|
||||
},
|
||||
onChangeSelectLPA: (event) => {
|
||||
dispatch(setAppealLPA(event.target.value));
|
||||
onChangeSelectLPA: (lpaId) => {
|
||||
dispatch(setAppealLPA(lpaId));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user