Merged PR 2240: refactor(newappeal): simplify nested prop boundaries (Slice 7)

refactor(newappeal): simplify nested prop boundaries (Slice 7)

Related work items: #22588
This commit is contained in:
Robert Bond
2026-04-13 12:25:45 +00:00
parent 783786b9eb
commit ffcccf8981
7 changed files with 98 additions and 80 deletions
+13 -8
View File
@@ -55,6 +55,11 @@ let BuildCheckSection = (props) => {
docsOffline
} = props;
const legacyProps = props.props;
const legacyAppealType = legacyProps.appealType;
const legacyFormState = legacyProps.form;
const legacyAccountDetails = legacyProps.accountDetails;
const parser = new DOMParser();
var doc = parser.parseFromString(props.formXML, "text/xml");
var titles = xpath.select(
@@ -89,7 +94,7 @@ let BuildCheckSection = (props) => {
let buildAppealFilesArray = [];
//console.log("attached docs: - ", buildAppealFilesArray);
buildAppealFilesArray = props.props.appealType.fileList?.value[0] || [];
buildAppealFilesArray = legacyAppealType.fileList?.value[0] || [];
//let filesUploadObj = buildAppealFilesArray;
// let filesUploadObj = props.appealType.fileList.hasOwnProperty("value")
// ? props.appealType.fileList.value[0]
@@ -113,13 +118,13 @@ let BuildCheckSection = (props) => {
"name"
);
let pdfObj = props.props.form.appealForm.values;
let pdfObj = legacyFormState.appealForm.values;
pdfObj = updateLinks(pdfObj);
Object.assign(pdfObj, {
"filesList": buildAppealFilesArray,
"containerID": props.props.accountDetails.containerID,
"containerID": legacyAccountDetails.containerID,
"casefolderID": props.appealType.caseReference.ticketnumber
});
@@ -162,7 +167,7 @@ let BuildCheckSection = (props) => {
? (setFinaliseAppealProcess(true),
await generateAppealPDFEffect(
pdfObj,
props.props.accountDetails.containerID,
legacyAccountDetails.containerID,
props.appealType.caseReference.ticketnumber,
router.query.appealtypes,
pdfObj.filesList
@@ -171,9 +176,9 @@ let BuildCheckSection = (props) => {
.then((data) => {
console.log("have generated pdf:", data);
sendCaseCompleteMessageEffect(
props.props.accountDetails.containerID,
legacyAccountDetails.containerID,
props.appealType.caseReference.ticketnumber,
props.props.accountDetails.accountDetails
legacyAccountDetails.accountDetails
.pinswg_typeofinvolvement
);
})
@@ -202,8 +207,8 @@ let BuildCheckSection = (props) => {
const containerID =
props.accountDetails?.containerID ||
props.props?.accountDetails?.containerID ||
props.props?.props?.accountDetails?.containerID;
legacyProps?.accountDetails?.containerID ||
legacyProps?.props?.accountDetails?.containerID;
const caseRef =
props?.currentView?.caseReference?.ticketnumber ||
props?.appealType?.caseReference?.ticketnumber;