if agent dont change to appellant on submit appeal

This commit is contained in:
2024-12-02 18:50:55 +00:00
parent 7c95f679ba
commit 499a1e9527
5 changed files with 31 additions and 16 deletions
@@ -16,6 +16,7 @@ ApiProxy.use(middleware);
ApiProxy.get(async (req, res) => {
var containerName = req.query.container;
var tempCaseRef = req.query.tempcaseref;
var typeofinvolvement = req.query.inv;
var checkHash = req.query.hash;
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
@@ -62,15 +63,25 @@ ApiProxy.get(async (req, res) => {
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);
});
if (typeofinvolvement != 846040000) {
updateAccount(
contactId[1],
{
"pinswg_typeofinvolvement": 846040001,
},
true
).then((data) => {
console.log(
"uopdated account : " +
contactId +
" \nfrom: " +
data.pinswg_typeofinvolvement +
"\nto: " +
typeofinvolvement
);
});
}
createCaseCompleteMessage(containerName, tempCaseRef);
return res.status(200).json({