FSN#39312 Verder ontsluiten van modellen via de API
svn path=/Website/trunk/; revision=32963
This commit is contained in:
@@ -37,7 +37,7 @@ var api2_mapper = {
|
||||
"contractproperties" : "appl/mgt/cnt_kenmerk.asp",
|
||||
"contractpropertytypes" : "appl/mgt/cnt_srtkenmerk.asp",
|
||||
"contractperiods" : "appl/mgt/cnt_termijn.asp",
|
||||
"taskcategories" : "appl/mgt/ctr_discipline.asp",
|
||||
"taskdisciplines" : "appl/mgt/ctr_discipline.asp",
|
||||
|
||||
"audits" : "appl/mgt/fac_audit.asp",
|
||||
"xxxxxx" : "appl/mgt/fac_edit_groeprechten.asp", //?
|
||||
@@ -65,12 +65,12 @@ var api2_mapper = {
|
||||
"xxxxxx" : "appl/mgt/generic_prs_perslid.asp",
|
||||
|
||||
"taskhandlings" : "appl/mgt/ins_controlemode.asp",
|
||||
"xxxxxx" : "appl/mgt/ins_discipline.asp",
|
||||
"objectdisciplines" : "appl/mgt/ins_discipline.asp",
|
||||
"objectproperties" : "appl/mgt/ins_kenmerk.asp",
|
||||
"xxxxxx" : "appl/mgt/ins_srtcontrole.asp",
|
||||
"xxxxxx" : "appl/mgt/ins_srtgroep.asp",
|
||||
"recurringtasks" : "appl/mgt/ins_srtcontrole.asp",
|
||||
"objectgroups" : "appl/mgt/ins_srtgroep.asp",
|
||||
"objectpropertytypes" : "appl/mgt/ins_srtkenmerk.asp",
|
||||
"xxxxxx" : "appl/mgt/ins_tab_discipline.asp",
|
||||
"alldisciplines" : "appl/mgt/ins_tab_discipline.asp",
|
||||
|
||||
"xxxxxx" : "appl/mgt/mgt_generic.asp",
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function model_bez_actie()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bez_actie_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
|
||||
@@ -26,7 +26,7 @@ function model_bgt_budget()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bgt_budget_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"hidden_fld": true,
|
||||
"required": true,
|
||||
|
||||
@@ -27,7 +27,7 @@ function model_bgt_kostenrubriek()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bgt_kostenrubriek_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"hidden_fld": true,
|
||||
"required": true,
|
||||
|
||||
@@ -29,7 +29,7 @@ function model_bgt_project()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bgt_project_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"hidden_fld": true,
|
||||
|
||||
@@ -26,7 +26,7 @@ function model_cnt_termijn()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "cnt_termijn_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
|
||||
@@ -14,27 +14,27 @@
|
||||
<%
|
||||
model_ctr_disc_params =
|
||||
{
|
||||
"records_name": "taskdisciplineparams",
|
||||
"record_name": "taskdisciplineparam",
|
||||
"table": "ctr_disc_params",
|
||||
"primary": "ctr_disc_params_key",
|
||||
"records_name": "ctr_disc_params",
|
||||
"record_name": "ctr_disc_params",
|
||||
"autfunction": "WEB_CTRMSU",
|
||||
|
||||
|
||||
"fields": {
|
||||
"id": {
|
||||
"dbs": "ctr_disc_params_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"seq": "bes_s_ctr_disc_params_key"
|
||||
},
|
||||
"ctr_ins_discipline_key": {
|
||||
"taskdiscipline": {
|
||||
"dbs": "ctr_ins_discipline_key",
|
||||
"label": "Foreign key",
|
||||
"typ": "key",
|
||||
"hidden_fld": true
|
||||
},
|
||||
"inspection_type": {
|
||||
"type": {
|
||||
"dbs": "ctr_disc_params_controle_type",
|
||||
"label": L("ctr_inspection_type"),
|
||||
"typ": "key",
|
||||
|
||||
@@ -36,8 +36,8 @@ function model_ctr_discipline(disc_key, params)
|
||||
|
||||
function _model_ctr_discipline()
|
||||
{
|
||||
this.records_name = "taskcategories";
|
||||
this.record_name = "taskcategory";
|
||||
this.records_name = "taskdisciplines";
|
||||
this.record_name = "taskdiscipline";
|
||||
this.table = "ins_tab_discipline";
|
||||
this.primary = "ins_discipline_key";
|
||||
this.autfunction = "WEB_CTRMGT";
|
||||
@@ -47,7 +47,7 @@ function _model_ctr_discipline()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "ins_discipline_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
@@ -71,7 +71,7 @@ function _model_ctr_discipline()
|
||||
/* Velden van CTR_DISC_PARAMS komen er dynamisch bij */
|
||||
this.disc_params = {
|
||||
model: model_ctr_disc_params,
|
||||
joinfield: "ctr_ins_discipline_key"
|
||||
joinfield: "taskdiscipline"
|
||||
};
|
||||
this.soft_delete = "ins_discipline_verwijder";
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ function fac_email_setting()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "fac_email_setting_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
|
||||
@@ -16,22 +16,26 @@
|
||||
|
||||
function model_fac_gebruikersgroep()
|
||||
{
|
||||
this.table = "fac_gebruikersgroep";
|
||||
this.primary = "fac_gebruikersgroep_key";
|
||||
this.records_name = "usergroup";
|
||||
this.record_name = "usergroups";
|
||||
this.table = "fac_gebruikersgroep";
|
||||
this.primary = "fac_gebruikersgroep_key";
|
||||
this.autfunction = "WEB_PRSMSU";
|
||||
this.record_title = L("fac_gebruikersgroep");
|
||||
this.records_title = L("fac_gebruikersgroep_m");
|
||||
|
||||
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "fac_gebruikersgroep_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"hidden_fld": true,
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "fac_s_fac_gebruikersgroep_key"
|
||||
},
|
||||
"fac_groep": {
|
||||
"authorizationgroup": {
|
||||
"dbs": "fac_groep_key",
|
||||
"label": L("fac_groep"),
|
||||
"typ": "key",
|
||||
@@ -56,16 +60,14 @@ function model_fac_gebruikersgroep()
|
||||
this.list = {
|
||||
"columns": [
|
||||
//"id",
|
||||
"fac_groep",
|
||||
"authorizationgroup",
|
||||
"user"
|
||||
]
|
||||
};
|
||||
this.edit = {
|
||||
modal: true
|
||||
};
|
||||
this.autfunction = "WEB_PRSMSU";
|
||||
this.record_title = L("fac_gebruikersgroep");
|
||||
this.records_title = L("fac_gebruikersgroep_m");
|
||||
|
||||
|
||||
// Lidmaatschap van groepen met PRSSYS, FACTAB en FACFAC mag je alleen
|
||||
// manipuleren als je zelf die rechten hebt
|
||||
|
||||
@@ -27,7 +27,7 @@ function model_fac_notificatiejob()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "fac_notificatie_job_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"hidden_fld": true,
|
||||
"required": true,
|
||||
|
||||
@@ -29,7 +29,7 @@ function model_fin_btwtabel()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "fin_btwtabel_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
@@ -52,9 +52,9 @@ function model_fin_btwtabel()
|
||||
|
||||
|
||||
this.includes = {
|
||||
"vat_values": {
|
||||
"vattablevalues": {
|
||||
"model": new model_fin_btwtabelwaarde(),
|
||||
"joinfield": "table"
|
||||
"joinfield": "vattable"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
function model_fin_btwtabelwaarde()
|
||||
{
|
||||
this.records_name = "vattablevalues";
|
||||
this.record_name = "vattablevalue";
|
||||
this.table = "fin_btwtabelwaarde";
|
||||
this.primary = "fin_btwtabelwaarde_key";
|
||||
this.records_name = "fin_btwtabelwaardes";
|
||||
this.record_name = "fin_btwtabelwaarde";
|
||||
this.soft_delete = "fin_btwtabelwaarde_verwijder";
|
||||
this.autfunction = "WEB_FINMSU";
|
||||
this.record_title = L("fin_btwtabelwaarde");
|
||||
@@ -28,13 +28,13 @@ function model_fin_btwtabelwaarde()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "fin_btwtabelwaarde_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "fin_s_fin_btwtabelwaarde_key"
|
||||
},
|
||||
"table": {
|
||||
"vattable": {
|
||||
"dbs": "fin_btwtabel_key",
|
||||
"label": L("fin_btwtabel"),
|
||||
"typ": "key",
|
||||
@@ -73,7 +73,7 @@ function model_fin_btwtabelwaarde()
|
||||
this.list = {
|
||||
"columns": [
|
||||
"id",
|
||||
"table",
|
||||
"vattable",
|
||||
"code",
|
||||
"name",
|
||||
"percentage",
|
||||
|
||||
@@ -28,7 +28,7 @@ function model_ins_controlemode()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "ins_controlemode_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
<%
|
||||
model_ins_disc_params =
|
||||
{
|
||||
"records_name": "objectdisciplineparams",
|
||||
"record_name": "objectdisciplineparam",
|
||||
"table": "ins_disc_params",
|
||||
"primary": "ins_disc_params_key",
|
||||
"records_name": "ins_disc_params",
|
||||
"record_name": "ins_disc_params",
|
||||
"autfunction": "WEB_INSMGT",
|
||||
|
||||
|
||||
"fields": {
|
||||
"id": {
|
||||
"dbs": "ins_disc_params_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"seq": "ins_s_ins_disc_params_key"
|
||||
},
|
||||
@@ -35,7 +35,7 @@ model_ins_disc_params =
|
||||
"LOV": L("ins_discipline_autonumLOV"),
|
||||
"emptyoption": null
|
||||
},
|
||||
"ins_discipline_key": {
|
||||
"objectdiscipline": {
|
||||
"dbs": "ins_discipline_key",
|
||||
"label": "Foreign key",
|
||||
"typ": "key",
|
||||
@@ -98,7 +98,7 @@ model_ins_disc_params =
|
||||
"mask": 16,
|
||||
"radios": [
|
||||
{
|
||||
"name": "label",
|
||||
"name": "labelx",
|
||||
"label": L("ins_discipline_label"),
|
||||
"mask": 16
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ function model_ins_discipline(disc_key, params)
|
||||
|
||||
_model_ins_discipline = // Internal only
|
||||
{
|
||||
"records_name": "objectdisciplines",
|
||||
"record_name": "objectdiscipline",
|
||||
"table": "ins_tab_discipline",
|
||||
"primary": "ins_discipline_key",
|
||||
"records_name": "ins_disciplines",
|
||||
"record_name": "ins_discipline",
|
||||
"soft_delete": "ins_discipline_verwijder",
|
||||
"autfunction": "WEB_INSMGT",
|
||||
"record_title": L("ins_discipline"),
|
||||
@@ -47,7 +47,7 @@ _model_ins_discipline = // Internal only
|
||||
"fields": {
|
||||
"id": {
|
||||
"dbs": "ins_discipline_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
@@ -60,29 +60,25 @@ _model_ins_discipline = // Internal only
|
||||
"translate": true,
|
||||
"required": true
|
||||
},
|
||||
"min_level": {
|
||||
"minimumlevel": {
|
||||
"dbs": "ins_discipline_min_level",
|
||||
"label": L("ins_discipline_minlevel"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"LOV": L("ins_discipline_minlevelLOV")
|
||||
},
|
||||
"chargetype": {
|
||||
"costtype": {
|
||||
"dbs": "prs_kostensoort_key",
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": {
|
||||
"tbl": "PRS_KOSTENSOORT",
|
||||
"key": "PRS_KOSTENSOORT_KEY",
|
||||
"desc": "PRS_KOSTENSOORT_OMS"
|
||||
},
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": ""
|
||||
}
|
||||
},
|
||||
/* Velden van INS_DISC_PARAMS komen er dynamisch bij */
|
||||
"disc_params": {
|
||||
"model": model_ins_disc_params,
|
||||
"joinfield": "ins_discipline_key"
|
||||
"joinfield": "objectdiscipline"
|
||||
}
|
||||
}
|
||||
%>
|
||||
@@ -83,7 +83,7 @@ function model_ins_kenmerk(fnparams)
|
||||
"desc": "ins_srtdeel_omschrijving"
|
||||
}
|
||||
},
|
||||
"objecthide": {
|
||||
"objectkey": {
|
||||
"dbs": "ins_srtinstallatie_key",
|
||||
"label": L("lcl_ins_object"),
|
||||
"typ": "key",
|
||||
@@ -222,13 +222,13 @@ function model_ins_kenmerk(fnparams)
|
||||
var gparams = { GET: { } };
|
||||
if (niveau == "C")
|
||||
{
|
||||
this.list.columns.splice(2, 0, "objecthide");
|
||||
this.list.columns.splice(2, 0, "objectkey");
|
||||
delete this.fields.objectdiscipline;
|
||||
delete this.fields.objectgroup;
|
||||
delete this.fields.objecttype;
|
||||
delete this.fields.editlevel;
|
||||
delete this.fields.measurement;
|
||||
this.fields.objecthide.label = L("ins_srtcontrole");
|
||||
this.fields.objectkey.label = L("ins_srtcontrole");
|
||||
this.record_title = L("ins_srtcontrole_kenmerk");
|
||||
this.records_title = L("ins_srtcontrole_kenmerk_m");
|
||||
gparams.GET = {wheres: [ "ins_kenmerk.ins_kenmerk_niveau = " + safe.quoted_sql(niveau)
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
<%
|
||||
function model_ins_srtcontrole()
|
||||
{
|
||||
this.records_name = "recurringtasks";
|
||||
this.record_name = "recurringtask";
|
||||
this.table = "ins_srtcontrole";
|
||||
this.primary = "ins_srtcontrole_key";
|
||||
this.records_name = "ins_srtcontroles";
|
||||
this.record_name = "ins_srtcontrole";
|
||||
this.autfunction = "WEB_INSMGT";
|
||||
this.record_title = L("ins_srtcontrole");
|
||||
this.records_title = L("ins_srtcontrole_m");
|
||||
@@ -29,7 +29,7 @@ function model_ins_srtcontrole()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "ins_srtcontrole_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
@@ -42,13 +42,13 @@ function model_ins_srtcontrole()
|
||||
"hidden_fld": true,
|
||||
"LOV": fill_niveau_LOV()
|
||||
},
|
||||
"object_key": {
|
||||
"objectkey": {
|
||||
"dbs": "ins_srtinstallatie_key",
|
||||
"label": "ins_srtinstallatie_key",
|
||||
"label": L("lcl_ins_object"),
|
||||
"typ": "key",
|
||||
"hidden_fld": true
|
||||
},
|
||||
"object_discipline": {
|
||||
"objectdiscipline": {
|
||||
"dbs": "ins_v_allsrtinstallatie.ins_discipline_key",
|
||||
"label": L("ins_srtinstallatie_discipline"),
|
||||
"typ": "key",
|
||||
@@ -58,7 +58,7 @@ function model_ins_srtcontrole()
|
||||
"desc": "ins_discipline_omschrijving"
|
||||
}
|
||||
},
|
||||
"object_group": {
|
||||
"objectgroup": {
|
||||
"dbs": "ins_v_allsrtinstallatie.ins_srtgroep_key",
|
||||
"label": L("ins_srtinstallatie_srtgroep"),
|
||||
"typ": "key",
|
||||
@@ -67,7 +67,7 @@ function model_ins_srtcontrole()
|
||||
"desc": "ins_srtgroep_omschrijving"
|
||||
}
|
||||
},
|
||||
"object_type": {
|
||||
"objecttype": {
|
||||
"dbs": "ins_v_allsrtinstallatie.ins_srtdeel_key",
|
||||
"label": L("ins_srtinstallatie_srtdeel"),
|
||||
"typ": "key",
|
||||
@@ -89,7 +89,7 @@ function model_ins_srtcontrole()
|
||||
"typ": "memo",
|
||||
"translate": true
|
||||
},
|
||||
"ctr_discipline": {
|
||||
"taskdiscipline": {
|
||||
"dbs": "ctr_discipline_key",
|
||||
"label": L("ctr_discipline"),
|
||||
"typ": "key",
|
||||
@@ -99,7 +99,7 @@ function model_ins_srtcontrole()
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"inspection_mode": {
|
||||
"inspectionmode": {
|
||||
"dbs": "ins_srtcontrole_mode",
|
||||
"label": L("ins_srtcontrole_mode"),
|
||||
"typ": "key",
|
||||
@@ -175,17 +175,17 @@ function model_ins_srtcontrole()
|
||||
"label": L("ins_srtcontrole_uren"),
|
||||
"typ": "float"
|
||||
},
|
||||
"end_date": {
|
||||
"enddate": {
|
||||
"dbs": "ins_srtcontrole_eind",
|
||||
"label": L("ins_srtcontrole_eind"),
|
||||
"typ": "date"
|
||||
},
|
||||
"afbouw_time": {
|
||||
"phasingouttime": {
|
||||
"dbs": "ins_srtcontrole_afbouwtijd",
|
||||
"label": L("ins_srtcontrole_afbouwtijd"),
|
||||
"typ": "float"
|
||||
},
|
||||
"inspection_group": {
|
||||
"taskgroup": {
|
||||
"dbs": "ins_srtcontrole_groep",
|
||||
"label": L("ins_srtcontrole_groep"),
|
||||
"typ": "varchar"
|
||||
@@ -258,12 +258,26 @@ function model_ins_srtcontrole()
|
||||
this.includes = {
|
||||
"kenmerken": {
|
||||
"model": new model_ins_kenmerk( {niveau:"C"} ),
|
||||
"joinfield": "object_key",
|
||||
"joinfield": "objectkey",
|
||||
"enable_update": true
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
if (mode != "save")
|
||||
{
|
||||
this.hook_pre_edit = function (obj, fld)
|
||||
{
|
||||
%>
|
||||
<script>
|
||||
var srtinstallatieselector_available = 1; // toon alleen actuele disciplines/groepen en objecten.
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.REST_GET = generic_REST_GET(this, {
|
||||
"GET": {
|
||||
"tables": ["ins_v_allsrtinstallatie"],
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
function model_ins_srtgroep()
|
||||
{
|
||||
this.records_name = "objectgroups";
|
||||
this.record_name = "objectgroup";
|
||||
this.table = "ins_srtgroep";
|
||||
this.primary = "ins_srtgroep_key";
|
||||
this.records_name = "ins_srtgroeps";
|
||||
this.record_name = "ins_srtgroep";
|
||||
this.soft_delete = "ins_srtgroep_verwijder";
|
||||
this.autfunction = "WEB_INSMGT";
|
||||
this.record_title = L("ins_srtgroep");
|
||||
@@ -28,14 +28,14 @@ function model_ins_srtgroep()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "ins_srtgroep_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "ins_s_ins_srtgroep_key",
|
||||
"defaultvalue": null
|
||||
},
|
||||
"catalogue": {
|
||||
"objectdiscipline": {
|
||||
"dbs": "ins_discipline_key",
|
||||
"label": L("ins_srtgroep_catalogus"),
|
||||
"typ": "key",
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
// Krijgt in params altijd een functie_key en groep_key
|
||||
function model_ins_tab_discipline(disc_key, params)
|
||||
{
|
||||
this.records_name = "alldisciplines";
|
||||
this.record_name = "alldiscipline";
|
||||
this.table = "ins_tab_discipline";
|
||||
this.primary = "ins_discipline_key";
|
||||
this.records_name = "disciplines";
|
||||
this.record_name = "discipline";
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "ins_discipline_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"seq": "ins_s_ins_discipline_key"
|
||||
@@ -53,7 +53,7 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
"desc": "ins_srtdiscipline_omschrijving"
|
||||
}
|
||||
},
|
||||
"ins_discipline_min_level": {
|
||||
"disciplinelevel": {
|
||||
"dbs": "ins_discipline_min_level",
|
||||
"label": L("ins_discipline_min_level"),
|
||||
"typ": "key",
|
||||
@@ -81,22 +81,22 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": ""
|
||||
},
|
||||
"ins_discipline_kpnverplicht": {
|
||||
"costcentremandatory": {
|
||||
"dbs": "ins_discipline_kpnverplicht",
|
||||
"label": L("ins_discipline_kpnverplicht"),
|
||||
"typ": "check"
|
||||
},
|
||||
"ins_discipline_email": {
|
||||
"email": {
|
||||
"dbs": "ins_discipline_email",
|
||||
"label": L("ins_discipline_email"),
|
||||
"typ": "varchar"
|
||||
},
|
||||
"ins_discipline_ktopercentage": {
|
||||
"satisfactionpercentage": {
|
||||
"dbs": "ins_discipline_ktopercentage",
|
||||
"label": L("ins_discipline_ktopercentage"),
|
||||
"typ": "number"
|
||||
},
|
||||
"ins_discipline_ktodrempel": {
|
||||
"satisfactionthreshold": {
|
||||
"dbs": "ins_discipline_ktodrempel",
|
||||
"label": L("ins_discipline_ktodrempel"),
|
||||
"typ": "number"
|
||||
@@ -106,7 +106,7 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
this.list = {
|
||||
"columns": [
|
||||
"id",
|
||||
"ins_discipline_min_level",
|
||||
"disciplinelevel",
|
||||
"name",
|
||||
"costtype",
|
||||
"sequence"
|
||||
@@ -117,7 +117,7 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
{
|
||||
this.includes = {"authorization":
|
||||
{ "model": new model_fac_groeprechten(params),
|
||||
"joinfield": "ins_discipline",
|
||||
"joinfield": "discipline",
|
||||
"outertoggle": { def: false, lbl: L("fac_gebruiker_outerdisc") }
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ scaffolding(this_model,
|
||||
"columns": [
|
||||
"id",
|
||||
"name",
|
||||
"min_level",
|
||||
"chargetype"
|
||||
"minimumlevel",
|
||||
"costtype"
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
@@ -6,26 +6,15 @@
|
||||
<%
|
||||
var this_model = new model_ins_srtcontrole();
|
||||
|
||||
if (mode != "save")
|
||||
{
|
||||
this_model.hook_pre_edit = function (obj, fld)
|
||||
{
|
||||
%>
|
||||
<script>
|
||||
var srtinstallatieselector_available = 1; // toon alleen actuele disciplines/groepen en objecten.
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"ctr_discipline",
|
||||
"object_discipline",
|
||||
"object_group",
|
||||
"object_type",
|
||||
"taskdiscipline",
|
||||
"objectdiscipline",
|
||||
"objectgroup",
|
||||
"objecttype",
|
||||
"level",
|
||||
"name"
|
||||
],
|
||||
@@ -40,11 +29,11 @@ scaffolding(this_model,
|
||||
"columns": [
|
||||
"id",
|
||||
"level",
|
||||
"object_discipline",
|
||||
"object_group",
|
||||
"object_type",
|
||||
"objectdiscipline",
|
||||
"objectgroup",
|
||||
"objecttype",
|
||||
"name",
|
||||
"ctr_discipline",
|
||||
"taskdiscipline",
|
||||
"period",
|
||||
"unit"
|
||||
]
|
||||
|
||||
@@ -13,17 +13,17 @@ $(document).ready(function () {
|
||||
|
||||
function init_srtcontrole()
|
||||
{
|
||||
$("#inspection_mode").change(change_mode);
|
||||
$("#inspectionmode").change(change_mode);
|
||||
$("#unit").change(change_unit);
|
||||
$("#_moment").click(SelectBits);
|
||||
$("#ctr_discipline").change(change_ctr_discipline);
|
||||
$("#taskdiscipline").change(change_ctr_discipline);
|
||||
|
||||
change_ctr_discipline(true); // initieel goed zetten.
|
||||
}
|
||||
|
||||
function change_mode()
|
||||
{
|
||||
var controlemode = $("#inspection_mode").val() == 0;
|
||||
var controlemode = $("#inspectionmode").val() == 0;
|
||||
if (!controlemode)
|
||||
$("#_moment").parent().parent().hide()
|
||||
else
|
||||
@@ -42,20 +42,20 @@ function callback_ctr_info(data, textStatus)
|
||||
{
|
||||
$("#unit").val(4); // Jaarlijks.
|
||||
$("#unit").prop('disabled', true);
|
||||
$("#inspection_mode").val(1); // Interval
|
||||
$("#inspection_mode").prop('disabled', true);
|
||||
$("#inspectionmode").val(1); // Interval
|
||||
$("#inspectionmode").prop('disabled', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#unit").prop('disabled', false);
|
||||
$("#inspection_mode").prop('disabled', false);
|
||||
$("#inspectionmode").prop('disabled', false);
|
||||
}
|
||||
change_mode();
|
||||
}
|
||||
|
||||
function change_ctr_discipline(init)
|
||||
{
|
||||
var ctr_disc = $("#ctr_discipline").val();
|
||||
var ctr_disc = $("#taskdiscipline").val();
|
||||
if (ctr_disc > 0)
|
||||
{
|
||||
$.getJSON("../Shared/get_ctr_info.asp",
|
||||
@@ -89,7 +89,7 @@ function pre_submit()
|
||||
{
|
||||
var ch_mode = (changed_mode == 1);
|
||||
var ch_bits = (changed_bits == 1);
|
||||
var controlemode = $("#inspection_mode").val() == 0;
|
||||
var controlemode = $("#inspectionmode").val() == 0;
|
||||
if (controlemode)
|
||||
{
|
||||
if (ch_mode && !ch_bits)
|
||||
@@ -103,25 +103,25 @@ function pre_submit()
|
||||
$("#bits").val(null);
|
||||
}
|
||||
|
||||
if ($("#object_type").val() != -1)
|
||||
if ($("#objecttype").val() != -1)
|
||||
{
|
||||
$("#level").val("S");
|
||||
$("#object_key").val($("#object_type").val());
|
||||
$("#objectkey").val($("#objecttype").val());
|
||||
}
|
||||
else if ($("#object_group").val() != -1)
|
||||
else if ($("#objectgroup").val() != -1)
|
||||
{
|
||||
$("#level").val("G");
|
||||
$("#object_key").val($("#object_group").val());
|
||||
$("#objectkey").val($("#objectgroup").val());
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#level").val("D");
|
||||
$("#object_key").val($("#object_discipline").val());
|
||||
$("#objectkey").val($("#objectdiscipline").val());
|
||||
}
|
||||
|
||||
// Eenheid voor het opslaan uit de disable mode.
|
||||
$("#unit").attr('disabled', false);
|
||||
$("#inspection_mode").prop('disabled', false);
|
||||
$("#inspectionmode").prop('disabled', false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ scaffolding(this_model,
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"catalogue",
|
||||
"objectdiscipline",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
@@ -31,7 +31,7 @@ scaffolding(this_model,
|
||||
"columns": [
|
||||
"id",
|
||||
"name",
|
||||
"catalogue"
|
||||
"objectdiscipline"
|
||||
]
|
||||
},
|
||||
"edit":{
|
||||
|
||||
@@ -75,21 +75,21 @@
|
||||
scf_params.search.labels.push({ "lbl": L("fac_functie_info"), "txt" : Oracle.Get("lcl.l(fac_functie_info, 1)", "fac_functie", functie_key)});
|
||||
if (model.level & 4)
|
||||
{
|
||||
scf_params.list.columns.push("authorization.prs_level_read");
|
||||
scf_params.list.columns.push("authorization.basislevelread");
|
||||
if (model.level & 2)
|
||||
scf_params.list.columns.push("authorization.prs_level_write");
|
||||
scf_params.list.columns.push("authorization.basislevelwrite");
|
||||
}
|
||||
if (model.level & 8)
|
||||
{
|
||||
scf_params.list.columns.push("authorization.alg_level_read")
|
||||
scf_params.list.columns.push("authorization.realestatelevelread")
|
||||
if (model.level & 2)
|
||||
scf_params.list.columns.push("authorization.alg_level_write");
|
||||
scf_params.list.columns.push("authorization.realestatelevelwrite");
|
||||
}
|
||||
if (!(model.level & (4 | 8)))
|
||||
{
|
||||
scf_params.list.columns.push("authorization.prs_level_read");
|
||||
scf_params.list.columns.push("authorization.basislevelread");
|
||||
if (model.level & 2) // Schrijfrechten
|
||||
scf_params.list.columns.push("authorization.alg_level_write");
|
||||
scf_params.list.columns.push("authorization.realestatelevelwrite");
|
||||
}
|
||||
scf_params.list["actions"]
|
||||
= [
|
||||
|
||||
Reference in New Issue
Block a user