From fb441b1705f9e3bd53cdf76b56c7b529ac51a3e8 Mon Sep 17 00:00:00 2001 From: Erik Groener Date: Tue, 28 Feb 2017 15:31:59 +0000 Subject: [PATCH] FSN#39312 Verder ontsluiten van modellen via de API svn path=/Website/trunk/; revision=32984 --- APPL/API2/api2_dispatch.inc | 175 ++++++++--------- APPL/API2/model_bgt_budget.inc | 34 ++-- APPL/API2/model_bgt_disc_params.inc | 4 +- APPL/API2/model_bgt_kostenrubriek.inc | 6 +- APPL/API2/model_bgt_project.inc | 10 +- APPL/API2/model_custom_fields.inc | 71 ++++--- APPL/API2/model_fac_gebruikersgroep.inc | 8 +- ...el_tracking.inc => model_fac_tracking.inc} | 50 +++-- APPL/API2/model_ins_discipline.inc | 2 +- APPL/API2/model_ins_tab_discipline.inc | 4 +- APPL/API2/model_prs_kostencombinatie.inc | 33 ++-- APPL/API2/model_prs_kostensoort.inc | 39 ++-- APPL/API2/model_prs_kostensoortgrp.inc | 8 +- ...odel_persons.inc => model_prs_perslid.inc} | 172 +++++++++++++---- APPL/API2/model_prs_staffel.inc | 8 +- APPL/API2/model_res_activiteit.inc | 32 ++-- APPL/API2/model_res_activiteit_discipline.inc | 33 ++-- APPL/API2/model_res_alg_ruimte.inc | 27 ++- APPL/API2/model_res_artikel.inc | 45 +++-- APPL/API2/model_res_cyclus.inc | 6 +- APPL/API2/model_res_deel.inc | 39 ++-- APPL/API2/model_res_disc_params.inc | 176 +++++++++--------- APPL/API2/model_res_discipline.inc | 36 ++-- APPL/API2/model_res_opstelling.inc | 4 +- APPL/API2/model_res_ruimte_opstelling.inc | 40 ++-- APPL/API2/model_res_srtactiviteit.inc | 6 +- APPL/API2/model_res_srtartikel_onrgoed.inc | 15 +- APPL/MGT/bgt_project.asp | 4 +- APPL/MGT/ins_discipline.asp | 2 +- APPL/MGT/prs_kostencombinatie.asp | 2 +- APPL/MGT/prs_kostensoort.asp | 4 +- APPL/MGT/prs_kostensoortgrp.asp | 4 +- APPL/MGT/prs_perslid.asp | 2 +- APPL/MGT/prs_staffel.asp | 2 +- APPL/MGT/res_activiteit.asp | 6 +- APPL/MGT/res_artikel.asp | 22 +-- APPL/MGT/res_deel.asp | 12 +- APPL/MGT/res_deel.js | 22 +-- APPL/MGT/res_discipline.asp | 4 +- APPL/MGT/res_ruimte.asp | 8 +- APPL/MGT/res_srtartikel_onrgoed.asp | 14 +- 41 files changed, 687 insertions(+), 504 deletions(-) rename APPL/API2/{model_tracking.inc => model_fac_tracking.inc} (51%) rename APPL/API2/{model_persons.inc => model_prs_perslid.inc} (52%) diff --git a/APPL/API2/api2_dispatch.inc b/APPL/API2/api2_dispatch.inc index 9c701a2b7b..95ddcd700c 100644 --- a/APPL/API2/api2_dispatch.inc +++ b/APPL/API2/api2_dispatch.inc @@ -13,107 +13,112 @@ var api2_mapper = { // De 'name' moet hier gelijk zijn aan model.records_name // en die moet zo nodig eerst nog fatsoenlijk engelstalig gemaakt worden - "realestateproperties" : "appl/mgt/alg_kenmerk.asp", - "buildingfunctions" : "appl/mgt/alg_srtgebouw.asp", - "terrainfunctions" : "appl/mgt/alg_srtterreinsector.asp", - "orderdisciplines" : "appl/mgt/bes_discipline.asp", - "ordercatalogues" : "appl/mgt/bes_disciplineprod.asp", - "orderunits" : "appl/mgt/bes_grootheid.asp", - "orderlineproperties" : "appl/mgt/bes_kenmerk.asp", - "orderproperties" : "appl/mgt/bes_kenmerkbestel.asp", - "orderarticlegroups" : "appl/mgt/bes_srtgroep.asp", - "orderpropertytypes" : "appl/mgt/bes_srtkenmerk.asp", - "orderproductgroups" : "appl/mgt/bes_srtprodgroep.asp", - "pacelisttables" : "appl/mgt/bes_staffeltabel.asp", - "visitoractions" : "appl/mgt/bez_actie.asp", - "visitorproperties" : "appl/mgt/bez_kenmerk.asp", + "realestateproperties" : "appl/mgt/alg_kenmerk.asp", + "buildingfunctions" : "appl/mgt/alg_srtgebouw.asp", + "terrainfunctions" : "appl/mgt/alg_srtterreinsector.asp", + "orderdisciplines" : "appl/mgt/bes_discipline.asp", + "ordercatalogues" : "appl/mgt/bes_disciplineprod.asp", + "orderunits" : "appl/mgt/bes_grootheid.asp", + "orderlineproperties" : "appl/mgt/bes_kenmerk.asp", + "orderproperties" : "appl/mgt/bes_kenmerkbestel.asp", + "orderarticlegroups" : "appl/mgt/bes_srtgroep.asp", + "orderpropertytypes" : "appl/mgt/bes_srtkenmerk.asp", + "orderproductgroups" : "appl/mgt/bes_srtprodgroep.asp", + "pacelisttables" : "appl/mgt/bes_staffeltabel.asp", + "visitoractions" : "appl/mgt/bez_actie.asp", + "visitorproperties" : "appl/mgt/bez_kenmerk.asp", - "graphiclabels" : "appl/mgt/cad_label.asp", - "graphiclegendas" : "appl/mgt/cad_legenda.asp", - "graphiclegendavalues" : "appl/mgt/cad_legendawaarde.asp", - "graphicthemes" : "appl/mgt/cad_thema.asp", + "budget" : "appl/mgt/bgt_budget.asp", + "budgetdisciplines" : "appl/mgt/bgt_discipline.asp", + "budgetcostcategories" : "appl/mgt/bgt_kostenrubriek.asp", + "budgetprojects" : "appl/mgt/bgt_project.asp", - "contractdisciplines" : "appl/mgt/cnt_discipline.asp", - "contractproperties" : "appl/mgt/cnt_kenmerk.asp", - "contractpropertytypes" : "appl/mgt/cnt_srtkenmerk.asp", - "contractperiods" : "appl/mgt/cnt_termijn.asp", - "taskdisciplines" : "appl/mgt/ctr_discipline.asp", + "graphiclabels" : "appl/mgt/cad_label.asp", + "graphiclegendas" : "appl/mgt/cad_legenda.asp", + "graphiclegendavalues" : "appl/mgt/cad_legendawaarde.asp", + "graphicthemes" : "appl/mgt/cad_thema.asp", - "audits" : "appl/mgt/fac_audit.asp", + "contractdisciplines" : "appl/mgt/cnt_discipline.asp", + "contractproperties" : "appl/mgt/cnt_kenmerk.asp", + "contractpropertytypes" : "appl/mgt/cnt_srtkenmerk.asp", + "contractperiods" : "appl/mgt/cnt_termijn.asp", + "taskdisciplines" : "appl/mgt/ctr_discipline.asp", + + "audits" : "appl/mgt/fac_audit.asp", "xxxxxx" : "appl/mgt/fac_edit_groeprechten.asp", //? "xxxxxx" : "appl/mgt/fac_edit_groeprechten_save.asp", //? - "emailsettings" : "appl/mgt/fac_email_setting.asp", - "exportfunctions" : "appl/mgt/fac_export_app.asp", - "authorizationfunctions" : "appl/mgt/fac_functie.asp", - "authorizationgroups" : "appl/mgt/fac_groep.asp", - "authorizations" : "appl/mgt/fac_groeprechten.asp", - "identityproviders" : "appl/mgt/fac_idp.asp", - "importfunctions" : "appl/mgt/fac_import_app.asp", - "notificationjobs" : "appl/mgt/fac_notificatiejob.asp", - "profiles" : "appl/mgt/fac_profiel.asp", - "profilevalues" : "appl/mgt/fac_profielwaarde.asp", - "notificationtypes" : "appl/mgt/fac_srtnotificatie.asp", - "customgraphs" : "appl/mgt/fac_usergraph.asp", - "customtables" : "appl/mgt/fac_usrtab.asp", - "widgets" : "appl/mgt/fac_widget.asp", - "knowledgeproperties" : "appl/mgt/faq_kenmerk.asp", - "vattables" : "appl/mgt/fin_btwtabel.asp", - "invoiceproperties" : "appl/mgt/fin_kenmerk.asp", + "emailsettings" : "appl/mgt/fac_email_setting.asp", + "exportfunctions" : "appl/mgt/fac_export_app.asp", + "authorizationfunctions" : "appl/mgt/fac_functie.asp", + "authorizationgroups" : "appl/mgt/fac_groep.asp", + "authorizations" : "appl/mgt/fac_groeprechten.asp", + "identityproviders" : "appl/mgt/fac_idp.asp", + "importfunctions" : "appl/mgt/fac_import_app.asp", + "notificationjobs" : "appl/mgt/fac_notificatiejob.asp", + "profiles" : "appl/mgt/fac_profiel.asp", + "profilevalues" : "appl/mgt/fac_profielwaarde.asp", + "notificationtypes" : "appl/mgt/fac_srtnotificatie.asp", + "customgraphs" : "appl/mgt/fac_usergraph.asp", + "customtables" : "appl/mgt/fac_usrtab.asp", + "widgets" : "appl/mgt/fac_widget.asp", + "knowledgeproperties" : "appl/mgt/faq_kenmerk.asp", + "vattables" : "appl/mgt/fin_btwtabel.asp", + "invoiceproperties" : "appl/mgt/fin_kenmerk.asp", "xxxxxx" : "appl/mgt/fin_verkoopfactuur.asp", // klant specifiek ?? "xxxxxx" : "appl/mgt/generic_prs_perslid.asp", - "taskhandlings" : "appl/mgt/ins_controlemode.asp", - "objectdisciplines" : "appl/mgt/ins_discipline.asp", - "objectproperties" : "appl/mgt/ins_kenmerk.asp", - "recurringtasks" : "appl/mgt/ins_srtcontrole.asp", - "objectgroups" : "appl/mgt/ins_srtgroep.asp", - "objectpropertytypes" : "appl/mgt/ins_srtkenmerk.asp", - "alldisciplines" : "appl/mgt/ins_tab_discipline.asp", + "taskhandlings" : "appl/mgt/ins_controlemode.asp", + "objectdisciplines" : "appl/mgt/ins_discipline.asp", + "objectproperties" : "appl/mgt/ins_kenmerk.asp", + "recurringtasks" : "appl/mgt/ins_srtcontrole.asp", + "objectgroups" : "appl/mgt/ins_srtgroep.asp", + "objectpropertytypes" : "appl/mgt/ins_srtkenmerk.asp", + "alldisciplines" : "appl/mgt/ins_tab_discipline.asp", "xxxxxx" : "appl/mgt/mgt_generic.asp", - "xxxxxx" : "appl/mgt/mld_afmeldtekst.asp", - "backofficegroups" : "appl/mgt/mld_behandelgroep.asp", - "servicelevels" : "appl/mgt/mld_dienstniveau.asp", - "issuedisciplines" : "appl/mgt/mld_discipline.asp", - "unproductivetimes" : "appl/mgt/mld_impropdr.asp", - "issueproperties" : "appl/mgt/mld_kenmerk.asp", - "expenses" : "appl/mgt/mld_kosten.asp", - "callsources" : "appl/mgt/mld_meldbron.asp", - "disciplinetypes" : "appl/mgt/mld_srtdiscipline.asp", - "issuepropertytypes" : "appl/mgt/mld_srtkenmerk.asp", - "callgroups" : "appl/mgt/mld_stdmelding_groep.asp", - "xxxxxx" : "appl/mgt/mld_typeopdr.asp", - "daysoff" : "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", + "issueclosingtexts" : "appl/mgt/mld_afmeldtekst.asp", + "backofficegroups" : "appl/mgt/mld_behandelgroep.asp", + "servicelevels" : "appl/mgt/mld_dienstniveau.asp", + "issuedisciplines" : "appl/mgt/mld_discipline.asp", + "unproductivetimes" : "appl/mgt/mld_impropdr.asp", + "issueproperties" : "appl/mgt/mld_kenmerk.asp", + "expenses" : "appl/mgt/mld_kosten.asp", + "callsources" : "appl/mgt/mld_meldbron.asp", + "disciplinetypes" : "appl/mgt/mld_srtdiscipline.asp", + "issuepropertytypes" : "appl/mgt/mld_srtkenmerk.asp", + "callgroups" : "appl/mgt/mld_stdmelding_groep.asp", + "issueordertypes" : "appl/mgt/mld_typeopdr.asp", + "daysoff" : "appl/mgt/mld_vrije_dagen.asp", + "workflows" : "appl/mgt/mld_workflow.asp", + "workflowsteps" : "appl/mgt/mld_workflowstep.asp", + "workflowexpressions" : "appl/mgt/mld_workflow_expression.asp", - "pinboardcategories" : "appl/mgt/mrk_discipline.asp", + "pinboardcategories" : "appl/mgt/mrk_discipline.asp", - "services" : "appl/mgt/prs_dienst.asp", - "basisproperties" : "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", - "relationtypes" : "appl/mgt/prs_relatietype.asp", - "employeefunctions" : "appl/mgt/prs_srtperslid.asp", - "xxxxxx" : "appl/mgt/prs_staffel.asp", + "services" : "appl/mgt/prs_dienst.asp", + "basisproperties" : "appl/mgt/prs_kenmerk.asp", + "combinationvalidation" : "appl/mgt/prs_kostencombinatie.asp", + "costtypes" : "appl/mgt/prs_kostensoort.asp", + "costtypegroups" : "appl/mgt/prs_kostensoortgrp.asp", + "persons" : "appl/mgt/prs_perslid.asp", + "relationtypes" : "appl/mgt/prs_relatietype.asp", + "employeefunctions" : "appl/mgt/prs_srtperslid.asp", + "basispacelists" : "appl/mgt/prs_staffel.asp", - "xxxxxx" : "appl/mgt/res_activiteit.asp", - "xxxxxx" : "appl/mgt/res_artikel.asp", - "reservationcycles" : "appl/mgt/res_cyclus.asp", - "xxxxxx" : "appl/mgt/res_deel.asp", - "xxxxxx" : "appl/mgt/res_discipline.asp", - "bookingproperties" : "appl/mgt/res_kenmerk.asp", - "roomconfigurations" : "appl/mgt/res_opstelling.asp", - "xxxxxx" : "appl/mgt/res_ruimte.asp", - "activitytypes" : "appl/mgt/res_srtactiviteit.asp", - "articlescopes" : "appl/mgt/res_srtartikel_onrgoed.asp", - "bookingpropertytypes" : "appl/mgt/res_srtkenmerk.asp", + "bookingactivities" : "appl/mgt/res_activiteit.asp", + "bookingconsumables" : "appl/mgt/res_artikel.asp", + "bookingcycles" : "appl/mgt/res_cyclus.asp", + "bookingitems" : "appl/mgt/res_deel.asp", + "bookingdisciplines" : "appl/mgt/res_discipline.asp", + "bookingproperties" : "appl/mgt/res_kenmerk.asp", + "bookingconfigurations" : "appl/mgt/res_opstelling.asp", + "bookingrooms" : "appl/mgt/res_ruimte.asp", + "bookingactivitytypes" : "appl/mgt/res_srtactiviteit.asp", + "bookingconsumablescopes" : "appl/mgt/res_srtartikel_onrgoed.asp", + "bookingpropertytypes" : "appl/mgt/res_srtkenmerk.asp", "xxxxxx" : "appl/mgt/user_tables.asp", "xxxxxx" : "appl/mgt/workflow_graph.asp", diff --git a/APPL/API2/model_bgt_budget.inc b/APPL/API2/model_bgt_budget.inc index 0d3970b8b4..32d3eb0285 100644 --- a/APPL/API2/model_bgt_budget.inc +++ b/APPL/API2/model_bgt_budget.inc @@ -15,10 +15,10 @@ function model_bgt_budget() { + this.records_name = "budgets"; + this.record_name = "budget"; this.table = "bgt_budget"; this.primary = "bgt_budget_key"; - this.records_name = "bgt_budgets"; - this.record_name = "bgt_budget"; this.autfunction = "WEB_BGTUSE"; this.record_title = L("bgt_budget"); this.records_title = L("bgt_budget_m"); @@ -33,7 +33,7 @@ function model_bgt_budget() "filter": "exact", "seq": "bgt_s_bgt_budget_key" }, - "catalog": { + "budgetdiscipline": { "dbs": "ins_discipline_key", "label": L("bgt_discipline_omschrijving"), "typ": "key", @@ -46,7 +46,7 @@ function model_bgt_budget() "where": "ins_discipline_module = 'BGT' AND ins_discipline_verwijder IS NULL" } }, - "project": { + "budgetproject": { "dbs": "bgt_project_key", "label": L("bgt_project_omschrijving"), "typ": "key", @@ -58,7 +58,7 @@ function model_bgt_budget() "desc": "bgt_project_omschrijving" } }, - "costcategory": { + "budgetcostcategory": { "dbs": "bgt_kostenrubriek_key", "label": L("bgt_kostenrubriek_oms"), "typ": "key", @@ -84,7 +84,7 @@ function model_bgt_budget() "LOVinit": "", "filter": "exact" }, - "cost_category": { + "costtype": { "dbs": "prs_kostensoort_key", "label": L("prs_kostensoort_key"), "typ": "key", @@ -158,18 +158,18 @@ function model_bgt_budget() }; this.edit = { - "modal": true - } - this.list = { - "columns": [ - "costcategory", - "costtypegroup", - "cost_category", - "amount", - "vat" - ] + "modal": true + }; - }; + this.list = { + "columns": [ + "costcategory", + "costtypegroup", + "costtype", + "amount", + "vat" + ] + }; this.REST_GET = generic_REST_GET(this); diff --git a/APPL/API2/model_bgt_disc_params.inc b/APPL/API2/model_bgt_disc_params.inc index 09ec45d2bd..e4c598571b 100644 --- a/APPL/API2/model_bgt_disc_params.inc +++ b/APPL/API2/model_bgt_disc_params.inc @@ -14,8 +14,8 @@ <% model_bgt_disc_params = { - "records_name": "bgt_disc_params", - "record_name": "bgt_disc_params", + "records_name": "budgetdisciplineparams", + "record_name": "budgetdisciplineparam", "table": "bgt_disc_params", "primary": "bgt_disc_params_key", "autfunction": "WEB_BGTMAN", diff --git a/APPL/API2/model_bgt_kostenrubriek.inc b/APPL/API2/model_bgt_kostenrubriek.inc index 85fa91d323..9af537875f 100644 --- a/APPL/API2/model_bgt_kostenrubriek.inc +++ b/APPL/API2/model_bgt_kostenrubriek.inc @@ -16,10 +16,10 @@ function model_bgt_kostenrubriek() { + this.records_name = "budgetcostcategories"; + this.record_name = "budgetcostcategory"; this.table = "bgt_kostenrubriek"; this.primary = "bgt_kostenrubriek_key"; - this.records_name = "bgt_kostenrubrieks"; - this.record_name = "bgt_kostenrubriek"; this.autfunction = "WEB_BGTMAN"; this.record_title = L("bgt_kostenrubriek"); this.records_title = L("bgt_kostenrubriek_m"); @@ -34,7 +34,7 @@ function model_bgt_kostenrubriek() "filter": "exact", "seq": "bgt_s_bgt_kostenrubriek_key" }, - "project": { + "budgetproject": { "dbs" : "bgt_project_key", "label": L("bgt_project_omschrijving"), "typ": "key", diff --git a/APPL/API2/model_bgt_project.inc b/APPL/API2/model_bgt_project.inc index 5eb25c6b33..679af3fa44 100644 --- a/APPL/API2/model_bgt_project.inc +++ b/APPL/API2/model_bgt_project.inc @@ -16,10 +16,10 @@ function model_bgt_project() { + this.records_name = "budgetprojects"; + this.record_name = "budgetproject"; this.table = "bgt_project"; this.primary = "bgt_project_key"; - this.records_name = "bgt_projects"; - this.record_name = "bgt_project"; this.soft_delete = "bgt_project_verwijder"; this.autfunction = "WEB_BGTMAN"; this.record_title = L("bgt_project"); @@ -37,7 +37,7 @@ function model_bgt_project() "seq": "bgt_s_bgt_project_key", "defaultvalue": null }, - "catalog": { /* TODO linkt nu naar algemene discpline, moet bgt-variant in scf zijn? */ + "budgetdiscipline": { /* TODO linkt nu naar algemene discpline, moet bgt-variant in scf zijn? */ "dbs": "ins_discipline_key", "label": L("bgt_discipline_omschrijving"), "typ": "key", @@ -86,8 +86,8 @@ function model_bgt_project() // if (!S("bgt_enabled")) // { - // this.fields.catalog.hidden_fld = true - // this.fields.catalog.default_value = 1 + // this.fields.budgetdiscipline.hidden_fld = true + // this.fields.budgetdiscipline.default_value = 1 // } this.REST_GET = generic_REST_GET(this); diff --git a/APPL/API2/model_custom_fields.inc b/APPL/API2/model_custom_fields.inc index 771eccd27a..8a9b096292 100644 --- a/APPL/API2/model_custom_fields.inc +++ b/APPL/API2/model_custom_fields.inc @@ -20,12 +20,12 @@ function model_custom_fields(formodel, flexModule, flexParams) { flexParams = flexParams || {}; this.module = flexModule; + this.records_name = "customfields"; + this.record_name = "customfield"; this.table = "flex"; this.primary = "kenmerk_key"; - this.records_name = "custom_fields"; - this.record_name = "custom_field"; -// this.records_title = L("lcl_orders"); -// this.record_title = L("lcl_opdr_info"); + this.records_title = L("custom_field_m"); + this.record_title = L("custom_field"); // getSqlFlex heeft bij multi-language 'user' al nodig voor de lcl's // daarom hieronder een indirecte/ delayed fntablesql @@ -35,17 +35,44 @@ function model_custom_fields(formodel, flexModule, flexParams) return "(" + theSqlFlex + ") flex"; } - this.fields = - { "id": { dbs: "kenmerk_key", typ: "key" }, // TODO: dit klopt niet helemaal. De echte unieke waarde is bez_kenmerkwaarde_key - "value": { dbs: "waarde", typ: "varchar" }, - "type": { dbs: "kenmerktype", typ: "varchar" }, - "sequence": { dbs: "volgnummer", typ: "number" }, - "label": { dbs: "omschrijving", typ: "varchar" }, - "flexparentkey": { dbs: "flexparentkey", typ: "key" }, - // TODO: record.flexparentid wordt er uitgestript vanwege niet teruglinken naar de parent - // we hebben hem echter wel nodig. Dit moet beter.... - "xflexparentkey": { dbs: "xflexparentkey", typ: "key", sql: "flexparentkey" } - }; + this.fields = { + "id": { + "dbs": "kenmerk_key", + "label": L("lcl_key"), + "typ": "key" + }, // TODO: dit klopt niet helemaal. De echte unieke waarde is bez_kenmerkwaarde_key + "value": { + "dbs": "waarde", + "label": L("lcl_fac_value"), + "typ": "varchar" + }, + "type": { + "dbs": "kenmerktype", + "label": L("mgt_srtkenmerk_kenmerktype"), + "typ": "varchar" + }, + "sequence": { + "dbs": "volgnummer", + "label": L("mgt_kenmerk_volgnummer"), + "typ": "number" }, + "label": { + "dbs": "omschrijving", + "label": L("mgt_srtkenmerk_label"), + "typ": "varchar" + }, + "flexparentkey": { + "dbs": "flexparentkey", + "typ": "key" + }, + // TODO: record.flexparentid wordt er uitgestript vanwege niet teruglinken naar de parent + // we hebben hem echter wel nodig. Dit moet beter.... + "xflexparentkey": { + "dbs": "xflexparentkey", + "typ": "key", + "sql": "flexparentkey" + } + }; + // Deze functie wordt na de GET aangeroepen. De bijlagen zijn zo afwijkend // dat ik dat niet fatsoenlijk in 'fields' verwerkt kreeg this.post_get = function (record) @@ -110,27 +137,27 @@ function model_custom_fields(formodel, flexModule, flexParams) function set_custom_field(jsondata, kenmerk_key, val, typ) { - for (var i=0; i< jsondata.custom_fields.length; i++) + for (var i=0; i< jsondata.customfields.length; i++) { - if (jsondata.custom_fields[i].id == kenmerk_key) + if (jsondata.customfields[i].id == kenmerk_key) { - jsondata.custom_fields[i].value = val; + jsondata.customfields[i].value = val; return; // direct klaar } } if (!typ) abort_with_warning("Cannot set_custom_field key '{0}' without type".format(kenmerk_key)); - jsondata.custom_fields.push({ id: kenmerk_key, value: val, type: typ }); + jsondata.customfields.push({ id: kenmerk_key, value: val, type: typ }); } function get_custom_field(jsondata, kenmerk_key) { - for (var i=0; i< jsondata.custom_fields.length; i++) + for (var i=0; i< jsondata.customfields.length; i++) { - if (jsondata.custom_fields[i].id == kenmerk_key) + if (jsondata.customfields[i].id == kenmerk_key) { - return jsondata.custom_fields[i].value; // direct klaar + return jsondata.customfields[i].value; // direct klaar } } return null; diff --git a/APPL/API2/model_fac_gebruikersgroep.inc b/APPL/API2/model_fac_gebruikersgroep.inc index 7ababe6b58..0cb7d6630a 100644 --- a/APPL/API2/model_fac_gebruikersgroep.inc +++ b/APPL/API2/model_fac_gebruikersgroep.inc @@ -45,14 +45,14 @@ function model_fac_gebruikersgroep() "key": "fac_groep_key", "desc": "fac_groep_omschrijving" }, - "uniquewith": "user" + "uniquewith": "person" }, - "user": { + "person": { "dbs": "prs_perslid_key", "label": L("prs_perslid"), "typ": "key", "required": true, - "foreign": "PRS_PERSLID", + "foreign": "prs_perslid", "uniquewith": "authorizationgroup" } }; @@ -61,7 +61,7 @@ function model_fac_gebruikersgroep() "columns": [ //"id", "authorizationgroup", - "user" + "person" ] }; this.edit = { diff --git a/APPL/API2/model_tracking.inc b/APPL/API2/model_fac_tracking.inc similarity index 51% rename from APPL/API2/model_tracking.inc rename to APPL/API2/model_fac_tracking.inc index b8fe01e371..fdbf48bd8b 100644 --- a/APPL/API2/model_tracking.inc +++ b/APPL/API2/model_fac_tracking.inc @@ -16,10 +16,12 @@ <% function model_tracking(xmlnodes) { + this.records_name = "trackings"; + this.record_name = "tracking"; this.table = "fac_tracking"; this.primary = "fac_tracking_key"; - this.records_name = "tracking"; - this.record_name = "tracking"; + this.records_title = L("fac_tracking_m"); + this.record_title = L("fac_tracking"); this.xmlnodes = xmlnodes; this.tablesql = "(SELECT fac_tracking_key," @@ -34,15 +36,41 @@ function model_tracking(xmlnodes) + " AND fs.fac_srtnotificatie_xmlnode IN (" + safe.quoted_sql_join(xmlnodes) + ")) " + " fac_tracking"; - this.fields = - { "id": { dbs: "fac_tracking_key", typ: "key" }, - "notification": { dbs: "fac_srtnotificatie_key", typ: "key", foreign: "fac_srtnotificatie" }, - "date": { dbs: "fac_tracking_datum", typ: "datetime" }, - "description": { dbs: "fac_tracking_oms", typ: "varchar" }, - "person": { dbs: "prs_perslid_key", typ: "varchar", foreign: "prs_perslid" }, - "fac_tracking_refkey": { dbs: "fac_tracking_refkey", typ: "key" } - }; - this.list = { columns: ["id", "date", "notification", "description", "person"] } + this.fields = { + "id": { + "dbs": "fac_tracking_key", + "label": L("lcl_key"), + "typ": "key" + }, + "notificationtype": { + "dbs": "fac_srtnotificatie_key", + "label": L("fac_srtnotificatie"), + "typ": "key", + "foreign": "fac_srtnotificatie" + }, + "date": { + "dbs": "fac_tracking_datum", + "label": L("lcl_date"), + "typ": "datetime" + }, + "description": { + "dbs": "fac_tracking_oms", + "label": L("lcl_descr"), + "typ": "varchar" + }, + "person": { + "dbs": "prs_perslid_key", + "label": L("prs_perslid"), + "typ": "varchar", + "foreign": "prs_perslid" + }, + "fac_tracking_refkey": { + "dbs": "fac_tracking_refkey", + "label": L("lcl_reference"), + "typ": "key" + } + }; + this.list = { columns: ["id", "date", "notificationtype", "description", "person"] } // Merk op: géén eigen REST_GET // We kunnen alleen via een include van een parent die dan ook diff --git a/APPL/API2/model_ins_discipline.inc b/APPL/API2/model_ins_discipline.inc index f402b946ca..4d6bb1131c 100644 --- a/APPL/API2/model_ins_discipline.inc +++ b/APPL/API2/model_ins_discipline.inc @@ -60,7 +60,7 @@ _model_ins_discipline = // Internal only "translate": true, "required": true }, - "minimumlevel": { + "scope": { "dbs": "ins_discipline_min_level", "label": L("ins_discipline_minlevel"), "typ": "key", diff --git a/APPL/API2/model_ins_tab_discipline.inc b/APPL/API2/model_ins_tab_discipline.inc index 86300f8320..195a1f8cb2 100644 --- a/APPL/API2/model_ins_tab_discipline.inc +++ b/APPL/API2/model_ins_tab_discipline.inc @@ -53,7 +53,7 @@ function model_ins_tab_discipline(disc_key, params) "desc": "ins_srtdiscipline_omschrijving" } }, - "disciplinelevel": { + "scope": { "dbs": "ins_discipline_min_level", "label": L("ins_discipline_min_level"), "typ": "key", @@ -106,7 +106,7 @@ function model_ins_tab_discipline(disc_key, params) this.list = { "columns": [ "id", - "disciplinelevel", + "scope", "name", "costtype", "sequence" diff --git a/APPL/API2/model_prs_kostencombinatie.inc b/APPL/API2/model_prs_kostencombinatie.inc index b85f7549a4..3734f9690c 100644 --- a/APPL/API2/model_prs_kostencombinatie.inc +++ b/APPL/API2/model_prs_kostencombinatie.inc @@ -12,13 +12,15 @@ */ %> <% +var costtype_search = getQParam("_name", ""); +costtype_search = "%" + costtype_search.toUpperCase() + "%"; function model_prs_kostencombinatie() { + this.records_name = "costcombinations"; + this.record_name = "costcombination"; this.table = "prs_kostencombinatie"; this.primary = "prs_kostencombinatie_key"; - this.records_name = "prs_kostencombinaties"; - this.record_name = "prs_kostencombinatie"; this.autfunction = "WEB_FINMSU"; this.record_title = L("prs_kostencombinatie"); this.records_title = L("prs_kostencombinatie_m"); @@ -27,7 +29,7 @@ function model_prs_kostencombinatie() this.fields = { "id": { "dbs": "prs_kostencombinatie_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", @@ -35,21 +37,17 @@ function model_prs_kostencombinatie() }, "_name": { // Wordt gebruikt om op omschrijving van kostensoort te kunnen zoeken, ipv een listbox "dbs": "costtype.prs_kostensoort_oms", - "label": L("prs_kostensoort_key"), + "label": L("prs_kostensoort_key")+"/"+L("prs_kostensoort_oms"), "typ": "varchar", "hidden_fld": true, "filter": "like" }, - "category": { + "costtype": { "dbs": "prs_kostensoort_key", "label": L("prs_kostensoort_key"), "typ": "key", "required": true, - "foreign": { - "tbl": "PRS_KOSTENSOORT", - "key": "PRS_KOSTENSOORT_KEY", - "desc": "PRS_KOSTENSOORT_OMS" - } + "foreign": "prs_kostensoort" }, "group": { "dbs": "prs_kostenplaatsgrp_key", @@ -57,9 +55,9 @@ function model_prs_kostencombinatie() "typ": "key", "required": true, "foreign": { - "tbl": "PRS_KOSTENPLAATSGRP", - "key": "PRS_KOSTENPLAATSGRP_KEY", - "desc": "PRS_KOSTENPLAATSGRP_OMS" + "tbl": "prs_kostenplaatsgrp", + "key": "prs_kostenplaatsgrp_key", + "desc": "prs_kostenplaatsgrp_oms" } } }; @@ -67,13 +65,20 @@ function model_prs_kostencombinatie() var ext_sql = "(SELECT prs_kostensoort_key" + " , prs_kostensoort_oms" + + " , prs_kostensoort_refcode" + " FROM prs_kostensoort" + ") costtype"; + this.REST_GET = generic_REST_GET(this, { "GET": { "tables": [ext_sql], - "wheres": ["costtype.prs_kostensoort_key = prs_kostencombinatie.prs_kostensoort_key"] + "wheres": ["costtype.prs_kostensoort_key = prs_kostencombinatie.prs_kostensoort_key", + "( UPPER(costtype.prs_kostensoort_oms) LIKE " + safe.quoted_sql(costtype_search) + + "OR UPPER(costtype.prs_kostensoort_refcode) LIKE " + safe.quoted_sql(costtype_search) + + ")" + ] } + }); this.REST_POST = generic_REST_POST(this); diff --git a/APPL/API2/model_prs_kostensoort.inc b/APPL/API2/model_prs_kostensoort.inc index f77b5253ff..2b88912595 100644 --- a/APPL/API2/model_prs_kostensoort.inc +++ b/APPL/API2/model_prs_kostensoort.inc @@ -14,10 +14,10 @@ function model_prs_kostensoort() { + this.records_name = "costtypes"; + this.record_name = "costtype"; this.table = "prs_kostensoort"; this.primary = "prs_kostensoort_key"; - this.records_name = "prs_kostensoorts"; - this.record_name = "prs_kostensoort"; this.autfunction = "WEB_FINMSU"; this.record_title = L("prs_kostensoort"); this.records_title = L("prs_kostensoort_m"); @@ -26,23 +26,23 @@ function model_prs_kostensoort() this.fields = { "id": { "dbs": "prs_kostensoort_key", - "hidden_fld": true, - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, + "hidden_fld": true, "filter": "exact", "seq": "prs_s_prs_kostensoort_key" }, - "group": { + "costtypegroup": { "dbs": "prs_kostensoortgrp_key", "label": L("prs_kostensoortgrp_key"), "required": true, //"insertonly" : true, "typ": "key", "foreign": { - "tbl": "PRS_KOSTENSOORTGRP", - "key": "PRS_KOSTENSOORTGRP_KEY", - "desc": "PRS_KOSTENSOORTGRP_OMS" + "tbl": "prs_kostensoortgrp", + "key": "prs_kostensoortgrp_key", + "desc": "prs_kostensoortgrp_oms" }, "LOVinit": "", "filter": "exact", @@ -94,21 +94,24 @@ function model_prs_kostensoort() "label": L("prs_kostenplaats_key"), "typ": "key", "foreign": { - "tbl": "PRS_KOSTENPLAATS", - "key": "PRS_KOSTENPLAATS_KEY", - "desc": "PRS_KOSTENPLAATS_NR" + "tbl": "prs_kostenplaats", + "key": "prs_kostenplaats_key", + "desc": "prs_kostenplaats_nr" }, "multiedit": true } }; - this.includes = { - "budget": { - "model": new model_bgt_budget(), - "joinfield": "cost_category", - "enable_update": true - } - }; + if (S("bgt_enabled")) + { + this.includes = { + "budget": { + "model": new model_bgt_budget(), + "joinfield": "budgetcostcategory", + "enable_update": true + } + }; + } this.REST_GET = generic_REST_GET(this); this.REST_POST = generic_REST_POST(this); diff --git a/APPL/API2/model_prs_kostensoortgrp.inc b/APPL/API2/model_prs_kostensoortgrp.inc index 83ec921719..04321c963b 100644 --- a/APPL/API2/model_prs_kostensoortgrp.inc +++ b/APPL/API2/model_prs_kostensoortgrp.inc @@ -16,10 +16,10 @@ function model_prs_kostensoortgrp() { + this.records_name = "costtypegroups"; + this.record_name = "costtypegroup"; this.table = "prs_kostensoortgrp"; this.primary = "prs_kostensoortgrp_key"; - this.records_name = "prs_kostensoortgrps"; - this.record_name = "prs_kostensoortgrp"; this.autfunction = "WEB_FINMSU"; this.record_title = L("prs_kostensoortgrp"); this.records_title = L("prs_kostensoortgrp_m"); @@ -28,14 +28,14 @@ function model_prs_kostensoortgrp() this.fields = { "id": { "dbs": "prs_kostensoortgrp_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "hidden_fld": true, "required": true, "filter": "exact", "seq": "prs_s_prs_kostensoortgrp_key" }, - "rubriek": { + "budgetcostcategory": { "dbs" : "bgt_kostenrubriek_key", "label": L("bgt_kostenrubriek"), "typ": "key", diff --git a/APPL/API2/model_persons.inc b/APPL/API2/model_prs_perslid.inc similarity index 52% rename from APPL/API2/model_persons.inc rename to APPL/API2/model_prs_perslid.inc index c4c5028579..8a7cc4c7c6 100644 --- a/APPL/API2/model_persons.inc +++ b/APPL/API2/model_prs_perslid.inc @@ -15,7 +15,7 @@ %> - + <% @@ -35,55 +35,161 @@ function genderLOV() function model_persons() { - this.table = "prs_perslid"; - this.primary = "prs_perslid_key"; this.records_name = "persons"; this.record_name = "person"; + this.table = "prs_perslid"; + this.primary = "prs_perslid_key"; this.record_title = L("prs_perslid"); this.records_title = L("prs_perslid_m"); + this.fields = { - "id" : { dbs: "prs_perslid_key", "label": "Key", typ: "key", filter: "exact"}, - "name" : { dbs: "pf.prs_perslid_naam_friendly", "label": L("lcl_prs_person_name"), typ: "varchar" }, - "lastname" : { - dbs: "prs_perslid_naam", - label: L("lcl_prs_person_achternaam"), - typ: "varchar", - filter: "like"}, - "firstname" : { dbs: "prs_perslid_voornaam", "label": L("lcl_prs_person_voornaam"), typ: "varchar", filter: "like"}, - "title" : { dbs: "prs_perslid_titel", "label": L("lcl_prs_person_title"), typ: "varchar" }, - "initials" : { dbs: "prs_perslid_voorletters", "label": L("lcl_prs_person_initials"), typ: "varchar" }, - "prefix" : { dbs: "prs_perslid_tussenvoegsel", "label": L("lcl_prs_person_tussen"), typ: "varchar" }, - "gender" : { dbs: "prs_perslid_geslacht", "label": L("lcl_prs_person_geslacht"), typ: "varchar", LOV: genderLOV() }, - "language" : { dbs: "prs_perslid_lang", "label": L("lcl_lcl_taal"), typ: "varchar" }, - "phone" : { dbs: "prs_perslid_telefoonnr", "label": L("lcl_prs_person_phone"), typ: "varchar" }, - "mobile" : { dbs: "prs_perslid_mobiel", "label": L("lcl_prs_person_mobile"), typ: "varchar" }, - "email" : { dbs: "prs_perslid_email", "label": L("lcl_prs_person_email"), typ: "varchar", filter: "exact"}, - "login" : { dbs: "prs_perslid_oslogin", "label": L("lcl_prs_person_login"), typ: "varchar", filter: "like"}, - "employment": { dbs: "prs_perslid_dienstverband", "label": L("lcl_prs_person_dienstverband"), typ: "float" }, - "startdate" : { dbs: "prs_perslid_ingangsdatum", "label": L("lcl_prs_person_ingangsdatum"), typ: "date" }, - "enddate" : { dbs: "prs_perslid_einddatum", "label": L("lcl_prs_person_einddatum"), typ: "date" }, - "function" : { dbs: "prs_srtperslid_key", "label": L("lcl_prs_person_function"), typ: "key", foreign: { tbl: "prs_srtperslid", key: "prs_srtperslid_key", desc: "prs_srtperslid_omschrijving"} }, - "department": { dbs: "prs_afdeling_key", "label": L("lcl_prs_organisatie"), typ: "key", foreign: "prs_afdeling"}, - "company" : { dbs: "pa.prs_bedrijf_key", "label": L("lcl_prs_company"), typ: "key", foreign: "prs_bedrijf"}, - "location" : { dbs: "wg.alg_locatie_key", "label": L("lcl_location"), typ: "key", foreign: "alg_locatie", filter: "exact"}, - "building" : { dbs: "wg.alg_gebouw_key", "label": L("lcl_building"), typ: "key", foreign: "alg_gebouw" }, - "floor" : { dbs: "wg.alg_verdieping_key", "label": L("lcl_floor"), typ: "key", foreign: "alg_verdieping" }, - "room" : { dbs: "wg.alg_ruimte_key", "label": L("lcl_room"), typ: "key", foreign: "alg_ruimte" } + "id": { + "dbs": "prs_perslid_key", + "label": L("lcl_key"), + "typ": "key", + "filter": "exact" + }, + "name": { + "dbs": "pf.prs_perslid_naam_friendly", + "label": L("lcl_prs_person_name"), + " typ": "varchar" + }, + "lastname": { + "dbs": "prs_perslid_naam", + "label": L("lcl_prs_person_achternaam"), + "typ": "varchar", + "filter": "like" + }, + "firstname": { + "dbs": "prs_perslid_voornaam", + "label": L("lcl_prs_person_voornaam"), + "typ": "varchar", + "filter": "like" + }, + "title": { + "dbs": "prs_perslid_titel", + "label": L("lcl_prs_person_title"), + "typ": "varchar" + }, + "initials": { + "dbs": "prs_perslid_voorletters", + "label": L("lcl_prs_person_initials"), + "typ": "varchar" + }, + "prefix": { + "dbs": "prs_perslid_tussenvoegsel", + "label": L("lcl_prs_person_tussen"), + "typ": "varchar" + }, + "gender": { + "dbs": "prs_perslid_geslacht", + "label": L("lcl_prs_person_geslacht"), + "typ": "varchar", + "LOV": genderLOV() + }, + "language": { + "dbs": "prs_perslid_lang", + "label": L("lcl_lcl_taal"), + "typ": "varchar" + }, + "phone": { + "dbs": "prs_perslid_telefoonnr", + "label": L("lcl_prs_person_phone"), + "typ": "varchar" + }, + "mobile": { + "dbs": "prs_perslid_mobiel", + "label": L("lcl_prs_person_mobile"), + "typ": "varchar" + }, + "email": { + "dbs": "prs_perslid_email", + "label": L("lcl_prs_person_email"), + "typ": "varchar", + "filter": "exact" + }, + "login": { + "dbs": "prs_perslid_oslogin", + "label": L("lcl_prs_person_login"), + "typ": "varchar", + "filter": "like" + }, + "employment": { + "dbs": "prs_perslid_dienstverband", + "label": L("lcl_prs_person_dienstverband"), + "typ": "float" + }, + "startdate": { + "dbs": "prs_perslid_ingangsdatum", + "label": L("lcl_prs_person_ingangsdatum"), + "typ": "date" + }, + "enddate": { + "dbs": "prs_perslid_einddatum", + "label": L("lcl_prs_person_einddatum"), + "typ": "date" + }, + "function": { + "dbs": "prs_srtperslid_key", + "label": L("lcl_prs_person_function"), + "typ": "key", + "foreign": { + "tbl": "prs_srtperslid", + "key": "prs_srtperslid_key", + "desc": "prs_srtperslid_omschrijving" + } + }, + "department": { + "dbs": "prs_afdeling_key", + "label": L("lcl_prs_organisatie"), + "typ": "key", "foreign": "prs_afdeling" + }, + "company": { + "dbs": "pa.prs_bedrijf_key", + "label": L("lcl_prs_company"), + "typ": "key", + "foreign": "prs_bedrijf" + }, + "location": { + "dbs": "wg.alg_locatie_key", + "label": L("lcl_location"), + "typ": "key", + "foreign": "alg_locatie", + "filter": "exact" + }, + "building": { + "dbs": "wg.alg_gebouw_key", + "label": L("lcl_building"), + "typ": "key", + "foreign": "alg_gebouw" + }, + "floor": { + "dbs": "wg.alg_verdieping_key", + "label": L("lcl_floor"), + "typ": "key", + "foreign": "alg_verdieping" + }, + "room": { + "dbs": "wg.alg_ruimte_key", + "label": L("lcl_room"), + "typ": "key", + "foreign": "alg_ruimte" + } }; this.includes = { "authorization": { "model": new model_fac_gebruikersgroep(), - "joinfield": "user", + "joinfield": "person", "multiadd": "authorizationgroup" }, - "custom_fields" : { + "customfields" : { "model": new model_custom_fields(this, "PRS", { readman: true, readuse: true, pNiveau: "P" }), "joinfield": "flexparentkey" }, - "tracking": { + "trackings": { "model": new model_tracking(["perslid"]), "joinfield": "fac_tracking_refkey" } diff --git a/APPL/API2/model_prs_staffel.inc b/APPL/API2/model_prs_staffel.inc index 7099a6ff09..ebfc29ce3f 100644 --- a/APPL/API2/model_prs_staffel.inc +++ b/APPL/API2/model_prs_staffel.inc @@ -15,10 +15,10 @@ function model_prs_staffel() { + this.records_name = "basispacelists"; + this.record_name = "basispacelist"; this.table = "prs_staffel"; this.primary = "prs_staffel_key"; - this.records_name = "prs_staffels"; - this.record_name = "prs_staffel"; this.autfunction = "WEB_PRSMGT"; this.record_title = L("prs_staffel"); this.records_title = L("prs_staffel_m"); @@ -27,7 +27,7 @@ function model_prs_staffel() this.fields = { "id": { "dbs": "prs_staffel_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "hidden_fld": true, "required": true, @@ -46,7 +46,7 @@ function model_prs_staffel() }, "filter": "exact" }, - "limit_value": { + "limitvalue": { "dbs": "prs_staffel_grenswaarde", "label": L("prs_staffel_grenswaarde"), "typ": "number" diff --git a/APPL/API2/model_res_activiteit.inc b/APPL/API2/model_res_activiteit.inc index 8b5db532fc..89a44cb097 100644 --- a/APPL/API2/model_res_activiteit.inc +++ b/APPL/API2/model_res_activiteit.inc @@ -15,22 +15,26 @@ <% function model_res_activiteit() { + this.records_name = "bookingactivities"; + this.record_name = "bookingactivity"; this.table = "res_activiteit"; this.primary = "res_activiteit_key"; - this.records_name = "res_activiteits"; - this.record_name = "res_activiteit"; + this.soft_delete = "res_activiteit_verwijder"; + this.autfunction = "WEB_RESMGT"; + this.record_title = L("res_activiteit"); + this.records_title = L("res_activiteit_m"); this.fields = { "id": { "dbs": "res_activiteit_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", "seq": "res_s_res_activiteit_key" }, - "res_srtactiviteit_key": { + "bookingactivitytypes": { "dbs": "res_srtactiviteit_key", "label": L("res_srtactiviteit_key"), "typ": "key", @@ -50,19 +54,19 @@ function model_res_activiteit() "translate": true, "required": true }, - "res_activiteit_omsverplicht": { + "descriptionmandatory": { "dbs": "res_activiteit_omsverplicht", "label": L("res_activiteit_omsverplicht"), "typ": "check", "multiedit": true }, - "res_activiteit_aantalverplicht": { + "visitorsmandatory": { "dbs": "res_activiteit_aantalverplicht", "label": L("res_activiteit_aantalverplicht"), "typ": "check", "multiedit": true }, - "res_activiteit_notfrontend": { + "notfrontend": { "dbs": "res_activiteit_notfrontend", "label": L("res_activiteit_notfrontend"), "typ": "check0", @@ -73,13 +77,13 @@ function model_res_activiteit() "label": L("res_activiteit_volgnr"), "typ": "number" }, - "res_activiteit_duur": { + "duration": { "dbs": "res_activiteit_duur", "label": L("res_activiteit_duur"), "typ": "float", "multiedit": true }, - "has_endtime": { + "hasendtime": { "dbs": "res_activiteit_meteindtijd", "label": L("res_activiteit_meteindtijd"), "typ": "check0", @@ -91,19 +95,13 @@ function model_res_activiteit() this.includes = { "disciplines": { "model": new model_res_activiteit_discipline(), - "joinfield": "res_activiteit_key", + "joinfield": "bookingactivity", "enable_update": true, - "multiadd": "res_discipline_key" + "multiadd": "bookingdiscipline" } }; - this.soft_delete = "res_activiteit_verwijder"; - this.autfunction = "WEB_RESMGT"; - this.record_title = L("res_activiteit"); - this.records_title = L("res_activiteit_m"); - - this.REST_GET = generic_REST_GET(this); this.REST_POST = generic_REST_POST(this); this.REST_PUT = generic_REST_PUT(this); diff --git a/APPL/API2/model_res_activiteit_discipline.inc b/APPL/API2/model_res_activiteit_discipline.inc index e310eb5e3d..fa62230a11 100644 --- a/APPL/API2/model_res_activiteit_discipline.inc +++ b/APPL/API2/model_res_activiteit_discipline.inc @@ -14,22 +14,27 @@ <% function model_res_activiteit_discipline() { + this.records_name = "bookingactivitydisciplines"; + this.record_name = "bookingactivitydiscipline"; this.table = "res_activiteitdiscipline"; this.primary = "res_activiteitdiscipline_key"; - this.records_name = "res_activiteitdisciplines"; - this.record_name = "res_activiteitdiscipline"; + this.autfunction = "WEB_RESMGT"; + this.record_title = L("res_activiteitdiscipline"); + this.records_title = L("res_activiteitdiscipline_m"); + this.edit = { modal: true }; + this.fields = { "id": { "dbs": "res_activiteitdiscipline_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "hidden_fld": true, "required": true, "filter": "exact", "seq": "res_s_res_activiteitdisc_key" }, - "res_discipline_key": { + "bookingdiscipline": { "dbs": "res_discipline_key", "label": L("res_discipline_key"), "typ": "key", @@ -40,10 +45,10 @@ function model_res_activiteit_discipline() "desc": "ins_discipline_omschrijving", "where": "ins_discipline_verwijder is null" }, - "uniquewith": "res_activiteit_key", + "uniquewith": "bookingactivity", "filter": "exact" }, - "res_activiteit_key": { + "bookingactivity": { "dbs": "res_activiteit_key", "label": L("res_activiteit_key"), "typ": "key", @@ -53,7 +58,7 @@ function model_res_activiteit_discipline() "desc": "res_activiteit_omschrijving", "where": "res_activiteit_verwijder is null" }, - "uniquewith": "res_discipline_key", + "uniquewith": "bookingdiscipline", "LOVinit": "", "filter": "exact" } @@ -66,26 +71,22 @@ function model_res_activiteit_discipline() this.list = { "columns": [ "id", - "res_discipline_key", - "res_activiteit_key" + "bookingdiscipline", + "bookingactivity" ] }; this.search = { "autosearch": true, "filters": [ - "res_discipline_key", - "res_activiteit_key" + "bookingdiscipline", + "bookingactivity" ] }; - this.autfunction = "WEB_RESMGT"; - this.record_title = L("res_activiteitdiscipline"); - this.records_title = L("res_activiteitdiscipline_m"); - this.edit = { modal: true }; this.REST_GET = generic_REST_GET(this); this.REST_POST = generic_REST_POST(this); - this.REST_PUT = generic_REST_PUT(this); + // this.REST_PUT = generic_REST_PUT(this); // Update is wat overkill this.REST_DELETE = generic_REST_DELETE(this, {}); } %> \ No newline at end of file diff --git a/APPL/API2/model_res_alg_ruimte.inc b/APPL/API2/model_res_alg_ruimte.inc index a2697c5183..cd2b3ce39d 100644 --- a/APPL/API2/model_res_alg_ruimte.inc +++ b/APPL/API2/model_res_alg_ruimte.inc @@ -16,31 +16,35 @@ function model_res_alg_ruimte(fnparams) { this.gparams = {fn: fnparams || {} }; + this.records_name = "physicalrooms"; + this.record_name = "physicalroom"; this.table = "res_alg_ruimte"; this.primary = "res_alg_ruimte_key"; - this.records_name = "rooms"; - this.record_name = "room"; + this.soft_delete = "res_alg_ruimte_verwijder"; + this.autfunction = "WEB_RESMSU"; + this.record_title = L("res_alg_ruimte"); + this.records_title = L("res_alg_ruimte_m"); this.fields = { "id": { "dbs": "res_alg_ruimte_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "hidden_fld": true, "required": true, "filter": "exact", "seq": "res_s_alg_ruimte_key" }, - "res_ruimte_key": { + "bookingroom": { "dbs": "res_ruimte_key", "label": L("res_v_aanwezigruimte"), "typ": "key", "required": true, "foreign": { - "tbl": "RES_RUIMTE", - "key": "RES_RUIMTE_KEY", - "desc": "RES_RUIMTE_NR" + "tbl": "res_ruimte", + "key": "res_ruimte_key", + "desc": "res_ruimte_nr" } }, "ruimtekey": { // Onder deze naam komt de parameter terug uit FCLTplaatsselector! @@ -53,7 +57,7 @@ function model_res_alg_ruimte(fnparams) "key": "alg_onroerendgoed_keys", "desc": "alg_plaatsaanduiding", "where": "alg_onroerendgoed_type = 'R'", - "selectorforeign": "ALG_RUIMTE" + "selectorforeign": "alg_ruimte" }, "friendlyname": true, "foreignfiltercode": null // Ook facilitor irrelevant @@ -77,7 +81,7 @@ function model_res_alg_ruimte(fnparams) this.list = { "columns": [ "id", - "res_ruimte_key", + "bookingroom", "locatiekey", "ruimtekey" ] @@ -88,16 +92,11 @@ function model_res_alg_ruimte(fnparams) this.edit = { modal: true }; - this.soft_delete = "res_alg_ruimte_verwijder"; - this.autfunction = "WEB_RESMSU"; - this.record_title = L("res_alg_ruimte"); - this.records_title = L("res_alg_ruimte_m"); this.REST_GET = generic_REST_GET(this, this.gparams); this.REST_POST = generic_REST_POST(this); this.REST_PUT = generic_REST_PUT(this); this.REST_DELETE = generic_REST_DELETE(this, {}); - } %> \ No newline at end of file diff --git a/APPL/API2/model_res_artikel.inc b/APPL/API2/model_res_artikel.inc index 86f7ab4d17..94812780b6 100644 --- a/APPL/API2/model_res_artikel.inc +++ b/APPL/API2/model_res_artikel.inc @@ -14,10 +14,10 @@ <% function model_res_artikel() { + this.records_name = "bookingconsumables"; + this.record_name = "bookingconsumable"; this.table = "res_artikel"; this.primary = "res_artikel_key"; - this.records_name = "res_artikels"; - this.record_name = "res_artikel"; this.soft_delete = "res_artikel_verwijder"; this.soft_expire = "res_artikel_vervaldatum"; this.autfunction = "WEB_RESMSU"; @@ -28,7 +28,7 @@ function model_res_artikel() this.fields = { "id": { "dbs": "res_artikel_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", @@ -47,13 +47,18 @@ function model_res_artikel() "label": L("res_artikel_nr"), "typ": "varchar" }, - "res_discipline_key": { + "bookingdiscipline": { "dbs": "res_discipline_key", "label": L("res_discipline_key"), "typ": "key", "required": true, "foreign": { - "tbl": "(SELECT ins_discipline_key, ins_discipline_omschrijving\nFROM INS_TAB_DISCIPLINE\nWHERE ins_discipline_verwijder IS NULL\nAND ins_discipline_module='RES'\nAND ins_discipline_min_level=2)", + "tbl": "(SELECT ins_discipline_key" + + " , ins_discipline_omschrijving" + + " FROM ins_tab_discipline" + + " WHERE ins_discipline_verwijder IS NULL" + + " AND ins_discipline_module='RES'" + + " AND ins_discipline_min_level=2)", "key": "ins_discipline_key", "desc": "ins_discipline_omschrijving" }, @@ -61,79 +66,79 @@ function model_res_artikel() "LOVinit": "", "multiedit": true }, - "res_artikel_eenheid": { + "unit": { "dbs": "res_artikel_eenheid", "label": L("res_artikel_eenheid"), "typ": "varchar", "translate": true, "multiedit": true }, - "res_artikel_prijs": { + "price": { "dbs": "res_artikel_prijs", "label": L("res_artikel_prijs"), "iscurrency": true, "typ": "float", "multiedit": true }, - "res_artikel_btw": { + "vat": { "dbs": "res_artikel_btw", "label": L("res_artikel_btw"), "iscurrency": true, "typ": "float", "multiedit": true }, - "res_artikel_prijs_vast": { + "fixedprice": { "dbs": "res_artikel_prijs_vast", "label": L("res_artikel_prijs_vast"), "typ": "check0", "multiedit": true }, - "res_artikel_inkoopprijs": { + "purchaseprice": { "dbs": "res_artikel_inkoopprijs", "label": L("res_artikel_inkoopprijs"), "iscurrency": true, "typ": "float", "multiedit": true }, - "res_artikel_kostenpersoneel": { + "staffcosts": { "dbs": "res_artikel_kostenpersoneel", "label": L("res_artikel_kostenpersoneel"), "iscurrency": true, "typ": "float", "multiedit": true }, - "res_artikel_kostenalgemeen": { + "generalcosts": { "dbs": "res_artikel_kostenalgemeen", "label": L("res_artikel_kostenalgemeen"), "iscurrency": true, "typ": "float", "multiedit": true }, - "res_artikel_minimum": { + "minimumorder": { "dbs": "res_artikel_minimum", "label": L("res_artikel_minimum"), "typ": "number", "multiedit": true }, - "res_artikel_opmerking": { + "remark": { "dbs": "res_artikel_opmerking", "label": L("res_artikel_opmerking"), "typ": "memo", "translate": true }, - "res_artikel_volgnummer": { + "sequence": { "dbs": "res_artikel_volgnummer", "label": L("res_artikel_volgnummer"), "typ": "number", "multiedit": true }, - "res_artikel_groep": { + "group": { "dbs": "res_artikel_groep", "label": L("res_artikel_groep"), "typ": "varchar", "multiedit": true }, - "res_artikel_image": { + "image": { "dbs": "res_artikel_image", "label": L("res_artikel_image"), "typ": "varchar", @@ -155,19 +160,19 @@ function model_res_artikel() "emptyoption": "Standaard", "multiedit": true }, - "res_artikel_ingangsdatum": { + "startdate": { "dbs": "res_artikel_ingangsdatum", "label": L("res_artikel_ingangsdatum"), "typ": "date", "multiedit": true }, - "res_artikel_vervaldatum": { + "expirationdate": { "dbs": "res_artikel_vervaldatum", "label": L("res_artikel_vervaldatum"), "typ": "date", "multiedit": true }, - "res_artikel_flags": { + "flags": { "dbs": "res_artikel_flags", "label": L("res_artikel_flags"), "typ": "check", diff --git a/APPL/API2/model_res_cyclus.inc b/APPL/API2/model_res_cyclus.inc index fa07746fc9..f7e3db56e6 100644 --- a/APPL/API2/model_res_cyclus.inc +++ b/APPL/API2/model_res_cyclus.inc @@ -14,8 +14,8 @@ <% function model_res_cyclus() { - this.records_name = "reservationcycles"; - this.record_name = "reservationcycle"; + this.records_name = "bookingcycles"; + this.record_name = "bookingcycle"; this.table = "res_cyclus"; this.primary = "res_cyclus_key"; this.autfunction = "WEB_RESMGT"; @@ -26,7 +26,7 @@ function model_res_cyclus() this.fields = { "id": { "dbs": "res_cyclus_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", diff --git a/APPL/API2/model_res_deel.inc b/APPL/API2/model_res_deel.inc index eb44c6f518..70abd613c9 100644 --- a/APPL/API2/model_res_deel.inc +++ b/APPL/API2/model_res_deel.inc @@ -15,10 +15,10 @@ function model_res_deel() { + this.records_name = "bookingintems"; + this.record_name = "bookingitem"; this.table = "res_deel"; this.primary = "res_deel_key"; - this.records_name = "res_deels"; - this.record_name = "res_deel"; this.soft_delete = "res_deel_verwijder"; this.soft_expire = "res_deel_vervaldatum"; this.autfunction = "WEB_RESMSU"; @@ -29,7 +29,7 @@ function model_res_deel() this.fields = { "id": { "dbs": "res_deel_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", @@ -55,18 +55,19 @@ function model_res_deel() "required": true, "filter": "like" }, - "res_discipline_key": { + "bookingdiscipline": { "dbs": "res_discipline_key", "label": L("res_discipline_key"), "typ": "key", "required": true, "foreign": { - "tbl": "(select ins_discipline_key, ins_discipline_omschrijving" - + " from ins_tab_discipline" - + " where ins_discipline_module = 'RES'" - + " and ins_discipline_min_level = 1" - + " and ins_discipline_verwijder is null" - + " order by ins_discipline_omschrijving asc)", + "tbl": "(SELECT ins_discipline_key" + + " , ins_discipline_omschrijving" + + " FROM ins_tab_discipline" + + " WHERE ins_discipline_module = 'RES'" + + " AND ins_discipline_min_level = 1" + + " AND ins_discipline_verwijder IS NULL" + + " ORDER BY ins_discipline_omschrijving ASC)", "key": "ins_discipline_key", "desc": "ins_discipline_omschrijving" }, @@ -74,27 +75,27 @@ function model_res_deel() "LOVinit": "", "multiedit": true }, - "res_deel_eenheid": { + "unit": { "dbs": "res_deel_eenheid", "label": L("res_deel_eenheid"), "typ": "varchar", "translate": true, "multiedit": true }, - "res_deel_prijs": { + "price": { "dbs": "res_deel_prijs", "label": L("res_deel_prijs"), "iscurrency": true, "typ": "float", "multiedit": true }, - "res_deel_prijs_vast": { + "fixedprice": { "dbs": "res_deel_prijs_vast", "label": L("res_deel_prijs_vast"), "typ": "check", "multiedit": true }, - "res_deel_alg_level": { + "scope": { "dbs": "res_deel_alg_level", "label": L("res_deel_alg_level"), "typ": "number", @@ -102,32 +103,32 @@ function model_res_deel() "emptyoption": null, "multiedit": true }, - "res_deel_beschikbaar_bits": { + "availabilitybits": { "dbs": "res_deel_beschikbaar_bits", "label": L("res_deel_beschikbaar_bits"), "typ": "number", "hidden_fld": true, "required": true }, - "_beschikbaar": { + "_available": { "dbs": "", "label": L("res_deel_beschikbaarheid"), "typ": "button", "defaultvalue": L("lcl_select") }, - "res_deel_opmerking": { + "remark": { "dbs": "res_deel_opmerking", "label": L("res_deel_opmerking"), "typ": "memo", "translate": true }, - "res_deel_image": { + "image": { "dbs": "res_deel_image", "label": L("res_deel_image"), "typ": "varchar", "flexmodule": "RESPHD" }, - "res_deel_vervaldatum": { + "expirationdate": { "dbs": "res_deel_vervaldatum", "label": L("res_deel_vervaldatum"), "typ": "date", diff --git a/APPL/API2/model_res_disc_params.inc b/APPL/API2/model_res_disc_params.inc index c5c6197af1..976ad9cdcf 100644 --- a/APPL/API2/model_res_disc_params.inc +++ b/APPL/API2/model_res_disc_params.inc @@ -14,94 +14,96 @@ <% model_res_disc_params = { - "table": "res_disc_params", - "primary": "res_disc_params_key", - "records_name": "res_disc_params", - "record_name": "res_disc_params", - "fields": { - "id": { - "dbs": "res_disc_params_key", - "label": "Key", - "typ": "key", - "seq": "res_s_res_disc_params_key" - }, - "res_ins_discipline_key": { - "dbs": "res_ins_discipline_key", - "label": "Foreign key", - "typ": "key", - "hidden_fld": true - }, - "res_disc_params_preposttime": { - "dbs": "res_disc_params_preposttime", - "label": L("res_catalogus_preposttime"), - "typ": "float", - "defaultvalue": 0, - required: true, - "multiedit": true - }, - "res_disc_params_notify": { - "dbs": "res_disc_params_notify", - "label": L("res_catalogus_notify"), - "typ": "check0", - "multiedit": true - }, - "res_disc_params_bonotify": { - "dbs": "res_disc_params_bonotify", - "label": L("res_discipline_bonotify"), - "typ": "check0", - "multiedit": true - }, - "res_disc_params_kosten": { - "dbs": "res_disc_params_kosten", - "label": L("res_catalogus_kosten"), - "defaultvalue": 100, - "typ": "number", - "multiedit": true - }, - "res_disc_params_noti_dagen": { - "dbs": "res_disc_params_noti_dagen", - "label": L("res_catalogus_noti_dagen"), - "typ": "number", - "multiedit": true - }, - "res_disc_params_expire_dagen": { - "dbs": "res_disc_params_expire_dagen", - "label": L("res_catalogus_expire_dagen"), - "typ": "number", - "defaultvalue": 1, - "required": true, - "multiedit": true - }, - "res_disc_params_expire_tijd": { - "dbs": "res_disc_params_expire_tijd", - "label": L("res_catalogus_expire_tijd"), - "typ": "float", - "LOV": api2.getTimetable(), // TODO timepicker? - "emptyoption": L("res_artikel_standaard"), - "multiedit": true - }, - "res_disc_params_cancel_dagen": { - "dbs": "res_disc_params_cancel_dagen", - "label": L("res_catalogus_cancel_dagen"), - "typ": "number", - "multiedit": true - }, - "res_disc_params_remoteurl": { - "dbs": "res_disc_params_remoteurl", - "label": L("res_catalogus_remoteurl"), - "typ": "varchar" - }, - "res_disc_params_maxduur": { - "dbs": "res_disc_params_maxduur", - "label": L("res_catalogus_maxduur"), - "typ": "float", - "defaultvalue": 0, - "required": true, - "multiedit": true - } - }, + "records_name": "bookingdisciplineparams", + "record_name": "bookingdisciplineparams", + "table": "res_disc_params", + "primary": "res_disc_params_key", - "autfunction": "WEB_PRSSYS" + + "fields": { + "id": { + "dbs": "res_disc_params_key", + "label": L("lcl_key"), + "typ": "key", + "seq": "res_s_res_disc_params_key" + }, + "bookingdiscipline": { + "dbs": "res_ins_discipline_key", + "label": L("res_v_res_catalogus"), + "typ": "key", + "hidden_fld": true + }, + "preposttime": { + "dbs": "res_disc_params_preposttime", + "label": L("res_catalogus_preposttime"), + "typ": "float", + "defaultvalue": 0, + required: true, + "multiedit": true + }, + "notify": { + "dbs": "res_disc_params_notify", + "label": L("res_catalogus_notify"), + "typ": "check0", + "multiedit": true + }, + "bonotify": { + "dbs": "res_disc_params_bonotify", + "label": L("res_discipline_bonotify"), + "typ": "check0", + "multiedit": true + }, + "costs": { + "dbs": "res_disc_params_kosten", + "label": L("res_catalogus_kosten"), + "defaultvalue": 100, + "typ": "number", + "multiedit": true + }, + "reminderdays": { + "dbs": "res_disc_params_noti_dagen", + "label": L("res_catalogus_noti_dagen"), + "typ": "number", + "multiedit": true + }, + "expiredays": { + "dbs": "res_disc_params_expire_dagen", + "label": L("res_catalogus_expire_dagen"), + "typ": "number", + "defaultvalue": 1, + "required": true, + "multiedit": true + }, + "expiretime": { + "dbs": "res_disc_params_expire_tijd", + "label": L("res_catalogus_expire_tijd"), + "typ": "float", + "LOV": api2.getTimetable(), // TODO timepicker? + "emptyoption": L("res_artikel_standaard"), + "multiedit": true + }, + "canceldays": { + "dbs": "res_disc_params_cancel_dagen", + "label": L("res_catalogus_cancel_dagen"), + "typ": "number", + "multiedit": true + }, + "remoteurl": { + "dbs": "res_disc_params_remoteurl", + "label": L("res_catalogus_remoteurl"), + "typ": "varchar" + }, + "maxtime": { + "dbs": "res_disc_params_maxduur", + "label": L("res_catalogus_maxduur"), + "typ": "float", + "defaultvalue": 0, + "required": true, + "multiedit": true + } + }, + + "autfunction": "WEB_PRSSYS" } api2.generic_REST(model_res_disc_params); diff --git a/APPL/API2/model_res_discipline.inc b/APPL/API2/model_res_discipline.inc index 1c282095ed..816ae2035c 100644 --- a/APPL/API2/model_res_discipline.inc +++ b/APPL/API2/model_res_discipline.inc @@ -36,20 +36,26 @@ function model_res_discipline(disc_key, params) _model_res_discipline = // Internal only { + "records_name": "bookingdisciplines", + "record_name": "bookingdiscipline", "table": "ins_tab_discipline", "primary": "ins_discipline_key", - "records_name": "reservationcatalogs", - "record_name": "reservationcatalog", + "soft_delete": "ins_discipline_verwijder", + "autfunction": "WEB_RESMGT", + "record_title": L("res_v_res_catalogus"), + "records_title": L("res_v_res_catalogus_m"), + + "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", @@ -57,7 +63,7 @@ _model_res_discipline = // Internal only "defaultvalue": "RES", "hidden_fld": true }, - "ins_discipline_min_level": { + "scope": { "dbs": "ins_discipline_min_level", "label": L("ins_discipline_min_level"), "typ": "key", @@ -87,25 +93,25 @@ _model_res_discipline = // Internal only "LOVinit": "", "multiedit": true }, - "ins_discipline_kpnverplicht": { + "costcentremandatory": { "dbs": "ins_discipline_kpnverplicht", "label": L("ins_discipline_kpnverplicht"), "typ": "check", "multiedit": true }, - "ins_discipline_email": { + "email": { "dbs": "ins_discipline_email", "label": L("ins_discipline_email"), "typ": "varchar", "multiedit": true }, - "ins_discipline_ktopercentage": { + "satisfactionpercentage": { "dbs": "ins_discipline_ktopercentage", "label": L("ins_discipline_ktopercentage"), "typ": "number", "multiedit": true }, - "ins_discipline_ktodrempel": { + "satisfactionthreshold": { "dbs": "ins_discipline_ktodrempel", "label": L("ins_discipline_ktodrempel"), "typ": "number", @@ -115,19 +121,15 @@ _model_res_discipline = // Internal only }, "disc_params": { model: model_res_disc_params, - joinfield: "res_ins_discipline_key" + joinfield: "bookingdiscipline" }, includes : { - "activities": { + "bookingactivities": { "model": new model_res_activiteit_discipline(), - "joinfield": "res_discipline_key", + "joinfield": "bookingdiscipline", "enable_update": true } - }, - "soft_delete": "ins_discipline_verwijder", - "autfunction": "WEB_RESMGT", - "record_title": L("res_v_res_catalogus"), - "records_title": L("res_v_res_catalogus_m") + } } %> \ No newline at end of file diff --git a/APPL/API2/model_res_opstelling.inc b/APPL/API2/model_res_opstelling.inc index a0d84b5d16..b625bbc22d 100644 --- a/APPL/API2/model_res_opstelling.inc +++ b/APPL/API2/model_res_opstelling.inc @@ -14,8 +14,8 @@ <% function model_res_opstelling() { - this.records_name = "roomconfigurations"; - this.record_name = "roomconfiguration"; + this.records_name = "bookingconfigurations"; + this.record_name = "bookingconfiguration"; this.table = "res_opstelling"; this.primary = "res_opstelling_key"; this.soft_delete = "res_opstelling_verwijder"; diff --git a/APPL/API2/model_res_ruimte_opstelling.inc b/APPL/API2/model_res_ruimte_opstelling.inc index 03e14459f9..f103cde9e0 100644 --- a/APPL/API2/model_res_ruimte_opstelling.inc +++ b/APPL/API2/model_res_ruimte_opstelling.inc @@ -16,46 +16,50 @@ function model_res_ruimte_opstelling(fnparams) { this.gparams = {fn: fnparams || {} }; + this.records_name = "bookingconfigurations"; + this.record_name = "bookingconfiguration"; this.table = "res_ruimte_opstelling"; this.primary = "res_ruimte_opstel_key"; - this.records_name = "configurations"; - this.record_name = "configuration"; + this.soft_delete = "res_ruimte_opstel_verwijder"; + this.autfunction = "WEB_RESMSU"; + this.record_title = L("res_ruimte_opstelling"); + this.records_title = L("res_ruimte_opstelling_m"); this.fields = { "id": { "dbs": "res_ruimte_opstel_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "hidden_fld": true, "required": true, "filter": "exact", "seq": "res_s_res_ruimte_opstel_key" }, - "res_ruimte_key": { + "bookingroom": { "dbs": "res_ruimte_key", "label": L("res_v_aanwezigruimte"), "typ": "key", "foreign": { - "tbl": "RES_RUIMTE", - "key": "RES_RUIMTE_KEY", - "desc": "RES_RUIMTE_NR" + "tbl": "res_ruimte", + "key": "res_ruimte_key", + "desc": "res_ruimte_nr" }, "filter": "exact" }, - "res_opstelling_key": { + "bookingconfiguration": { "dbs": "res_opstelling_key", "label": L("res_opstelling_key"), "typ": "key", "required": true, "foreign": { - "tbl": "RES_OPSTELLING", - "key": "RES_OPSTELLING_KEY", - "desc": "RES_OPSTELLING_OMSCHRIJVING", - "where": "RES_OPSTELLING_VERWIJDER IS NULL" + "tbl": "res_opstelling", + "key": "res_opstelling_key", + "desc": "res_opstelling_omschrijving", + "where": "res_opstelling_verwijder is null" }, "filter": "exact", - "uniquewith": "res_ruimte_key" + "uniquewith": "bookingroom" }, "capacity": { "dbs": "res_ruimte_opstel_bezoekers", @@ -68,7 +72,7 @@ function model_res_ruimte_opstelling(fnparams) "label": L("res_ruimte_opstel_default"), "typ": "check" }, - "res_ruimte_opstel_image": { + "configimage": { "dbs": "res_ruimte_opstel_image", "label": L("res_ruimte_opstel_image"), "typ": "varchar", @@ -80,8 +84,8 @@ function model_res_ruimte_opstelling(fnparams) this.list = { "columns": [ "id", - "res_ruimte_key", - "res_opstelling_key", + "bookingroom", + "roomconfiguration", "capacity", "isdefault" ] @@ -92,10 +96,6 @@ function model_res_ruimte_opstelling(fnparams) this.edit = { modal: true }; - this.soft_delete = "res_ruimte_opstel_verwijder"; - this.autfunction = "WEB_RESMSU"; - this.record_title = L("res_ruimte_opstelling"); - this.records_title = L("res_ruimte_opstelling_m"); this.REST_GET = generic_REST_GET(this, this.gparams); diff --git a/APPL/API2/model_res_srtactiviteit.inc b/APPL/API2/model_res_srtactiviteit.inc index 172dabd748..5e7b5b5e11 100644 --- a/APPL/API2/model_res_srtactiviteit.inc +++ b/APPL/API2/model_res_srtactiviteit.inc @@ -15,8 +15,8 @@ function model_res_srtactiviteit() { - this.records_name = "activitytypes"; - this.record_name = "activitytype"; + this.records_name = "bookingactivitytypes"; + this.record_name = "bookingactivitytype"; this.table = "res_srtactiviteit"; this.primary = "res_srtactiviteit_key"; this.soft_delete = "res_srtactiviteit_verwijder"; @@ -28,7 +28,7 @@ function model_res_srtactiviteit() this.fields = { "id": { "dbs": "res_srtactiviteit_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "filter": "exact", diff --git a/APPL/API2/model_res_srtartikel_onrgoed.inc b/APPL/API2/model_res_srtartikel_onrgoed.inc index 6cf0d9dd31..b24a945fb1 100644 --- a/APPL/API2/model_res_srtartikel_onrgoed.inc +++ b/APPL/API2/model_res_srtartikel_onrgoed.inc @@ -15,10 +15,10 @@ function model_res_srtartikel_onrgoed() { + this.records_name = "bookingconsumablescopes"; + this.record_name = "bookingconsumablescope"; this.table = "res_srtartikel_onrgoed"; this.primary = "res_srtartikel_onrgoed_key"; - this.records_name = "articlescopes"; - this.record_name = "articlescope"; this.soft_delete = "res_srtartikel_og_verwijder"; this.autfunction = "WEB_RESMSU"; this.record_title = L("res_srtartikel_onrgoed"); @@ -28,22 +28,23 @@ function model_res_srtartikel_onrgoed() this.fields = { "id": { "dbs": "res_srtartikel_onrgoed_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "hidden_fld": true, "required": true, "filter": "exact", "seq": "res_s_res_srtartikel_og_key" }, - "res_discipline_key": { + "bookingdiscipline": { "dbs": "res_discipline_key", "label": L("res_discipline_key"), "typ": "key", "required": true, "insertonly": true, "foreign": { - "tbl": "(SELECT ins_discipline_key, ins_discipline_omschrijving" - + " FROM INS_TAB_DISCIPLINE" + "tbl": "(SELECT ins_discipline_key" + + " , ins_discipline_omschrijving" + + " FROM ins_tab_discipline" + " WHERE ins_discipline_verwijder IS NULL" + " AND ins_discipline_module='RES'" + " AND ins_discipline_min_level=2)", @@ -53,7 +54,7 @@ function model_res_srtartikel_onrgoed() "filter": "exact", "LOVinit": "" }, - "alg_onrgoed_niveau": { + "level": { "dbs": "alg_onrgoed_niveau", "label": L("lcl_niveau"), "typ": "varchar", diff --git a/APPL/MGT/bgt_project.asp b/APPL/MGT/bgt_project.asp index 9fb424da8c..6187e3dda0 100644 --- a/APPL/MGT/bgt_project.asp +++ b/APPL/MGT/bgt_project.asp @@ -11,14 +11,14 @@ scaffolding(this_model, "search": { "autosearch": true, "filters": [ - "catalog", + "budgetdiscipline", "name" ] }, "list": { "columns": [ //"id", - "catalog", + "budgetdiscipline", "name", "pricedate" ] diff --git a/APPL/MGT/ins_discipline.asp b/APPL/MGT/ins_discipline.asp index 46f6495736..609d29e10e 100644 --- a/APPL/MGT/ins_discipline.asp +++ b/APPL/MGT/ins_discipline.asp @@ -29,7 +29,7 @@ scaffolding(this_model, "columns": [ "id", "name", - "minimumlevel", + "scope", "costtype" ] diff --git a/APPL/MGT/prs_kostencombinatie.asp b/APPL/MGT/prs_kostencombinatie.asp index bae9e8b26f..7920a8406f 100644 --- a/APPL/MGT/prs_kostencombinatie.asp +++ b/APPL/MGT/prs_kostencombinatie.asp @@ -29,7 +29,7 @@ scaffolding(this_model, "list": { "columns": [ "id", - "category", + "costtype", "group" ] }, diff --git a/APPL/MGT/prs_kostensoort.asp b/APPL/MGT/prs_kostensoort.asp index 49b7de8818..36e2c9a769 100644 --- a/APPL/MGT/prs_kostensoort.asp +++ b/APPL/MGT/prs_kostensoort.asp @@ -22,14 +22,14 @@ scaffolding(this_model, "search": { "autosearch": true, "filters": [ - "group", + "costtypegroup", "name", "code" ] }, "list": { "columns": [ - "group", + "costtypegroup", "name", "code", "refcode" diff --git a/APPL/MGT/prs_kostensoortgrp.asp b/APPL/MGT/prs_kostensoortgrp.asp index bc2b392f1d..2205700228 100644 --- a/APPL/MGT/prs_kostensoortgrp.asp +++ b/APPL/MGT/prs_kostensoortgrp.asp @@ -23,12 +23,12 @@ scaffolding(this_model, "autosearch": true, "filters": [ "name", - "rubriek" + "budgetcostcategory" ] }, "list": { "columns": [ - "rubriek", + "budgetcostcategory", "name", "altcode" ] diff --git a/APPL/MGT/prs_perslid.asp b/APPL/MGT/prs_perslid.asp index 55dfd46c30..86087d7480 100644 --- a/APPL/MGT/prs_perslid.asp +++ b/APPL/MGT/prs_perslid.asp @@ -9,7 +9,7 @@ */ %> - + <% if (mode == 'list') diff --git a/APPL/MGT/prs_staffel.asp b/APPL/MGT/prs_staffel.asp index ba3065e10c..403f301297 100644 --- a/APPL/MGT/prs_staffel.asp +++ b/APPL/MGT/prs_staffel.asp @@ -18,7 +18,7 @@ scaffolding(this_model, "columns": [ "id", "supplier", - "limit_value", + "limitvalue", "discount" ] }, diff --git a/APPL/MGT/res_activiteit.asp b/APPL/MGT/res_activiteit.asp index fa63214ba8..0b394ef980 100644 --- a/APPL/MGT/res_activiteit.asp +++ b/APPL/MGT/res_activiteit.asp @@ -9,7 +9,7 @@ "search": { autosearch: true, "filters": [ - "res_srtactiviteit_key", + "bookingactivitytypes", "disciplines.res_discipline_key", "name" ] @@ -19,8 +19,8 @@ "id", "name", "sequence", - "res_activiteit_duur", - "res_srtactiviteit_key" + "duration", + "bookingactivitytypes" ] } }); diff --git a/APPL/MGT/res_artikel.asp b/APPL/MGT/res_artikel.asp index 3f91f1ded4..a0e2f5069c 100644 --- a/APPL/MGT/res_artikel.asp +++ b/APPL/MGT/res_artikel.asp @@ -20,25 +20,25 @@ scaffolding(this_model, "search": { "autosearch": true, "filters": [ - "res_discipline_key", + "bookingdiscipline", "name" ] }, "list": { "columns": [ "id", - "res_discipline_key", + "bookingdiscipline", "name", "code", - "res_artikel_eenheid", - "res_artikel_prijs", - "res_artikel_prijs_vast", - "res_artikel_inkoopprijs", - "res_artikel_groep", - "res_artikel_kostenpersoneel", - "res_artikel_kostenalgemeen", - "res_artikel_volgnummer", - "res_artikel_vervaldatum" + "unit", + "price", + "fixedprice", + "purchaseprice", + "group", + "staffcosts", + "generalcosts", + "sequence", + "expirationdate" ] }, "show": { diff --git a/APPL/MGT/res_deel.asp b/APPL/MGT/res_deel.asp index 00599259fb..77e9059508 100644 --- a/APPL/MGT/res_deel.asp +++ b/APPL/MGT/res_deel.asp @@ -31,7 +31,7 @@ scaffolding(res_deelmodel, "search": { "autosearch": true, "filters": [ - "res_discipline_key", + "bookingdiscipline", "name"] }, "list": { @@ -39,11 +39,11 @@ scaffolding(res_deelmodel, "id", "res_ins_deel_key", "name", - "res_discipline_key", - "res_deel_eenheid", - "res_deel_prijs", - "res_deel_prijs_vast", - "res_deel_alg_level" + "bookingdiscipline", + "unit", + "price", + "fixedprice", + "scope" ] }, "show": { diff --git a/APPL/MGT/res_deel.js b/APPL/MGT/res_deel.js index d6e4b649e7..2c06eb50fb 100644 --- a/APPL/MGT/res_deel.js +++ b/APPL/MGT/res_deel.js @@ -8,27 +8,27 @@ $(document).ready(function () { function init_res_deel() { - $("#res_discipline_key").change(function() {change_res_discipline_key(); }); - $("#_beschikbaar").click(function() {SelectBits(); }); + $("#bookingdiscipline").change(function() {change_res_discipline_key(); }); + $("#_available").click(function() {SelectBits(); }); - var disc_key = $("#res_discipline_key").val(); + var disc_key = $("#bookingdiscipline").val(); if (!disc_key || disc_key != parking_key ) { - $("#_beschikbaar").parent().parent().hide(); + $("#_available").parent().parent().hide(); } } function change_res_discipline_key() { - var disc_key = $("#res_discipline_key").val(); + var disc_key = $("#bookingdiscipline").val(); if (disc_key == parking_key) { - $("#_beschikbaar").parent().parent().show(); + $("#_available").parent().parent().show(); } else { - $("#_beschikbaar").parent().parent().hide(); + $("#_available").parent().parent().hide(); } changed_mode = 1; } @@ -37,12 +37,12 @@ function SelectBits() { var proturl = "../ins/ins_bitsform.asp" + "?eenheid=5" - + "&bits=" + $("#res_deel_beschikbaar_bits").val(); + + "&bits=" + $("#availabilitybits").val(); parent.FcltMgr.openModalDetail(proturl, "Select moment", { callback: function (data) { if (data.eenheid >= 0) { - $("#res_deel_beschikbaar_bits").val(data.bits); + $("#availabilitybits").val(data.bits); changed_bits = 1; } } @@ -53,7 +53,7 @@ function pre_submit() { var ch_mode = (changed_mode == 1); var ch_bits = (changed_bits == 1); - var disc_key = $("#res_discipline_key").val(); + var disc_key = $("#bookingdiscipline").val(); if (disc_key && disc_key == parking_key) { if (ch_mode && !ch_bits) @@ -64,7 +64,7 @@ function pre_submit() } else // is geen parkeerplaats { - $("#res_deel_beschikbaar_bits").val(0); + $("#availabilitybits").val(0); } return true; } diff --git a/APPL/MGT/res_discipline.asp b/APPL/MGT/res_discipline.asp index 2cdc5eba2f..9efd30a9da 100644 --- a/APPL/MGT/res_discipline.asp +++ b/APPL/MGT/res_discipline.asp @@ -13,7 +13,7 @@ "search": { "autosearch": true, "filters": [ - "ins_discipline_min_level", + "scope", "costtype", "name" ] @@ -21,7 +21,7 @@ "list": { "columns": [ "id", - "ins_discipline_min_level", + "scope", "name", "costtype", "sequence" diff --git a/APPL/MGT/res_ruimte.asp b/APPL/MGT/res_ruimte.asp index 6ffddb0e4a..25ffa5c83c 100644 --- a/APPL/MGT/res_ruimte.asp +++ b/APPL/MGT/res_ruimte.asp @@ -18,8 +18,8 @@ scaffolding(this_model, "name", "description", "locatiekey", - "catalog", - "configurations.res_opstelling_key" + "bookingdiscipline", + "bookingconfigurations.roomconfiguration" ] }, "list": { @@ -28,8 +28,8 @@ scaffolding(this_model, "locatiekey", "name", "description", - "catalog", - "configurations.res_opstelling_key", + "bookingdiscipline", + "bookingconfigurations.roomconfiguration", "rooms.ruimtekey" ] }, diff --git a/APPL/MGT/res_srtartikel_onrgoed.asp b/APPL/MGT/res_srtartikel_onrgoed.asp index 55459e8a80..c92fdb6a60 100644 --- a/APPL/MGT/res_srtartikel_onrgoed.asp +++ b/APPL/MGT/res_srtartikel_onrgoed.asp @@ -14,15 +14,15 @@ this_model.hook_pre_post = function(params, jsondata) var ruimte_key = getFParamInt("ruimtekey"); if (ruimte_key != -1) - { jsondata.alg_onrgoed_niveau = "R"; + { jsondata.level = "R"; jsondata.ruimtekey = ruimte_key; } else if (verdieping_key != -1 || gebouw_key != -1) // Als verdieping is geselecteerd, sla dan gebouw op: Niveau V wordt niet ondersteund. - { jsondata.alg_onrgoed_niveau = "G"; + { jsondata.level = "G"; jsondata.ruimtekey = gebouw_key; } else if (locatie_key != -1) - { jsondata.alg_onrgoed_niveau = "L"; + { jsondata.level = "L"; jsondata.ruimtekey = locatie_key; } } @@ -87,16 +87,16 @@ scaffolding(this_model, "search": { "autosearch": false, "filters": [ - "res_discipline_key", + "bookingdiscipline", "ruimtekey" ] }, "list": { "columns": [ "id", - "alg_onrgoed_niveau", - "alg_onrgoed_key", - "res_discipline_key", + "level", + // "alg_onrgoed_key", + "bookingdiscipline", "ruimtekey" ] },