awaiting submissions from storage acc
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
setNewAppealProgress,
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID, getProgressObj } from "../utils";
|
||||
import { updateCase, patchCase, uploadFiles } from "../../actions";
|
||||
import { updateCase, patchCase, uploadFiles, sendEmail } from "../../actions";
|
||||
|
||||
import { FieldsTranslations } from "../elements";
|
||||
import jsonpath from "jsonpath";
|
||||
@@ -134,7 +134,7 @@ let BuildSection = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const updateCaseProgress = (values) => {
|
||||
const updateCaseProgress = (values, sendSavedEmail) => {
|
||||
let incidentId = props.appealType.caseReference.incidentid;
|
||||
let updateBody = values || {};
|
||||
|
||||
@@ -183,8 +183,28 @@ let BuildSection = (props) => {
|
||||
primaryAttribute,
|
||||
props.appealType.caseReference.ticketnumber
|
||||
);
|
||||
//console.log("patching////////");
|
||||
//patchCase(incidentId);
|
||||
|
||||
sendSavedEmail == true &&
|
||||
sendEmail(
|
||||
props.props.accountDetails.loggedinUserEmail,
|
||||
"Saved progress for appeal " +
|
||||
props.appealType.caseReference.ticketnumber,
|
||||
"Your saved appeal " +
|
||||
props.appealType.caseReference.ticketnumber,
|
||||
"You can resume your application at a later date <a href='" +
|
||||
props.props.url +
|
||||
"/myportal/" +
|
||||
appTypeCollection.UrlName +
|
||||
"?lpa=" +
|
||||
props.appealType.appealLPA +
|
||||
"&apt=" +
|
||||
appTypeCollection.appealTypeID +
|
||||
"&casereference=" +
|
||||
props.appealType.caseReference.ticketnumber +
|
||||
"&inid=" +
|
||||
props.appealType.caseReference.incidentid +
|
||||
"'> from here </a>"
|
||||
);
|
||||
};
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
@@ -193,7 +213,7 @@ let BuildSection = (props) => {
|
||||
|
||||
delete valuesObj["_pinswg_appellant_value"];
|
||||
console.log("has errors:", props.invalid);
|
||||
props.invalid == false && updateCaseProgress(valuesObj);
|
||||
props.invalid == false && updateCaseProgress(valuesObj, false);
|
||||
|
||||
setCurrentSection(currentSection + 1);
|
||||
};
|
||||
@@ -309,7 +329,7 @@ let BuildSection = (props) => {
|
||||
delete valuesObj["_pinswg_appellant_value"];
|
||||
|
||||
//console.log("on save:", valuesObj);
|
||||
updateCaseProgress(valuesObj);
|
||||
updateCaseProgress(valuesObj, false);
|
||||
}}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
@@ -373,7 +393,7 @@ let BuildSection = (props) => {
|
||||
delete valuesObj["_pinswg_appellant_value"];
|
||||
|
||||
console.log("on save:", valuesObj);
|
||||
updateCaseProgress(valuesObj);
|
||||
updateCaseProgress(valuesObj, true);
|
||||
router.replace(
|
||||
router.locale != "en"
|
||||
? router.locale + "/myportal"
|
||||
|
||||
Reference in New Issue
Block a user