FSN#39312 Verder ontsluiten van modellen via de API

svn path=/Website/trunk/; revision=32853
This commit is contained in:
Erik Groener
2017-02-16 12:29:33 +00:00
parent e927a39ed4
commit 4d290d523b
16 changed files with 200 additions and 198 deletions

View File

@@ -13,100 +13,100 @@
var api2_mapper = {
// De 'name' moet hier gelijk zijn aan model.records_name
// en die moet zo nodig eerst nog fatsoenlijk engelstalig gemaakt worden
"alg_kenmerks" : "appl/mgt/alg_kenmerk.asp",
"realestateproperties" : "appl/mgt/alg_kenmerk.asp",
"buildingfunctions" : "appl/mgt/alg_srtgebouw.asp",
"terrainfunctions" : "appl/mgt/alg_srtterreinsector.asp",
"bes_disciplines" : "appl/mgt/bes_discipline.asp",
"ins_tab_disciplines" : "appl/mgt/bes_disciplineprod.asp",
"bes_grootheids" : "appl/mgt/bes_grootheid.asp",
"bes_kenmerks" : "appl/mgt/bes_kenmerk.asp",
"bes_kenmerks" : "appl/mgt/bes_kenmerkbestel.asp",
"xxxxxx" : "appl/mgt/bes_srtgroep.asp",
"xxxxxx" : "appl/mgt/bes_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/bes_srtprodgroep.asp",
"xxxxxx" : "appl/mgt/bes_staffeltabel.asp",
"visitoractions" : "appl/mgt/bez_actie.asp",
"xxxxxx" : "appl/mgt/bez_kenmerk.asp",
"xxxxxx" : "appl/mgt/cad_label.asp",
"xxxxxx" : "appl/mgt/cad_legenda.asp",
"xxxxxx" : "appl/mgt/cad_legendawaarde.asp",
"xxxxxx" : "appl/mgt/cad_thema.asp",
"xxxxxx" : "appl/mgt/cnt_discipline.asp",
"xxxxxx" : "appl/mgt/cnt_kenmerk.asp",
"xxxxxx" : "appl/mgt/cnt_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/cnt_termijn.asp",
"xxxxxx" : "appl/mgt/ctr_discipline.asp",
"xxxxxx" : "appl/mgt/fac_audit.asp",
"xxxxxx" : "appl/mgt/fac_edit_groeprechten.asp",
"xxxxxx" : "appl/mgt/fac_edit_groeprechten_save.asp",
"xxxxxx" : "appl/mgt/fac_email_setting.asp",
"xxxxxx" : "appl/mgt/fac_export_app.asp",
"xxxxxx" : "appl/mgt/fac_functie.asp",
"xxxxxx" : "appl/mgt/fac_groep.asp",
"xxxxxx" : "appl/mgt/fac_groeprechten.asp",
"xxxxxx" : "appl/mgt/fac_idp.asp",
"xxxxxx" : "appl/mgt/fac_import_app.asp",
"xxxxxx" : "appl/mgt/fac_notificatiejob.asp",
"xxxxxx" : "appl/mgt/fac_profiel.asp",
"xxxxxx" : "appl/mgt/fac_profielwaarde.asp",
"xxxxxx" : "appl/mgt/fac_srtnotificatie.asp",
"xxxxxx" : "appl/mgt/fac_usergraph.asp",
"xxxxxx" : "appl/mgt/fac_usrtab.asp",
"xxxxxx" : "appl/mgt/fac_widget.asp",
"xxxxxx" : "appl/mgt/faq_kenmerk.asp",
"xxxxxx" : "appl/mgt/fin_btwtabel.asp",
"xxxxxx" : "appl/mgt/fin_kenmerk.asp",
"xxxxxx" : "appl/mgt/fin_verkoopfactuur.asp",
"xxxxxx" : "appl/mgt/generic_prs_perslid.asp",
"xxxxxx" : "appl/mgt/ins_controlemode.asp",
"xxxxxx" : "appl/mgt/ins_discipline.asp",
"xxxxxx" : "appl/mgt/ins_kenmerk.asp",
"xxxxxx" : "appl/mgt/ins_srtcontrole.asp",
"xxxxxx" : "appl/mgt/ins_srtgroep.asp",
"xxxxxx" : "appl/mgt/ins_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/ins_tab_discipline.asp",
"xxxxxx" : "appl/mgt/mgt_generic.asp",
"xxxxxx" : "appl/mgt/mld_afmeldtekst.asp",
"xxxxxx" : "appl/mgt/mld_behandelgroep.asp",
"xxxxxx" : "appl/mgt/mld_dienstniveau.asp",
"issuedisciplines" : "appl/mgt/mld_discipline.asp",
"xxxxxx" : "appl/mgt/mld_impropdr.asp",
"xxxxxx" : "appl/mgt/mld_kenmerk.asp",
"xxxxxx" : "appl/mgt/mld_kosten.asp",
"xxxxxx" : "appl/mgt/mld_meldbron.asp",
"xxxxxx" : "appl/mgt/mld_srtdiscipline.asp",
"xxxxxx" : "appl/mgt/mld_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/mld_stdmelding_groep.asp",
"xxxxxx" : "appl/mgt/mld_typeopdr.asp",
"xxxxxx" : "appl/mgt/mld_vrije_dagen.asp",
"xxxxxx" : "appl/mgt/mld_workflow.asp",
"xxxxxx" : "appl/mgt/mld_workflowstep.asp",
"xxxxxx" : "appl/mgt/mld_workflow_expression.asp",
"xxxxxx" : "appl/mgt/mrk_discipline.asp",
"xxxxxx" : "appl/mgt/prs_dienst.asp",
"xxxxxx" : "appl/mgt/prs_kenmerk.asp",
"xxxxxx" : "appl/mgt/prs_kostencombinatie.asp",
"xxxxxx" : "appl/mgt/prs_kostensoort.asp",
"xxxxxx" : "appl/mgt/prs_kostensoortgrp.asp",
"xxxxxx" : "appl/mgt/prs_perslid.asp",
"xxxxxx" : "appl/mgt/prs_relatietype.asp",
"xxxxxx" : "appl/mgt/prs_srtperslid.asp",
"xxxxxx" : "appl/mgt/prs_staffel.asp",
"xxxxxx" : "appl/mgt/res_activiteit.asp",
"xxxxxx" : "appl/mgt/res_artikel.asp",
"xxxxxx" : "appl/mgt/res_cyclus.asp",
"xxxxxx" : "appl/mgt/res_deel.asp",
"xxxxxx" : "appl/mgt/res_discipline.asp",
"xxxxxx" : "appl/mgt/res_kenmerk.asp",
"xxxxxx" : "appl/mgt/res_opstelling.asp",
"xxxxxx" : "appl/mgt/res_ruimte.asp",
"xxxxxx" : "appl/mgt/res_srtactiviteit.asp",
"articlescopes" : "appl/mgt/res_srtartikel_onrgoed.asp",
"xxxxxx" : "appl/mgt/res_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/user_tables.asp",
"xxxxxx" : "appl/mgt/workflow_graph.asp",
"xxxxxx" : "appl/mgt/workflow_graph_png.asp",
"xxxxxx" : "appl/mgt/workflow_overview.asp"
"orderdisciplines" : "appl/mgt/bes_discipline.asp", // F
"ordercatalogues" : "appl/mgt/bes_disciplineprod.asp",
"unit" : "appl/mgt/bes_grootheid.asp",
"orderlineproperties" : "appl/mgt/bes_kenmerk.asp", // F
"orderproperties" : "appl/mgt/bes_kenmerkbestel.asp", // F
"xxxxxx" : "appl/mgt/bes_srtgroep.asp",
"xxxxxx" : "appl/mgt/bes_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/bes_srtprodgroep.asp",
"xxxxxx" : "appl/mgt/bes_staffeltabel.asp",
"visitoractions" : "appl/mgt/bez_actie.asp",
"xxxxxx" : "appl/mgt/bez_kenmerk.asp",
"xxxxxx" : "appl/mgt/cad_label.asp",
"xxxxxx" : "appl/mgt/cad_legenda.asp",
"xxxxxx" : "appl/mgt/cad_legendawaarde.asp",
"xxxxxx" : "appl/mgt/cad_thema.asp",
"xxxxxx" : "appl/mgt/cnt_discipline.asp",
"xxxxxx" : "appl/mgt/cnt_kenmerk.asp",
"xxxxxx" : "appl/mgt/cnt_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/cnt_termijn.asp",
"xxxxxx" : "appl/mgt/ctr_discipline.asp",
"xxxxxx" : "appl/mgt/fac_audit.asp",
"xxxxxx" : "appl/mgt/fac_edit_groeprechten.asp",
"xxxxxx" : "appl/mgt/fac_edit_groeprechten_save.asp",
"xxxxxx" : "appl/mgt/fac_email_setting.asp",
"xxxxxx" : "appl/mgt/fac_export_app.asp",
"xxxxxx" : "appl/mgt/fac_functie.asp",
"xxxxxx" : "appl/mgt/fac_groep.asp",
"xxxxxx" : "appl/mgt/fac_groeprechten.asp",
"xxxxxx" : "appl/mgt/fac_idp.asp",
"xxxxxx" : "appl/mgt/fac_import_app.asp",
"xxxxxx" : "appl/mgt/fac_notificatiejob.asp",
"xxxxxx" : "appl/mgt/fac_profiel.asp",
"xxxxxx" : "appl/mgt/fac_profielwaarde.asp",
"xxxxxx" : "appl/mgt/fac_srtnotificatie.asp",
"xxxxxx" : "appl/mgt/fac_usergraph.asp",
"xxxxxx" : "appl/mgt/fac_usrtab.asp",
"xxxxxx" : "appl/mgt/fac_widget.asp",
"xxxxxx" : "appl/mgt/faq_kenmerk.asp",
"xxxxxx" : "appl/mgt/fin_btwtabel.asp",
"xxxxxx" : "appl/mgt/fin_kenmerk.asp",
"xxxxxx" : "appl/mgt/fin_verkoopfactuur.asp",
"xxxxxx" : "appl/mgt/generic_prs_perslid.asp",
"xxxxxx" : "appl/mgt/ins_controlemode.asp",
"xxxxxx" : "appl/mgt/ins_discipline.asp",
"xxxxxx" : "appl/mgt/ins_kenmerk.asp",
"xxxxxx" : "appl/mgt/ins_srtcontrole.asp",
"xxxxxx" : "appl/mgt/ins_srtgroep.asp",
"xxxxxx" : "appl/mgt/ins_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/ins_tab_discipline.asp",
"xxxxxx" : "appl/mgt/mgt_generic.asp",
"xxxxxx" : "appl/mgt/mld_afmeldtekst.asp",
"xxxxxx" : "appl/mgt/mld_behandelgroep.asp",
"xxxxxx" : "appl/mgt/mld_dienstniveau.asp",
"issuedisciplines" : "appl/mgt/mld_discipline.asp",
"xxxxxx" : "appl/mgt/mld_impropdr.asp",
"xxxxxx" : "appl/mgt/mld_kenmerk.asp",
"xxxxxx" : "appl/mgt/mld_kosten.asp",
"xxxxxx" : "appl/mgt/mld_meldbron.asp",
"xxxxxx" : "appl/mgt/mld_srtdiscipline.asp",
"xxxxxx" : "appl/mgt/mld_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/mld_stdmelding_groep.asp",
"xxxxxx" : "appl/mgt/mld_typeopdr.asp",
"xxxxxx" : "appl/mgt/mld_vrije_dagen.asp",
"xxxxxx" : "appl/mgt/mld_workflow.asp",
"xxxxxx" : "appl/mgt/mld_workflowstep.asp",
"xxxxxx" : "appl/mgt/mld_workflow_expression.asp",
"xxxxxx" : "appl/mgt/mrk_discipline.asp",
"xxxxxx" : "appl/mgt/prs_dienst.asp",
"xxxxxx" : "appl/mgt/prs_kenmerk.asp",
"xxxxxx" : "appl/mgt/prs_kostencombinatie.asp",
"xxxxxx" : "appl/mgt/prs_kostensoort.asp",
"xxxxxx" : "appl/mgt/prs_kostensoortgrp.asp",
"xxxxxx" : "appl/mgt/prs_perslid.asp",
"xxxxxx" : "appl/mgt/prs_relatietype.asp",
"xxxxxx" : "appl/mgt/prs_srtperslid.asp",
"xxxxxx" : "appl/mgt/prs_staffel.asp",
"xxxxxx" : "appl/mgt/res_activiteit.asp",
"xxxxxx" : "appl/mgt/res_artikel.asp",
"xxxxxx" : "appl/mgt/res_cyclus.asp",
"xxxxxx" : "appl/mgt/res_deel.asp",
"xxxxxx" : "appl/mgt/res_discipline.asp",
"xxxxxx" : "appl/mgt/res_kenmerk.asp",
"xxxxxx" : "appl/mgt/res_opstelling.asp",
"xxxxxx" : "appl/mgt/res_ruimte.asp",
"xxxxxx" : "appl/mgt/res_srtactiviteit.asp",
"articlescopes" : "appl/mgt/res_srtartikel_onrgoed.asp",
"xxxxxx" : "appl/mgt/res_srtkenmerk.asp",
"xxxxxx" : "appl/mgt/user_tables.asp",
"xxxxxx" : "appl/mgt/workflow_graph.asp",
"xxxxxx" : "appl/mgt/workflow_graph_png.asp",
"xxxxxx" : "appl/mgt/workflow_overview.asp"
}
function api2_dispatch(api2_name)

