new appeals change involvment to appellant
This commit is contained in:
+6
-2
@@ -1081,8 +1081,11 @@ export const updatePassword = (contactId, newpassword) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateAccount = async (contactId, updateBody) => {
|
export const updateAccount = async (contactId, updateBody, ssr) => {
|
||||||
var queryUrl = "/api/endpoint/updateaccount_api?contactId=" + contactId;
|
var queryUrl =
|
||||||
|
(ssr ? BASE_URL : "") +
|
||||||
|
"/api/endpoint/updateaccount_api?contactId=" +
|
||||||
|
contactId;
|
||||||
var data = updateBody;
|
var data = updateBody;
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -1095,6 +1098,7 @@ export const updateAccount = async (contactId, updateBody) => {
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
//console.log("this error:", error);
|
//console.log("this error:", error);
|
||||||
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ const TopThree = (props) => {
|
|||||||
<div>
|
<div>
|
||||||
{showTopThreeArr[key].pinswg_appellantagent !=
|
{showTopThreeArr[key].pinswg_appellantagent !=
|
||||||
846040000 && (
|
846040000 && (
|
||||||
<b>{t("myportal:raised-by-label")}</b>
|
<b>{t("myportal:raised-by-label")}: </b>
|
||||||
)}
|
)}
|
||||||
{showTopThreeArr[key].pinswg_appellantagent !=
|
{showTopThreeArr[key].pinswg_appellantagent !=
|
||||||
846040000 &&
|
846040000 &&
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath, updateAccount } from "../../../actions";
|
||||||
import {
|
import {
|
||||||
createCaseCompleteMessage,
|
createCaseCompleteMessage,
|
||||||
getProgressBlobs,
|
getProgressBlobs,
|
||||||
downloadProgressFile,
|
downloadProgressFile,
|
||||||
createBlob,
|
createBlob,
|
||||||
|
getCaseBlob,
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -34,9 +35,15 @@ ApiProxy.get(async (req, res) => {
|
|||||||
return downloadProgressFile(containerName, data.path, tempCaseRef);
|
return downloadProgressFile(containerName, data.path, tempCaseRef);
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(blobProgress, {
|
const caseObj = await downloadProgressFile(
|
||||||
"appealComplete": tempCaseRef,
|
containerName,
|
||||||
});
|
tempCaseRef + "/" + tempCaseRef + "_case.json",
|
||||||
|
tempCaseRef
|
||||||
|
);
|
||||||
|
|
||||||
|
// Object.assign(blobProgress, {
|
||||||
|
// "appealComplete": tempCaseRef,
|
||||||
|
// });
|
||||||
|
|
||||||
delete blobProgress["pinswg_name"];
|
delete blobProgress["pinswg_name"];
|
||||||
|
|
||||||
@@ -44,9 +51,31 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
await createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef)
|
await createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
createCaseCompleteMessage(containerName, tempCaseRef);
|
//update case.json with lpa ref and description
|
||||||
return res.status(200).json({
|
Object.assign(caseObj, {
|
||||||
status: "success",
|
"pinswg_lpareference":
|
||||||
|
blobProgress.pinswg_lpaapplicationreference,
|
||||||
|
"description": blobProgress.pinswg_developmentdescription,
|
||||||
|
});
|
||||||
|
|
||||||
|
//send update case.json and then create queue message
|
||||||
|
getCaseBlob(containerName, tempCaseRef, caseObj).then(() => {
|
||||||
|
let contactId = caseObj["customerid_contact@odata.bind"];
|
||||||
|
contactId = contactId.match(/\(([^)]+)\)/);
|
||||||
|
updateAccount(
|
||||||
|
contactId[1],
|
||||||
|
{
|
||||||
|
"pinswg_typeofinvolvement": 846040001,
|
||||||
|
},
|
||||||
|
true
|
||||||
|
).then((data) => {
|
||||||
|
console.log("uopdated account: ", data);
|
||||||
|
});
|
||||||
|
|
||||||
|
createCaseCompleteMessage(containerName, tempCaseRef);
|
||||||
|
return res.status(200).json({
|
||||||
|
status: "success",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user