Mike Phares b943a882cb Infineon.EAF.Runtime 2.52.0
Infineon.EAF.Runtime 2.49.3
IDescription.GetDescriptions with body
2023-10-07 10:56:15 -07:00

36 lines
1.5 KiB
JavaScript

function compareFunction(a, b) {
return a['Priority'][0] - b['Priority'][0] || a['Req '].length - b['Req '].length || a['Req '] - b['Req '];
}
function initIndex(url) {
$.getJSON(url, function (data) {
for (var i = data.length - 1; i > -1; i--) {
if (data[i].Submitted !== '')
continue;
data.splice(i, 1);
}
data.sort(compareFunction);
$("#HeaderGrid").igGrid({
autoGenerateColumns: false,
dataSource: data,
height: "100%",
width: "100%",
columns: [
{ key: "Req", dataType: "number" },
{ key: "Submitted", dataType: "date", format: "date" },
{ key: "Requestor", dataType: "string" },
{ key: "Assigned To", dataType: "string" },
{ key: "Second Resource", dataType: "string" },
{ key: "Subject - from Requestor", dataType: "string" },
{ key: "System(s)", dataType: "string" },
{ key: "Priority", dataType: "string" },
],
features: [
{ name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 25, pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page", showPageSizeDropDown: false },
{ name: "Selection", mode: "row", multipleSelection: false },
{ name: "Filtering", type: "local" },
{ name: "Sorting", type: "local" },
],
});
});
}