View File

@@ -12,34 +12,35 @@
*/
%>
<%
var niveau = getQParam("level"); // [ D | L | T | G | V | R ]
function model_alg_kenmerk(niveau)
{
this.records_name = "realestateproperties";
this.record_name = "realestateproperty";
this.table = "alg_kenmerk";
this.primary = "alg_kenmerk_key";
this.records_name = "alg_kenmerks";
this.record_name = "alg_kenmerk";
this.soft_delete = "alg_kenmerk_verwijder";
this.autfunction = "WEB_PRSSYS";
this.record_title = L("mgt_kenmerk") + " " + get_onrgoed_naam(niveau);
this.records_title = L("mgt_kenmerk_m") + " " + get_onrgoed_naam(niveau);;
this.record_title = L("mgt_kenmerk") + " " + get_real_estate_name(niveau);
this.records_title = L("mgt_kenmerk_m") + " " + get_real_estate_name(niveau);;
this.fields = {
"id": {
"dbs": "alg_kenmerk_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "alg_s_alg_kenmerk_key"
},
"alg_kenmerk_niveau": {
"level": {
"dbs": "alg_kenmerk_niveau",
"label": L("mgt_kenmerk_niveau"),
"typ": "varchar",
"hidden_fld": true,
"LOV": fill_og_niveau_LOV(),
"LOV": fill_real_estate_level_LOV(),
"defaultvalue": "L"
},
"sequence": {
@@ -68,7 +69,7 @@ function model_alg_kenmerk(niveau)
"typ": "varchar",
"translate": true
},
"property_type": {
"attributetype": {
"dbs": "alg_kenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -83,7 +84,7 @@ function model_alg_kenmerk(niveau)
"LOV": buildVerplichtingList(),
"emptyoption": null
},
"property_group": {
"group": {
"dbs": "alg_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -121,7 +122,7 @@ function model_alg_kenmerk(niveau)
"label": L("mgt_srtkenmerk_nmax"),
"typ": "number"
},
"domain": {
"attributedomain": {
"dbs": "fac_kenmerkdomein_key",
"label": L("mgt_kenmerkdomein_key"),
"typ": "key",
@@ -156,7 +157,7 @@ function model_alg_kenmerk(niveau)
this.REST_DELETE = generic_REST_DELETE(this);
function get_onrgoed_naam(niveau)
function get_real_estate_name(niveau)
{
var naam = "";
switch (niveau)
@@ -171,5 +172,13 @@ function model_alg_kenmerk(niveau)
return naam;
}
function fill_real_estate_level_LOV()
{
return "D;"+L("lcl_district")
+ ";L;"+L("lcl_location")
+ ";G;"+L("lcl_building")
+ ";R;"+L("lcl_room"); // Moet hier T en V ook nog bij?
}
}
%>

View File

@@ -15,10 +15,11 @@
function model_alg_srtgebouw()
{
var tab_key = getQParamInt("alg_srtgebouw_key", -1);
this.records_name = "alg_buildingfunctions";
this.record_name = "alg_buildingfunction";
this.table = "alg_srtgebouw";
this.primary = "alg_srtgebouw_key";
this.records_name = "alg_srtgebouws";
this.record_name = "alg_srtgebouw";
this.soft_delete = "alg_srtgebouw_verwijder";
this.autfunction = "WEB_ALGMSU";
this.record_title = L("alg_srtgebouw");
@@ -28,7 +29,7 @@ function model_alg_srtgebouw()
this.fields = {
"id": {
"dbs": "alg_srtgebouw_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",

View File

@@ -14,10 +14,10 @@
<%
function model_alg_srtterreinsector()
{
this.records_name = "alg_terrainfunctions";
this.record_name = "alg_terrainfunction";
this.table = "alg_srtterreinsector";
this.primary = "alg_srtterreinsector_key";
this.records_name = "alg_srtterreinsectors";
this.record_name = "alg_srtterreinsector";
this.soft_delete = "alg_srtterreinsector_verwijder";
this.autfunction = "WEB_ALGMSU";
this.record_title = L("alg_srtterreinsector");
@@ -27,7 +27,7 @@ function model_alg_srtterreinsector()
this.fields = {
"id": {
"dbs": "alg_srtterreinsector_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -40,31 +40,31 @@ function model_alg_srtterreinsector()
"translate": true,
"required": true
},
"price_1": {
"price1": {
"dbs": "alg_srtterreinsector_prijs",
"label": L("alg_srtterreinsector_prijs"),
"iscurrency": true,
"typ": "float"
},
"price_2": {
"price2": {
"dbs": "alg_srtterreinsector_prijs2",
"label": L("alg_srtterreinsector_prijs2"),
"iscurrency": true,
"typ": "float"
},
"price_3": {
"price3": {
"dbs": "alg_srtterreinsector_prijs3",
"label": L("alg_srtterreinsector_prijs3"),
"iscurrency": true,
"typ": "float"
},
"price_4": {
"price4": {
"dbs": "alg_srtterreinsector_prijs4",
"label": L("alg_srtterreinsector_prijs4"),
"iscurrency": true,
"typ": "float"
},
"price_5": {
"price5": {
"dbs": "alg_srtterreinsector_prijs5",
"label": L("alg_srtterreinsector_prijs5"),
"iscurrency": true,

View File

@@ -35,10 +35,10 @@ function model_bes_discipline(disc_key, params)
_model_bes_discipline = // Internal only
{
"records_name": "orderdisciplines",
"record_name": "orderdiscipline",
"table": "ins_tab_discipline",
"primary": "ins_discipline_key",
"records_name": "bes_disciplines",
"record_name": "bes_discipline",
"soft_delete": "ins_discipline_verwijder",
"autfunction": "WEB_BESMSU",
"record_title": L("bes_discipline"),
@@ -48,13 +48,13 @@ _model_bes_discipline = // Internal only
"fields": {
"id": {
"dbs": "ins_discipline_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "ins_s_ins_discipline_key"
},
"ins_discipline_module": {
"module": {
"dbs": "ins_discipline_module",
"label": L("ins_discipline_module"),
"typ": "varchar",
@@ -76,23 +76,23 @@ _model_bes_discipline = // Internal only
"foreign": "prs_kostensoort",
"LOVinit": ""
},
"ins_discipline_kpnverplicht": {
"costcentremadatory": {
"dbs": "ins_discipline_kpnverplicht",
"label": L("ins_discipline_kpnverplicht"),
"typ": "check"
},
"ins_discipline_opmerking": {
"remark": {
"dbs": "ins_discipline_opmerking",
"label": L("ins_discipline_opmerking"),
"typ": "memo",
"translate": true
},
"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"

View File

@@ -15,10 +15,10 @@
function model_bes_disciplineprod()
{
this.records_name = "ordercatalogues";
this.record_name = "ordercatalogue";
this.table = "ins_tab_discipline";
this.primary = "ins_discipline_key";
this.records_name = "ins_tab_disciplines";
this.record_name = "ins_tab_discipline";
this.autfunction = "WEB_PRDMSU";
this.record_title = L("ins_tab_discipline");
this.records_title = L("ins_tab_discipline_m");
@@ -27,7 +27,7 @@ function model_bes_disciplineprod()
this.fields = {
"id": {
"dbs": "ins_discipline_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",

View File

@@ -15,10 +15,10 @@
function model_bes_grootheid()
{
this.records_name = "units";
this.record_name = "unit";
this.table = "bes_grootheid";
this.primary = "bes_grootheid_key";
this.records_name = "bes_grootheids";
this.record_name = "bes_grootheid";
this.soft_delete = "bes_grootheid_verwijder";
this.autfunction = "WEB_PRDMSU";
this.record_title = L("bes_grootheid");
@@ -28,7 +28,7 @@ function model_bes_grootheid()
this.fields = {
"id": {
"dbs": "bes_grootheid_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",

View File

@@ -15,10 +15,10 @@
function model_bes_kenmerk()
{
this.records_name = "orderlineproperties";
this.record_name = "orderlineproperty";
this.table = "bes_kenmerk";
this.primary = "bes_kenmerk_key";
this.records_name = "bes_kenmerks";
this.record_name = "bes_kenmerk";
this.soft_delete = "bes_kenmerk_verwijder";
this.autfunction = "WEB_BESMGT";
this.record_title = L("bes_kenmerk");
@@ -28,16 +28,16 @@ function model_bes_kenmerk()
this.fields = {
"id": {
"dbs": "bes_kenmerk_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "bes_s_bes_kenmerk_key",
"defaultvalue": null
},
"catalogue_key": {
"orderdiscipline": {
"dbs": "bes_srtinstallatie_key",
"label": "bes_srtinstallatie_key",
"label": L("bes_ins_discipline_key"),
"typ": "key",
"hidden_fld": true,
"foreign": {
@@ -47,7 +47,7 @@ function model_bes_kenmerk()
},
"filter": "exact"
},
"property_key": {
"propertytype": {
"dbs": "bes_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -67,7 +67,7 @@ function model_bes_kenmerk()
"LOVinit": "",
"friendlyname": true
},
"article_catalogue": {
"articlecatalogue": {
"dbs": "bes_kenmerkbestelregel.ins_discipline_key",
"label": L("bes_ins_discipline_key"),
"typ": "key",
@@ -79,7 +79,7 @@ function model_bes_kenmerk()
"desc": "ins_discipline_omschrijving"
}
},
"article_group": {
"articlegroup": {
"dbs": "bes_kenmerkbestelregel.bes_srtgroep_key",
"label": L("bes_srtgroep"),
"typ": "key",
@@ -110,7 +110,7 @@ function model_bes_kenmerk()
"emptyoption": null,
"defaultvalue": "D"
},
"order_type": {
"attributetype": {
"dbs": "bes_kenmerk_type",
"label": L("bes_kenmerk_type"),
"typ": "varchar",
@@ -123,14 +123,14 @@ function model_bes_kenmerk()
"typ": "number",
"required": true
},
"property_required": {
"required": {
"dbs": "bes_kenmerk_verplicht",
"label": L("mgt_kenmerk_verplicht"),
"typ": "key",
"LOV": buildVerplichtingList(),
"emptyoption": null
},
"property_group": {
"group": {
"dbs": "bes_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -138,18 +138,18 @@ function model_bes_kenmerk()
"LOV": buildGroepsverplichtingList(),
"emptyoption": null
},
"property_readonly": {
"readonly": {
"dbs": "bes_kenmerk_toonbaar",
"label": L("mgt_kenmerk_toonbaar"),
"typ": "check"
},
"property_default": {
"default": {
"dbs": "bes_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
"translate": true
},
"property_hint": {
"hint": {
"dbs": "bes_kenmerk_hint",
"label": L("mgt_kenmerk_hint"),
"typ": "varchar",
@@ -157,7 +157,7 @@ function model_bes_kenmerk()
"filter": "like",
"defaultvalue": null
},
"property_regexp": {
"regexp": {
"dbs": "bes_kenmerk_regexp",
"label": L("mgt_kenmerk_regexp"),
"typ": "varchar"

View File

@@ -15,10 +15,10 @@
function model_bes_kenmerkbestel()
{
this.records_name = "orderproperties";
this.record_name = "orderproperty";
this.table = "bes_kenmerk";
this.primary = "bes_kenmerk_key";
this.records_name = "bes_kenmerks";
this.record_name = "bes_kenmerk";
this.soft_delete = "bes_kenmerk_verwijder";
this.autfunction = "WEB_BESMGT";
this.record_title = L("bes_kenmerkbestel");
@@ -28,14 +28,14 @@ function model_bes_kenmerkbestel()
this.fields = {
"id": {
"dbs": "bes_kenmerk_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "bes_s_bes_kenmerk_key",
"defaultvalue": null
},
"catalogue": {
"orderdiscipline": {
"dbs": "bes_srtinstallatie_key",
"label": L("bes_ins_discipline_key"),
"typ": "key",
@@ -49,7 +49,7 @@ function model_bes_kenmerkbestel()
"LOVinit": "",
"defaultvalue": null
},
"property_key": {
"propertytype": {
"dbs": "bes_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -76,7 +76,7 @@ function model_bes_kenmerkbestel()
"hidden_fld": true,
"defaultvalue": "D"
},
"order_type": {
"attributetype": {
"dbs": "bes_kenmerk_type",
"label": L("bes_kenmerk_type"),
"typ": "varchar",
@@ -89,14 +89,14 @@ function model_bes_kenmerkbestel()
"typ": "number",
"required": true
},
"property_required": {
"required": {
"dbs": "bes_kenmerk_verplicht",
"label": L("mgt_kenmerk_verplicht"),
"typ": "key",
"LOV": buildVerplichtingList(),
"emptyoption": null
},
"property_group": {
"group": {
"dbs": "bes_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -104,24 +104,24 @@ function model_bes_kenmerkbestel()
"LOV": buildGroepsverplichtingList(),
"emptyoption": null
},
"property_readonly": {
"readonly": {
"dbs": "bes_kenmerk_toonbaar",
"label": L("mgt_kenmerk_toonbaar"),
"typ": "check"
},
"property_default": {
"default": {
"dbs": "bes_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
"translate": true
},
"property_hint": {
"hint": {
"dbs": "bes_kenmerk_hint",
"label": L("mgt_kenmerk_hint"),
"typ": "memo",
"translate": true
},
"property_regexp": {
"regexp": {
"dbs": "bes_kenmerk_regexp",
"label": L("mgt_kenmerk_regexp"),
"typ": "varchar"

View File

@@ -15,10 +15,10 @@
function model_bes_srtgroep()
{
this.table = "bes_srtgroep";
this.primary = "bes_srtgroep_key";
this.records_name = "bes_srtgroeps";
this.record_name = "bes_srtgroep";
this.table = "bes_srtgroep";
this.primary = "bes_srtgroep_key";
this.soft_delete = "bes_srtgroep_verwijder";
this.autfunction = "WEB_BESMSU";
this.record_title = L("bes_srtgroep");
@@ -28,14 +28,14 @@ function model_bes_srtgroep()
this.fields = {
"id": {
"dbs": "bes_srtgroep_key",
"label": "Key",
"label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "bes_s_bes_srtgroep_key",
"defaultvalue": null
},
"catalogue": {
"orderdisciplines": {
"dbs": "ins_discipline_key",
"label": L("bes_ins_discipline_key"),
"typ": "key",
@@ -61,14 +61,14 @@ function model_bes_srtgroep()
"label": L("bes_srtgroep_volgnr"),
"typ": "number"
},
"cost_category": {
"costcategory": {
"dbs": "prs_kostensoort_key",
"label": L("prs_kostensoort_key"),
"typ": "key",
"foreign": {
"tbl": "PRS_KOSTENSOORT",
"key": "PRS_KOSTENSOORT_KEY",
"desc": "PRS_KOSTENSOORT_OMS"
"tbl": "prs_kostensoort",
"key": "prs_kostensoort_key",
"desc": "prs_kostensoort_oms"
},
"LOVinit": ""
}

View File

@@ -4,13 +4,12 @@
<!-- #include file="../mgt/mgt_tools.inc" -->
<!-- #include file="../api2/model_alg_kenmerk.inc" -->
<%
var niveau = getQParam("alg_kenmerk_niveau"); // [ D | L | T | G | V | R ]
var this_model = new model_alg_kenmerk(niveau);
this_model.hook_pre_edit = function (obj, fld)
{
var kenmerktype = (obj.property_type ? obj.property_type.id : "");
fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
%>
<script type="text/javascript">
var module = "ALG";
@@ -24,33 +23,23 @@ scaffolding(this_model,
"search": {
"autosearch": true,
"filters": [
"property_type",
"attributetype",
"name"
]
},
"list": {
"columns": [
"id",
"alg_kenmerk_niveau",
"level",
"sequence",
"name",
"property_type"
"attributetype"
]
},
"edit": {
"requires": { js: ["./mgt_srtkenmerk.js"] }
},
"print": {},
"transit": { "alg_kenmerk_niveau": niveau }
"transit": { "level": niveau }
});
function fill_og_niveau_LOV()
{
return "D;"+L("lcl_district")
+ ";L;"+L("lcl_location")
+ ";G;"+L("lcl_building")
+ ";R;"+L("lcl_room"); // Moet hier T en V ook nog bij?
}
%>

View File

@@ -15,7 +15,7 @@ scaffolding(this_model,
"columns": [
"id",
"name",
"price_1",
"price1",
"rentable",
"code"
]

View File

@@ -7,7 +7,7 @@ function pre_submit()
{
var validation_message = "";
var kto_perc = $("#ins_discipline_ktopercentage").val();
var kto_perc = $("#satisfactionpercentage").val();
var herfiat_perc = $("#herfiatpct").val();
var herfiat_marge = $("#herfiatmarge").val();
var herfiat = $("#herfiat").val();

View File

@@ -25,13 +25,13 @@ this_model.hook_pre_post = function (params, jsondata)
var checkdata = { module: "bes",
srtkenmerk: true,
key: jsondata.property_key,
value: jsondata.property_default
value: jsondata.default
};
checkSrtkenmerkValue(checkdata);
if (checkdata.err != "")
abort_with_warning(checkdata.err);
jsondata.property_default = checkdata.value;
jsondata.default = checkdata.value;
}
@@ -54,7 +54,7 @@ scaffolding(this_model,
"article_catalogue",
"article_group",
"article",
"property_required"
"required"
]
},
"edit": {

View File

@@ -8,7 +8,7 @@ function init_srtinstallatie()
$("#article_group").change(function() {change_article_group(); });
var srtinstallatie_key = $("#catalogue_key").val();
var srtinstallatie_key = $("#orderdiscipline").val();
if (!srtinstallatie_key)
{
change_article_catalogue();
@@ -16,8 +16,8 @@ function init_srtinstallatie()
}
else
{
var discipline_key = $("#article_catalogue").val();
var srtgroep_key = $("#article_group").val();
var discipline_key = $("#articlecatalogue").val();
var srtgroep_key = $("#articlegroup").val();
var srtdeel_key = $("#article").val();
var niveau = $("#level").val();
if (niveau == "D")
@@ -43,7 +43,7 @@ function change_article_catalogue(srtgroep_key)
process_info({niveau:"G",lov:[]});
process_info({niveau:"S",lov:[]});
var discipline_key = $("#article_catalogue").val();
var discipline_key = $("#articlecatalogue").val();
fill_srtgroep(discipline_key);
}
@@ -51,8 +51,8 @@ function change_article_group(srtdeel_key)
{
process_info({niveau:"S",lov:[]});
var discipline_key = $("#article_catalogue").val();
var srtgroep_key = $("#article_group").val();
var discipline_key = $("#articlecatalogue").val();
var srtgroep_key = $("#articlegroup").val();
fill_srtdeel(discipline_key, srtgroep_key);
}
@@ -87,7 +87,7 @@ function fill_srtdeel(discipline_key, srtgroep_key, srtdeel_key)
function process_info(data)
{
var select = (data.niveau=="G" ? $("#article_group") : $("#article"));
var select = (data.niveau=="G" ? $("#articlegroup") : $("#article"));
var sel_key = -1;
var new_lov = '<option value="-1" ></option>';
@@ -113,8 +113,8 @@ function process_info(data)
function pre_submit()
{
var bes_kenmerk_key = $("#id").val();
var discipline_key = $("#article_catalogue").val();
var srtgroep_key = $("#article_group").val();
var discipline_key = $("#articlecatalogue").val();
var srtgroep_key = $("#articlegroup").val();
var srtdeel_key = $("#article").val();
if (bes_kenmerk_key)
@@ -122,17 +122,17 @@ function pre_submit()
if (srtdeel_key != -1)
{
$("#level").val("S");
$("#catalogue_key").val(srtdeel_key);
$("#orderdiscipline").val(srtdeel_key);
}
else if (srtgroep_key != -1)
{
$("#level").val("G");
$("#catalogue_key").val(srtgroep_key);
$("#orderdiscipline").val(srtgroep_key);
}
else
{
$("#level").val("D");
$("#catalogue_key").val(discipline_key);
$("#orderdiscipline").val(discipline_key);
}
}
return true;

View File

@@ -22,7 +22,10 @@
var table = getQParam("table").toUpperCase();
var model = model_generic(table, "WEB_FACFAC");
var params = { "transit": { "table": table },
if (mode == "show")
delete model.soft_delete;
var params = { "transit": { "table": table },
"show": {} // zodat je kunt doorklikken
};