@@ -1,8 +1,36 @@
|
||||
/*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: alg_locatie.js
|
||||
|
||||
Description: Sample console for Facilitor Desire Stage 1. It's gonna be big!
|
||||
|
||||
|
||||
*/
|
||||
|
||||
var targets = {},
|
||||
models = {},
|
||||
day_in_ms = 86400000,
|
||||
language = "EN",
|
||||
windowObjectReference;
|
||||
|
||||
|
||||
/* Configuration parameters, eventually to be defined elsewhere */
|
||||
const api_locations_filter = "";
|
||||
const api_buildings_filter = "&buildingfunction=^81"; // exclude de Vervallen gebouwen
|
||||
const api_disciplinetypes_filter = "";
|
||||
const api_issuedisciplines_filter = "";
|
||||
const api_issuetypes_filter = "";
|
||||
const api_contracts_filter = "";
|
||||
const api_floors_filter = "";
|
||||
const api_issues_filter = "&issuetype=^2801"; // exclude de Tolkdiensten
|
||||
const api_orders_filter = "";
|
||||
const api_reportsx_filter = "&id=2246";
|
||||
const api_reports_filter = "&melding_gebouwcode=ALKW2&scf_pivot=1";
|
||||
|
||||
|
||||
/* System constants */
|
||||
var lcl = {
|
||||
NL: {
|
||||
"sProcessing": "Bezig...",
|
||||
@@ -798,27 +826,27 @@ $(function() {
|
||||
api2({
|
||||
url: "locations",
|
||||
target: "list_locations",
|
||||
filter: "?limit=1000&scope=fo"
|
||||
filter: "?limit=1000&scope=fo"+api_locations_filter
|
||||
});
|
||||
api2({
|
||||
url: "buildings",
|
||||
target: "list_buildings",
|
||||
filter: "?limit=1000&scope=fo"
|
||||
filter: "?limit=1000&scope=fo"+api_buildings_filter
|
||||
});
|
||||
api2({
|
||||
url: "disciplinetypes",
|
||||
target: "filter_disciplinetypes",
|
||||
filter: "?limit=1000&scope=fo"
|
||||
filter: "?limit=1000&scope=fo"+api_disciplinetypes_filter
|
||||
});
|
||||
api2({
|
||||
url: "issuedisciplines",
|
||||
target: "filter_issuedisciplines",
|
||||
filter: "?limit=1000&scope=fo"
|
||||
filter: "?limit=1000&scope=fo"+api_issuedisciplines_filter
|
||||
});
|
||||
api2({
|
||||
url: "issuetypes",
|
||||
target: "filter_issuetypes",
|
||||
filter: "?limit=1000&scope=fo"
|
||||
filter: "?limit=1000&scope=fo"+api_issuetypes_filter
|
||||
});
|
||||
}
|
||||
}),
|
||||
@@ -872,7 +900,7 @@ $(function() {
|
||||
api2({
|
||||
url: "contracts",
|
||||
target: "list_contracts",
|
||||
filter: "?scope=fo&location=" + $this_tr.attr("recid")
|
||||
filter: "?scope=fo&location=" + $this_tr.attr("recid")+api_contracts_filter
|
||||
});
|
||||
// redraw list_buildings table and select first row in case there is only 1 result
|
||||
redrawTable({ target: "list_buildings" });
|
||||
@@ -1045,7 +1073,7 @@ $(function() {
|
||||
api2({
|
||||
url: "floors",
|
||||
target: "filter_floors",
|
||||
filter: "?scope=fo&building=" + $this_tr.attr("recid")
|
||||
filter: "?scope=fo&building=" + $this_tr.attr("recid")+api_floors_filter
|
||||
});
|
||||
api2({
|
||||
url: "buildings",
|
||||
@@ -1056,7 +1084,7 @@ $(function() {
|
||||
api2({
|
||||
url: "issues",
|
||||
target: "list_issues",
|
||||
filter: "?limit=1000&scope=fo&building=" + $this_tr.attr("recid")
|
||||
filter: "?limit=1000&scope=fo&building=" + $this_tr.attr("recid")+api_issues_filter
|
||||
});
|
||||
},
|
||||
ready: function(obj) {
|
||||
@@ -1324,7 +1352,7 @@ $(function() {
|
||||
api2({
|
||||
url: "reports",
|
||||
target: "report",
|
||||
filter: "?melding_gebouwcode=ALKW2&scf_pivot=1&usrrap_key=" + self.data.id,
|
||||
filter: "?usrrap_key=" + self.data.id + api_reports_filter,
|
||||
});
|
||||
}
|
||||
}),
|
||||
@@ -1345,18 +1373,18 @@ $(function() {
|
||||
ready: function(obj) {
|
||||
var self = this,
|
||||
background_colors = [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(220,20,60, 0.2)',
|
||||
'rgba(75, 192, 192, 0.2)',
|
||||
'rgba(153, 102, 255, 0.2)',
|
||||
'rgba(95,158,160, 0.2)',
|
||||
'rgba(148,0,211, 0.2)',
|
||||
'rgba(192,192,192, 0.2)',
|
||||
'rgba(128,128,0, 0.2)',
|
||||
'rgba(139,0,0, 0.2)',
|
||||
'rgba(50,205,50, 0.2)',
|
||||
'rgba(255, 159, 64, 0.2)'
|
||||
'rgba(255, 99, 132, 0.5)',
|
||||
'rgba(54, 162, 235, 0.5)',
|
||||
'rgba(220,20,60, 0.5)',
|
||||
'rgba(75, 192, 192, 0.5)',
|
||||
'rgba(153, 102, 255, 0.5)',
|
||||
'rgba(95,158,160, 0.5)',
|
||||
'rgba(148,0,211, 0.5)',
|
||||
'rgba(192,192,192, 0.5)',
|
||||
'rgba(128,128,0, 0.5)',
|
||||
'rgba(139,0,0, 0.5)',
|
||||
'rgba(50,205,50, 0.5)',
|
||||
'rgba(255, 159, 64, 0.5)'
|
||||
],
|
||||
background_colors_used = obj.data.Mld_v_udr_meldings.map(function(value, index) { return background_colors[index % 5]; }),
|
||||
border_colors = [
|
||||
@@ -1489,7 +1517,7 @@ $(function() {
|
||||
api2({
|
||||
url: "orders",
|
||||
target: "list_issue_orders",
|
||||
filter: "?scope=fo&status=1,2,3,4,5,6,7,8,9,10&issue=" + $this_tr.attr("recid")
|
||||
filter: "?scope=fo&status=1,2,3,4,5,6,7,8,9,10&issue=" + $this_tr.attr("recid")+api_orders_filter
|
||||
});
|
||||
},
|
||||
ready: function(obj) {
|
||||
@@ -1793,6 +1821,6 @@ $(function() {
|
||||
url: "reportsx",
|
||||
single: "report",
|
||||
target: "reportx",
|
||||
filter: "?id=2246"
|
||||
filter: "?1=1"+api_reportsx_filter
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user