file upload fix... limit to 210mb updates file list from storage account
This commit is contained in:
@@ -173,143 +173,124 @@ let BuildSection = (props) => {
|
||||
|
||||
setSavingStatus(useSaveStatus);
|
||||
|
||||
setShowCompletedUploadFiles(true);
|
||||
//not sure we need this here if it does it on drop of file
|
||||
//uploadAppealFiles(values);
|
||||
|
||||
uploadAppealFiles(values)
|
||||
.then((data) => {
|
||||
// console.log(
|
||||
// "\n////////////////////////\n appeal pdf payload",
|
||||
// values,
|
||||
// props.props.accountDetails.containerID,
|
||||
// props.appealType.caseReference.ticketnumber,
|
||||
// props.appealType,
|
||||
// "\n////////////////////////\n"
|
||||
// );
|
||||
// console.log(
|
||||
// "\n////////////////////////\n appeal pdf payload",
|
||||
// values,
|
||||
// props.props.accountDetails.containerID,
|
||||
// props.appealType.caseReference.ticketnumber,
|
||||
// props.appealType,
|
||||
// "\n////////////////////////\n"
|
||||
// );
|
||||
|
||||
// let pdfObj = values;
|
||||
// let pdfObj = values;
|
||||
|
||||
// Object.assign(pdfObj, {
|
||||
// "containerID": props.props.accountDetails.containerID,
|
||||
// "casefolderID": props.appealType.caseReference.ticketnumber,
|
||||
// });
|
||||
// Object.assign(pdfObj, {
|
||||
// "containerID": props.props.accountDetails.containerID,
|
||||
// "casefolderID": props.appealType.caseReference.ticketnumber,
|
||||
// });
|
||||
|
||||
// generateAppealPDF(
|
||||
// pdfObj,
|
||||
// props.props.accountDetails.containerID,
|
||||
// props.appealType.caseReference.ticketnumber,
|
||||
// router.query.appealtypes,
|
||||
// props.appealType.fileList
|
||||
// ),
|
||||
// generateAppealPDF(
|
||||
// pdfObj,
|
||||
// props.props.accountDetails.containerID,
|
||||
// props.appealType.caseReference.ticketnumber,
|
||||
// router.query.appealtypes,
|
||||
// props.appealType.fileList
|
||||
// ),
|
||||
|
||||
props.setNewAppealProgress(
|
||||
getProgressObj(
|
||||
formXML,
|
||||
titleList,
|
||||
mandatoryFieldsData,
|
||||
props
|
||||
)
|
||||
);
|
||||
props.setNewAppealProgress(
|
||||
getProgressObj(formXML, titleList, mandatoryFieldsData, props)
|
||||
);
|
||||
|
||||
let appTypeCollection = getFormCollectionByID(
|
||||
props.appealType.appealTypeID
|
||||
);
|
||||
let updateBindAppealTypeToIncident =
|
||||
appTypeCollection.NavigationProperty;
|
||||
let appTypeCollection = getFormCollectionByID(
|
||||
props.appealType.appealTypeID
|
||||
);
|
||||
let updateBindAppealTypeToIncident =
|
||||
appTypeCollection.NavigationProperty;
|
||||
|
||||
Object.assign(updateBody, {
|
||||
"pinswg_appealcasetype": props.appealType.appealTypeID,
|
||||
"pinswg_Appellant@odata.bind":
|
||||
"/contacts(" +
|
||||
props.props.accountDetails.loggedinUserId +
|
||||
")",
|
||||
"pinswg_name": props.appealType.caseReference.ticketnumber,
|
||||
[updateBindAppealTypeToIncident + "@odata.bind"]:
|
||||
"/incidents(" + incidentId + ")",
|
||||
});
|
||||
Object.assign(updateBody, {
|
||||
"pinswg_appealcasetype": props.appealType.appealTypeID,
|
||||
"pinswg_Appellant@odata.bind":
|
||||
"/contacts(" + props.props.accountDetails.loggedinUserId + ")",
|
||||
"pinswg_name": props.appealType.caseReference.ticketnumber,
|
||||
[updateBindAppealTypeToIncident + "@odata.bind"]:
|
||||
"/incidents(" + incidentId + ")",
|
||||
});
|
||||
|
||||
updateBody = JSON.stringify(updateBody);
|
||||
updateBody = updateBody.replace(/:"Yes"/gm, `:true`);
|
||||
updateBody = updateBody.replace(/:"No"/gm, `:false`);
|
||||
updateBody = JSON.parse(updateBody);
|
||||
updateBody = JSON.stringify(updateBody);
|
||||
updateBody = updateBody.replace(/:"Yes"/gm, `:true`);
|
||||
updateBody = updateBody.replace(/:"No"/gm, `:false`);
|
||||
updateBody = JSON.parse(updateBody);
|
||||
|
||||
Object.keys(updateBody).forEach((key) => {
|
||||
if (updateBody[key] === null) {
|
||||
delete updateBody[key];
|
||||
}
|
||||
if (key.indexOf("_") == 0) {
|
||||
delete updateBody[key];
|
||||
}
|
||||
});
|
||||
Object.keys(updateBody).forEach((key) => {
|
||||
if (updateBody[key] === null) {
|
||||
delete updateBody[key];
|
||||
}
|
||||
if (key.indexOf("_") == 0) {
|
||||
delete updateBody[key];
|
||||
}
|
||||
});
|
||||
|
||||
//console.log(updateBody);
|
||||
//console.log(updateBody);
|
||||
|
||||
let updateFormCollection =
|
||||
appTypeCollection.LogicalCollectionName;
|
||||
let primaryAttribute = appTypeCollection.PrimaryIdAttribute;
|
||||
let updateFormCollection = appTypeCollection.LogicalCollectionName;
|
||||
let primaryAttribute = appTypeCollection.PrimaryIdAttribute;
|
||||
|
||||
const reference = "PEDW-PARTIAL";
|
||||
const templateId = "021b0a7b-df00-41f1-b94e-c269bee98c75";
|
||||
const templateIdCY = "f3c4a56b-bfb8-4d39-97dd-888df3062b0a";
|
||||
const emailAddress =
|
||||
props.props.accountDetails.loggedinUserEmail;
|
||||
const personalisation = {
|
||||
"caseReference":
|
||||
props.appealType.caseReference.ticketnumber,
|
||||
"emailAddress":
|
||||
props.props.accountDetails.loggedinUserEmail,
|
||||
"returnLink":
|
||||
props.props.url +
|
||||
(router.locale != "en"
|
||||
? "/cy/fymhorth/"
|
||||
: "/myportal/") +
|
||||
appTypeCollection.UrlName +
|
||||
"?lpa=" +
|
||||
props.appealType.appealLPA +
|
||||
"&apt=" +
|
||||
appTypeCollection.appealTypeID +
|
||||
"&casereference=" +
|
||||
props.appealType.caseReference.ticketnumber +
|
||||
"&inid=" +
|
||||
props.appealType.caseReference.incidentid,
|
||||
"linkExpiry": 10 * 60,
|
||||
};
|
||||
const reference = "PEDW-PARTIAL";
|
||||
const templateId = "021b0a7b-df00-41f1-b94e-c269bee98c75";
|
||||
const templateIdCY = "f3c4a56b-bfb8-4d39-97dd-888df3062b0a";
|
||||
const emailAddress = props.props.accountDetails.loggedinUserEmail;
|
||||
const personalisation = {
|
||||
"caseReference": props.appealType.caseReference.ticketnumber,
|
||||
"emailAddress": props.props.accountDetails.loggedinUserEmail,
|
||||
"returnLink":
|
||||
props.props.url +
|
||||
(router.locale != "en" ? "/cy/fymhorth/" : "/myportal/") +
|
||||
appTypeCollection.UrlName +
|
||||
"?lpa=" +
|
||||
props.appealType.appealLPA +
|
||||
"&apt=" +
|
||||
appTypeCollection.appealTypeID +
|
||||
"&casereference=" +
|
||||
props.appealType.caseReference.ticketnumber +
|
||||
"&inid=" +
|
||||
props.appealType.caseReference.incidentid,
|
||||
"linkExpiry": 10 * 60,
|
||||
};
|
||||
|
||||
// console.log(
|
||||
// "/////////////////////////////////",
|
||||
// "returnLink:",
|
||||
// props.props.url +
|
||||
// (router.locale != "en" ? "/cy/fymhorth/" : "/myportal/") +
|
||||
// appTypeCollection.UrlName +
|
||||
// "?lpa=" +
|
||||
// props.appealType.appealLPA +
|
||||
// "&apt=" +
|
||||
// appTypeCollection.appealTypeID +
|
||||
// "&casereference=" +
|
||||
// props.appealType.caseReference.ticketnumber +
|
||||
// "&inid=" +
|
||||
// props.appealType.caseReference.incidentid,
|
||||
// "/////////////////////////////////"
|
||||
// );
|
||||
})
|
||||
.then(() => {
|
||||
sendSavedEmail == true &&
|
||||
sendEmail(
|
||||
router.locale != "en" ? templateIdCY : templateId,
|
||||
emailAddress,
|
||||
personalisation,
|
||||
reference
|
||||
);
|
||||
// console.log(
|
||||
// "/////////////////////////////////",
|
||||
// "returnLink:",
|
||||
// props.props.url +
|
||||
// (router.locale != "en" ? "/cy/fymhorth/" : "/myportal/") +
|
||||
// appTypeCollection.UrlName +
|
||||
// "?lpa=" +
|
||||
// props.appealType.appealLPA +
|
||||
// "&apt=" +
|
||||
// appTypeCollection.appealTypeID +
|
||||
// "&casereference=" +
|
||||
// props.appealType.caseReference.ticketnumber +
|
||||
// "&inid=" +
|
||||
// props.appealType.caseReference.incidentid,
|
||||
// "/////////////////////////////////"
|
||||
// );
|
||||
|
||||
useSaveStatus &&
|
||||
router.replace(
|
||||
router.locale != "en"
|
||||
? "/" + router.locale + "/myportal"
|
||||
: "/myportal"
|
||||
);
|
||||
})
|
||||
.then(() => {
|
||||
setCompletedUploadFiles(true);
|
||||
});
|
||||
sendSavedEmail == true &&
|
||||
sendEmail(
|
||||
router.locale != "en" ? templateIdCY : templateId,
|
||||
emailAddress,
|
||||
personalisation,
|
||||
reference
|
||||
);
|
||||
|
||||
useSaveStatus &&
|
||||
router.replace(
|
||||
router.locale != "en"
|
||||
? "/" + router.locale + "/myportal"
|
||||
: "/myportal"
|
||||
);
|
||||
};
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
@@ -617,7 +598,7 @@ let BuildSection = (props) => {
|
||||
"_pinswg_appellant_value"
|
||||
];
|
||||
|
||||
console.log("on save:", valuesObj);
|
||||
//console.log("on save:", valuesObj);
|
||||
updateCaseProgress(
|
||||
valuesObj,
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user