passing a ref api through form and update progress

This commit is contained in:
2021-07-20 16:46:14 +01:00
parent ff9f2d87c9
commit 1e81f1c97e
13 changed files with 455 additions and 29 deletions
+19 -3
View File
@@ -196,10 +196,27 @@ export const getLPA = () => {
});
};
function makeid(length) {
var result = "";
var characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(
Math.floor(Math.random() * charactersLength)
);
}
return result;
}
export const createCase = (lpaType, appealType) => {
console.log();
return "CAS-00010-CK1N3S";
const lastPart = makeid(6);
const middlePart = Math.floor(100000 + Math.random() * 900000);
return "CAS-" + middlePart + "-" + lastPart.toUpperCase();
};
// var req = new XMLHttpRequest();
@@ -235,7 +252,6 @@ export const createCase = (lpaType, appealType) => {
// };
// req.send();
// //jquery version to get case number from an lpa and an appeal type
// var entity = {};
// entity.caseorigincode = 3;
@@ -265,4 +281,4 @@ export const createCase = (lpaType, appealType) => {
// error: function(xhr, textStatus, errorThrown) {
// Xrm.Utility.alertDialog(textStatus + " " + errorThrown);
// }
// });
// });