This commit is contained in:
2020-06-18 00:00:19 +00:00
parent 1daa40a804
commit e5858bebd1
4 changed files with 327 additions and 314 deletions

View File

@@ -64,18 +64,28 @@ app.ravLicense = (function () {
});
var submitData = app.utilB.objectifyFormDataArray(formData);
//do features separately, above can't deal with multi select and we need to add schedtechs anyway
let features = [];
features.push({
Feature: "ServiceTechs",
Count: Number($("#techcount").val())
});
let options = $("#options").val();
//clean up the data before submit
debugger;
for (let i = 0; i < options.length; i++) {
features.push({ Feature: options[i], Count: 0 });
}
submitData["features"]=features;
//submit
// alert("STUB submit");
// alert("STUB submit");
app.api.createRavLicense(submitData, function (res) {
if (res.error) {
$.gevent.publish('app-show-error', res.msg);
} else {
$('#key').val(res);
return false;
}
if (res.error) {
$.gevent.publish("app-show-error", res.msg);
} else {
$("#key").val(res);
return false;
}
});
return false; //prevent default