FSN#33833 Rapport mogelijkheden sturen via S("fac_usrrap_mode")
svn path=/Website/trunk/; revision=26462
This commit is contained in:
@@ -16,9 +16,9 @@
|
|||||||
<!-- #include file="./model_reportcolumns.inc" -->
|
<!-- #include file="./model_reportcolumns.inc" -->
|
||||||
<%
|
<%
|
||||||
|
|
||||||
function model_reportsx(usrrap_key, params)
|
function model_reportsx(usrrap_key, rapparams)
|
||||||
{
|
{
|
||||||
params = params || {};
|
rapparams = rapparams || {};
|
||||||
this.table = "fac_usrrap";
|
this.table = "fac_usrrap";
|
||||||
this.primary = "fac_usrrap_key";
|
this.primary = "fac_usrrap_key";
|
||||||
this.records_name = "reports";
|
this.records_name = "reports";
|
||||||
@@ -51,7 +51,7 @@ function model_reportsx(usrrap_key, params)
|
|||||||
filters: ["id", "name", "description"]
|
filters: ["id", "name", "description"]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.includes = {"columns": { model: new model_reportcolumns(usrrap_key, { internal: params.internal }),
|
this.includes = {"columns": { model: new model_reportcolumns(usrrap_key, { internal: rapparams.internal }),
|
||||||
joinfield: "fac_usrrap_key",
|
joinfield: "fac_usrrap_key",
|
||||||
single_only: true
|
single_only: true
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ function model_reportsx(usrrap_key, params)
|
|||||||
+ " WHERE w.prs_perslid_key = " + user_key
|
+ " WHERE w.prs_perslid_key = " + user_key
|
||||||
+ " ) OR fac_functie_key IS NULL)");
|
+ " ) OR fac_functie_key IS NULL)");
|
||||||
}
|
}
|
||||||
if (S("fac_usrrap_mode") != 1) // Als je niet mag clonen heb je niets aan UDR template rapporten
|
if (S("fac_usrrap_mode") != 1 || rapparams.forview) // Als je niet mag clonen heb je niets aan UDR template rapporten
|
||||||
{
|
{
|
||||||
query.wheres.push("BITAND(COALESCE(fac_usrrap_functie, 0), 32) = 0");
|
query.wheres.push("BITAND(COALESCE(fac_usrrap_functie, 0), 32) = 0");
|
||||||
}
|
}
|
||||||
@@ -206,7 +206,7 @@ function model_reportsx(usrrap_key, params)
|
|||||||
return { key: the_key, warning: "" };
|
return { key: the_key, warning: "" };
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!params.internal)
|
if (!rapparams.internal)
|
||||||
{
|
{
|
||||||
if (user.oslogin() == "_FACILITOR")
|
if (user.oslogin() == "_FACILITOR")
|
||||||
settings.overrule_setting("fac_usrrap_mode", 1); // _FACILITOR mag alles
|
settings.overrule_setting("fac_usrrap_mode", 1); // _FACILITOR mag alles
|
||||||
@@ -236,8 +236,8 @@ function model_reportsx(usrrap_key, params)
|
|||||||
|
|
||||||
if (usrrap_key > 0)
|
if (usrrap_key > 0)
|
||||||
{
|
{
|
||||||
params.filter = { "id" : usrrap_key };
|
rapparams.filter = { "id" : usrrap_key };
|
||||||
this.data = this.REST_GET(params)[0];
|
this.data = this.REST_GET(rapparams)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<!-- #include file="../api2/model_reportsx.inc" -->
|
<!-- #include file="../api2/model_reportsx.inc" -->
|
||||||
|
|
||||||
<%
|
<%
|
||||||
var reportsx = new model_reportsx();
|
var reportsx = new model_reportsx(-1, { forview: true });
|
||||||
reportsx.REST_POST = false; // geen toevoegen knop hier
|
reportsx.REST_POST = false; // geen toevoegen knop hier
|
||||||
reportsx.list.default_url = "appl/fac/fac_report.asp?usrrap_key=";
|
reportsx.list.default_url = "appl/fac/fac_report.asp?usrrap_key=";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user