partial save on questionnaire

This commit is contained in:
2024-05-23 09:44:01 +01:00
parent 6282388021
commit 4f10118020
+19 -2
View File
@@ -594,6 +594,7 @@ let MakeRepresentation = (props) => {
"returnLink": "", "returnLink": "",
"linkExpiry": 10 * 60, "linkExpiry": 10 * 60,
}; };
props.currentView.representationSubmit == "true" props.currentView.representationSubmit == "true"
? (sendSavedEmail == true && ? (sendSavedEmail == true &&
sendEmail( sendEmail(
@@ -608,8 +609,8 @@ let MakeRepresentation = (props) => {
? router.locale + "/myportal" ? router.locale + "/myportal"
: "/myportal" : "/myportal"
)) ))
: useSaveStatus && : useSaveStatus
(values.hasOwnProperty("representationDocuments") && ? (values.hasOwnProperty("representationDocuments") &&
(values.representationDocuments.map((Blob) => (values.representationDocuments.map((Blob) =>
buildFileArray.push({ buildFileArray.push({
"name": Blob.name, "name": Blob.name,
@@ -629,6 +630,22 @@ let MakeRepresentation = (props) => {
router.locale != "en" router.locale != "en"
? router.locale + "/myportal" ? router.locale + "/myportal"
: "/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
)); ));
}; };