From e3624170acd9cd2d8dda18c21e57ff70fd14a784 Mon Sep 17 00:00:00 2001 From: Erik Groener Date: Mon, 27 Feb 2017 10:52:47 +0000 Subject: [PATCH] FSN#39312 Verder ontsluiten van modellen via de API svn path=/Website/trunk/; revision=32963 --- APPL/API2/api2_dispatch.inc | 10 +++--- APPL/API2/model_bez_actie.inc | 2 +- APPL/API2/model_bgt_budget.inc | 2 +- APPL/API2/model_bgt_kostenrubriek.inc | 2 +- APPL/API2/model_bgt_project.inc | 2 +- APPL/API2/model_cnt_termijn.inc | 2 +- APPL/API2/model_ctr_disc_params.inc | 10 +++--- APPL/API2/model_ctr_discipline.inc | 8 ++--- APPL/API2/model_fac_email_setting.inc | 2 +- APPL/API2/model_fac_gebruikersgroep.inc | 18 ++++++----- APPL/API2/model_fac_notificatiejob.inc | 2 +- APPL/API2/model_fin_btwtabel.inc | 6 ++-- APPL/API2/model_fin_btwtabelwaarde.inc | 10 +++--- APPL/API2/model_ins_controlemode.inc | 2 +- APPL/API2/model_ins_disc_params.inc | 10 +++--- APPL/API2/model_ins_discipline.inc | 18 +++++------ APPL/API2/model_ins_kenmerk.inc | 6 ++-- APPL/API2/model_ins_srtcontrole.inc | 42 ++++++++++++++++--------- APPL/API2/model_ins_srtgroep.inc | 8 ++--- APPL/API2/model_ins_tab_discipline.inc | 20 ++++++------ APPL/MGT/ins_discipline.asp | 4 +-- APPL/MGT/ins_srtcontrole.asp | 27 +++++----------- APPL/MGT/ins_srtcontrole.js | 28 ++++++++--------- APPL/MGT/ins_srtgroep.asp | 4 +-- APPL/MGT/ins_tab_discipline.asp | 12 +++---- 25 files changed, 129 insertions(+), 128 deletions(-) diff --git a/APPL/API2/api2_dispatch.inc b/APPL/API2/api2_dispatch.inc index 088db9b086..9c701a2b7b 100644 --- a/APPL/API2/api2_dispatch.inc +++ b/APPL/API2/api2_dispatch.inc @@ -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", diff --git a/APPL/API2/model_bez_actie.inc b/APPL/API2/model_bez_actie.inc index af3a9996ca..03879631c7 100644 --- a/APPL/API2/model_bez_actie.inc +++ b/APPL/API2/model_bez_actie.inc @@ -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", diff --git a/APPL/API2/model_bgt_budget.inc b/APPL/API2/model_bgt_budget.inc index 4b89772e9a..0d3970b8b4 100644 --- a/APPL/API2/model_bgt_budget.inc +++ b/APPL/API2/model_bgt_budget.inc @@ -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, diff --git a/APPL/API2/model_bgt_kostenrubriek.inc b/APPL/API2/model_bgt_kostenrubriek.inc index e0f85682fa..85fa91d323 100644 --- a/APPL/API2/model_bgt_kostenrubriek.inc +++ b/APPL/API2/model_bgt_kostenrubriek.inc @@ -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, diff --git a/APPL/API2/model_bgt_project.inc b/APPL/API2/model_bgt_project.inc index b022198a93..5eb25c6b33 100644 --- a/APPL/API2/model_bgt_project.inc +++ b/APPL/API2/model_bgt_project.inc @@ -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, diff --git a/APPL/API2/model_cnt_termijn.inc b/APPL/API2/model_cnt_termijn.inc index 5acbe3fbf1..a3bc5018e9 100644 --- a/APPL/API2/model_cnt_termijn.inc +++ b/APPL/API2/model_cnt_termijn.inc @@ -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", diff --git a/APPL/API2/model_ctr_disc_params.inc b/APPL/API2/model_ctr_disc_params.inc index 3b754b548b..e90da09957 100644 --- a/APPL/API2/model_ctr_disc_params.inc +++ b/APPL/API2/model_ctr_disc_params.inc @@ -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", diff --git a/APPL/API2/model_ctr_discipline.inc b/APPL/API2/model_ctr_discipline.inc index 99522cf86a..10477a094d 100644 --- a/APPL/API2/model_ctr_discipline.inc +++ b/APPL/API2/model_ctr_discipline.inc @@ -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"; } diff --git a/APPL/API2/model_fac_email_setting.inc b/APPL/API2/model_fac_email_setting.inc index 23ee98bac7..17aa977979 100644 --- a/APPL/API2/model_fac_email_setting.inc +++ b/APPL/API2/model_fac_email_setting.inc @@ -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", diff --git a/APPL/API2/model_fac_gebruikersgroep.inc b/APPL/API2/model_fac_gebruikersgroep.inc index 0ca5700814..a4f6cf007b 100644 --- a/APPL/API2/model_fac_gebruikersgroep.inc +++ b/APPL/API2/model_fac_gebruikersgroep.inc @@ -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 diff --git a/APPL/API2/model_fac_notificatiejob.inc b/APPL/API2/model_fac_notificatiejob.inc index d961b31098..a610307c06 100644 --- a/APPL/API2/model_fac_notificatiejob.inc +++ b/APPL/API2/model_fac_notificatiejob.inc @@ -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, diff --git a/APPL/API2/model_fin_btwtabel.inc b/APPL/API2/model_fin_btwtabel.inc index a1acb04887..0cdfe34b4e 100644 --- a/APPL/API2/model_fin_btwtabel.inc +++ b/APPL/API2/model_fin_btwtabel.inc @@ -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" } }; diff --git a/APPL/API2/model_fin_btwtabelwaarde.inc b/APPL/API2/model_fin_btwtabelwaarde.inc index 9379848d3a..6074cae93e 100644 --- a/APPL/API2/model_fin_btwtabelwaarde.inc +++ b/APPL/API2/model_fin_btwtabelwaarde.inc @@ -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", diff --git a/APPL/API2/model_ins_controlemode.inc b/APPL/API2/model_ins_controlemode.inc index ea05f88e69..2e4a817383 100644 --- a/APPL/API2/model_ins_controlemode.inc +++ b/APPL/API2/model_ins_controlemode.inc @@ -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", diff --git a/APPL/API2/model_ins_disc_params.inc b/APPL/API2/model_ins_disc_params.inc index 1b80bb019e..99cdd0c41d 100644 --- a/APPL/API2/model_ins_disc_params.inc +++ b/APPL/API2/model_ins_disc_params.inc @@ -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 } diff --git a/APPL/API2/model_ins_discipline.inc b/APPL/API2/model_ins_discipline.inc index dd930b509a..f402b946ca 100644 --- a/APPL/API2/model_ins_discipline.inc +++ b/APPL/API2/model_ins_discipline.inc @@ -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" } } %> \ No newline at end of file diff --git a/APPL/API2/model_ins_kenmerk.inc b/APPL/API2/model_ins_kenmerk.inc index f0d6fa6c4f..2f266c36e0 100644 --- a/APPL/API2/model_ins_kenmerk.inc +++ b/APPL/API2/model_ins_kenmerk.inc @@ -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) diff --git a/APPL/API2/model_ins_srtcontrole.inc b/APPL/API2/model_ins_srtcontrole.inc index 2475e3f27e..67e28f82cc 100644 --- a/APPL/API2/model_ins_srtcontrole.inc +++ b/APPL/API2/model_ins_srtcontrole.inc @@ -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) + { + %> + + <% + } + } + + this.REST_GET = generic_REST_GET(this, { "GET": { "tables": ["ins_v_allsrtinstallatie"], diff --git a/APPL/API2/model_ins_srtgroep.inc b/APPL/API2/model_ins_srtgroep.inc index eec7976daa..ed2d1f15b9 100644 --- a/APPL/API2/model_ins_srtgroep.inc +++ b/APPL/API2/model_ins_srtgroep.inc @@ -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", diff --git a/APPL/API2/model_ins_tab_discipline.inc b/APPL/API2/model_ins_tab_discipline.inc index fc7422861d..86300f8320 100644 --- a/APPL/API2/model_ins_tab_discipline.inc +++ b/APPL/API2/model_ins_tab_discipline.inc @@ -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") } }}; } diff --git a/APPL/MGT/ins_discipline.asp b/APPL/MGT/ins_discipline.asp index c08f08c673..46f6495736 100644 --- a/APPL/MGT/ins_discipline.asp +++ b/APPL/MGT/ins_discipline.asp @@ -29,8 +29,8 @@ scaffolding(this_model, "columns": [ "id", "name", - "min_level", - "chargetype" + "minimumlevel", + "costtype" ] }, diff --git a/APPL/MGT/ins_srtcontrole.asp b/APPL/MGT/ins_srtcontrole.asp index a575fd5b18..4a54cf8b22 100644 --- a/APPL/MGT/ins_srtcontrole.asp +++ b/APPL/MGT/ins_srtcontrole.asp @@ -6,26 +6,15 @@ <% var this_model = new model_ins_srtcontrole(); -if (mode != "save") -{ - this_model.hook_pre_edit = function (obj, fld) - { -%> - -<% - } -} 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" ] diff --git a/APPL/MGT/ins_srtcontrole.js b/APPL/MGT/ins_srtcontrole.js index 899e303a68..09ca23b453 100644 --- a/APPL/MGT/ins_srtcontrole.js +++ b/APPL/MGT/ins_srtcontrole.js @@ -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; } diff --git a/APPL/MGT/ins_srtgroep.asp b/APPL/MGT/ins_srtgroep.asp index 89fdd9fd58..3aa36f5ab6 100644 --- a/APPL/MGT/ins_srtgroep.asp +++ b/APPL/MGT/ins_srtgroep.asp @@ -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":{ diff --git a/APPL/MGT/ins_tab_discipline.asp b/APPL/MGT/ins_tab_discipline.asp index 69f32d736b..712939fa31 100644 --- a/APPL/MGT/ins_tab_discipline.asp +++ b/APPL/MGT/ins_tab_discipline.asp @@ -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"] = [