From 4f101180208f5f2ab54b7420a341cbc21253c5dc Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 23 May 2024 09:44:01 +0100 Subject: [PATCH] partial save on questionnaire --- components/case/representation/index.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 97d23ad5..ba15bca5 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -594,6 +594,7 @@ let MakeRepresentation = (props) => { "returnLink": "", "linkExpiry": 10 * 60, }; + props.currentView.representationSubmit == "true" ? (sendSavedEmail == true && sendEmail( @@ -608,8 +609,8 @@ let MakeRepresentation = (props) => { ? router.locale + "/myportal" : "/myportal" )) - : useSaveStatus && - (values.hasOwnProperty("representationDocuments") && + : useSaveStatus + ? (values.hasOwnProperty("representationDocuments") && (values.representationDocuments.map((Blob) => buildFileArray.push({ "name": Blob.name, @@ -629,6 +630,22 @@ let MakeRepresentation = (props) => { router.locale != "en" ? router.locale + "/myportal" : "/myportal" + )) + : (values.hasOwnProperty("representationDocuments") && + (values.representationDocuments.map((Blob) => + buildFileArray.push({ + "name": Blob.name, + "size": Blob.size, + }) + ), + Object.assign(values, { + "filesList": buildFileArray, + })), + uploadRepresentationFiles(values), + generateRepPDF( + values, + props.props.accountDetails.containerID, + currentView.caseReference.currentReference )); };