rich text field and pdf create for appeal
This commit is contained in:
@@ -15,7 +15,13 @@ import {
|
||||
setNewAppealProgress,
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID, getProgressObj } from "../utils";
|
||||
import { updateCase, patchCase, uploadFiles, sendEmail } from "../../actions";
|
||||
import {
|
||||
updateCase,
|
||||
patchCase,
|
||||
uploadFiles,
|
||||
sendEmail,
|
||||
generateAppealPDF,
|
||||
} from "../../actions";
|
||||
|
||||
import { FieldsTranslations } from "../elements";
|
||||
import jsonpath from "jsonpath";
|
||||
@@ -132,13 +138,60 @@ let BuildSection = (props) => {
|
||||
) => {
|
||||
let incidentId = props.appealType.caseReference.incidentid;
|
||||
let updateBody = values || {};
|
||||
let buildAppealFilesArray = [];
|
||||
console.log("attached docs: - ", buildAppealFilesArray);
|
||||
|
||||
let filesUplaodObj = Object.keys(values)
|
||||
.filter(function (k) {
|
||||
return k.indexOf("pinswg_fileUpload") == 0;
|
||||
})
|
||||
.reduce(function (newData, k) {
|
||||
newData[k] = values[k];
|
||||
return newData;
|
||||
}, {});
|
||||
|
||||
console.log(filesUplaodObj);
|
||||
|
||||
for (let key in filesUplaodObj) {
|
||||
for (let j in filesUplaodObj[key]) {
|
||||
buildAppealFilesArray.push({
|
||||
"name": filesUplaodObj[key][j].name,
|
||||
"size": filesUplaodObj[key][j].size,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
console.log(buildAppealFilesArray);
|
||||
|
||||
Object.assign(values, { "filesList": buildAppealFilesArray });
|
||||
|
||||
setSavingStatus(useSaveStatus);
|
||||
|
||||
uploadAppealFiles(values);
|
||||
props.setNewAppealProgress(
|
||||
getProgressObj(formXML, titleList, mandatoryFieldsData, props)
|
||||
console.log(
|
||||
"\n////////////////////////\n appeal pdf payload",
|
||||
values,
|
||||
props.props.accountDetails.containerID,
|
||||
props.appealType.caseReference.ticketnumber,
|
||||
"\n////////////////////////\n"
|
||||
);
|
||||
|
||||
let pdfObj = values;
|
||||
|
||||
Object.assign(pdfObj, {
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"casefolderID": props.appealType.caseReference.ticketnumber,
|
||||
});
|
||||
|
||||
generateAppealPDF(
|
||||
pdfObj,
|
||||
props.props.accountDetails.containerID,
|
||||
props.appealType.caseReference.ticketnumber
|
||||
),
|
||||
props.setNewAppealProgress(
|
||||
getProgressObj(formXML, titleList, mandatoryFieldsData, props)
|
||||
);
|
||||
|
||||
let appTypeCollection = getFormCollectionByID(
|
||||
props.appealType.appealTypeID
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user