updating form to show case ref

This commit is contained in:
robert.bond@test.gov.wales
2021-09-14 07:58:27 +01:00
parent 84f75c9db8
commit 1208848d82
3 changed files with 68 additions and 26 deletions
+15 -2
View File
@@ -36,6 +36,11 @@ export default function BuildField(props) {
props.props.props.appealType.caseReference
.ticketnumber
}
props={props}
ticketnumber={
props.props.props.appealType.caseReference
.ticketnumber
}
/>
);
break;
@@ -57,9 +62,17 @@ export default function BuildField(props) {
/>
);
break;
case "{ 4273EDBD-AC1D-40d3-9FB2-095C621B552D}":
case "{4273EDBD-AC1D-40d3-9FB2-095C621B552D}":
return (
<Textfield name={props.datafieldname} label={props.label} />
<Textfield
name={props.datafieldname}
label={props.label}
props={props}
ticketnumber={
props.props.props.appealType.caseReference
.ticketnumber
}
/>
);
break;
case "{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}":
+17 -6
View File
@@ -11,12 +11,22 @@ import { updateCase } from "../../actions";
let CompleteAppeal = (props) => {
// un comment to update incident with an appealtype id
// useEffect(() => {
// updateCase(
// props.appealType.caseReference.incidentid,
// props.appealType.appealTypeID
// );
// }, []);
useEffect(() => {
// updateCase(
// props.appealType.caseReference.incidentid,
// props.appealType.appealTypeID,
// props.form.appealform.values,
// pinswg_appealcasetype@OData.Community.Display.V1.Formatted
// );
console.log(props.appealType.caseReference.incidentid);
console.log(props.appealType.appealTypeID);
console.log(props.form);
console.log(
props.appealType.caseReference[
"pinswg_appealcasetype@OData.Community.Display.V1.Formatted"
]
);
}, []);
let { t } = useTranslation();
@@ -57,6 +67,7 @@ let CompleteAppeal = (props) => {
setCurrentSection(currentSection + 1);
};
console.log(JSON.stringify(props.props.form.appealForm.values, null, 2));
alert(JSON.stringify(props.props.form.appealForm.values, null, 2));
return (