passing a ref api through form and update progress
This commit is contained in:
+19
-3
@@ -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);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user