FSN#39312 Verder ontsluiten van modellen via de API

svn path=/Website/trunk/; revision=32984
This commit is contained in:
Erik Groener
2017-02-28 15:31:59 +00:00
parent e5a9d16535
commit fb441b1705
41 changed files with 687 additions and 504 deletions

View File

@@ -28,6 +28,11 @@ var api2_mapper = {
"visitoractions" : "appl/mgt/bez_actie.asp",
"visitorproperties" : "appl/mgt/bez_kenmerk.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",
"graphiclabels" : "appl/mgt/cad_label.asp",
"graphiclegendas" : "appl/mgt/cad_legenda.asp",
"graphiclegendavalues" : "appl/mgt/cad_legendawaarde.asp",
@@ -74,7 +79,7 @@ var api2_mapper = {
"xxxxxx" : "appl/mgt/mgt_generic.asp",
"xxxxxx" : "appl/mgt/mld_afmeldtekst.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",
@@ -85,34 +90,34 @@ var api2_mapper = {
"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",
"issueordertypes" : "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",
"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",
"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",
"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",
"xxxxxx" : "appl/mgt/prs_staffel.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",
"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",
"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",
"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",

View File

@@ -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",
@@ -159,16 +159,16 @@ function model_bgt_budget()
this.edit = {
"modal": true
}
};
this.list = {
"columns": [
"costcategory",
"costtypegroup",
"cost_category",
"costtype",
"amount",
"vat"
]
};

View File

@@ -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",

View File

@@ -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",

View File

@@ -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);

View File

@@ -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" },
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" }
"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;

View File

@@ -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 = {

View File

@@ -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.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", "notification", "description", "person"] }
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

View File

@@ -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",

View File

@@ -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"

View File

@@ -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);

View File

@@ -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
}
};
if (S("bgt_enabled"))
{
this.includes = {
"budget": {
"model": new model_bgt_budget(),
"joinfield": "cost_category",
"joinfield": "budgetcostcategory",
"enable_update": true
}
};
}
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);

View File

@@ -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",

View File

@@ -15,7 +15,7 @@
%>
<!-- #include file="../Shared/discxalg3d.inc"-->
<!-- #include file="../api2/model_custom_fields.inc"-->
<!-- #include file="../api2/model_tracking.inc"-->
<!-- #include file="../api2/model_fac_tracking.inc"-->
<!-- #include file="../api2/model_fac_gebruikersgroep.inc" -->
<%
@@ -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"
}

View File

@@ -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"

View File

@@ -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);

View File

@@ -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, {});
}
%>

View File

@@ -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, {});
}
%>

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -14,24 +14,26 @@
<%
model_res_disc_params =
{
"records_name": "bookingdisciplineparams",
"record_name": "bookingdisciplineparams",
"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",
"label": L("lcl_key"),
"typ": "key",
"seq": "res_s_res_disc_params_key"
},
"res_ins_discipline_key": {
"bookingdiscipline": {
"dbs": "res_ins_discipline_key",
"label": "Foreign key",
"label": L("res_v_res_catalogus"),
"typ": "key",
"hidden_fld": true
},
"res_disc_params_preposttime": {
"preposttime": {
"dbs": "res_disc_params_preposttime",
"label": L("res_catalogus_preposttime"),
"typ": "float",
@@ -39,32 +41,32 @@ model_res_disc_params =
required: true,
"multiedit": true
},
"res_disc_params_notify": {
"notify": {
"dbs": "res_disc_params_notify",
"label": L("res_catalogus_notify"),
"typ": "check0",
"multiedit": true
},
"res_disc_params_bonotify": {
"bonotify": {
"dbs": "res_disc_params_bonotify",
"label": L("res_discipline_bonotify"),
"typ": "check0",
"multiedit": true
},
"res_disc_params_kosten": {
"costs": {
"dbs": "res_disc_params_kosten",
"label": L("res_catalogus_kosten"),
"defaultvalue": 100,
"typ": "number",
"multiedit": true
},
"res_disc_params_noti_dagen": {
"reminderdays": {
"dbs": "res_disc_params_noti_dagen",
"label": L("res_catalogus_noti_dagen"),
"typ": "number",
"multiedit": true
},
"res_disc_params_expire_dagen": {
"expiredays": {
"dbs": "res_disc_params_expire_dagen",
"label": L("res_catalogus_expire_dagen"),
"typ": "number",
@@ -72,7 +74,7 @@ model_res_disc_params =
"required": true,
"multiedit": true
},
"res_disc_params_expire_tijd": {
"expiretime": {
"dbs": "res_disc_params_expire_tijd",
"label": L("res_catalogus_expire_tijd"),
"typ": "float",
@@ -80,18 +82,18 @@ model_res_disc_params =
"emptyoption": L("res_artikel_standaard"),
"multiedit": true
},
"res_disc_params_cancel_dagen": {
"canceldays": {
"dbs": "res_disc_params_cancel_dagen",
"label": L("res_catalogus_cancel_dagen"),
"typ": "number",
"multiedit": true
},
"res_disc_params_remoteurl": {
"remoteurl": {
"dbs": "res_disc_params_remoteurl",
"label": L("res_catalogus_remoteurl"),
"typ": "varchar"
},
"res_disc_params_maxduur": {
"maxtime": {
"dbs": "res_disc_params_maxduur",
"label": L("res_catalogus_maxduur"),
"typ": "float",

View File

@@ -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")
}
}
%>

View File

@@ -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";

View File

@@ -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);

View File

@@ -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",

View File

@@ -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",

View File

@@ -11,14 +11,14 @@ scaffolding(this_model,
"search": {
"autosearch": true,
"filters": [
"catalog",
"budgetdiscipline",
"name"
]
},
"list": {
"columns": [
//"id",
"catalog",
"budgetdiscipline",
"name",
"pricedate"
]

View File

@@ -29,7 +29,7 @@ scaffolding(this_model,
"columns": [
"id",
"name",
"minimumlevel",
"scope",
"costtype"
]

View File

@@ -29,7 +29,7 @@ scaffolding(this_model,
"list": {
"columns": [
"id",
"category",
"costtype",
"group"
]
},

View File

@@ -22,14 +22,14 @@ scaffolding(this_model,
"search": {
"autosearch": true,
"filters": [
"group",
"costtypegroup",
"name",
"code"
]
},
"list": {
"columns": [
"group",
"costtypegroup",
"name",
"code",
"refcode"

View File

@@ -23,12 +23,12 @@ scaffolding(this_model,
"autosearch": true,
"filters": [
"name",
"rubriek"
"budgetcostcategory"
]
},
"list": {
"columns": [
"rubriek",
"budgetcostcategory",
"name",
"altcode"
]

View File

@@ -9,7 +9,7 @@
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../api2/model_persons.inc" -->
<!-- #include file="../api2/model_prs_perslid.inc" -->
<%
if (mode == 'list')

View File

@@ -18,7 +18,7 @@ scaffolding(this_model,
"columns": [
"id",
"supplier",
"limit_value",
"limitvalue",
"discount"
]
},

View File

@@ -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"
]
}
});

View File

@@ -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": {

View File

@@ -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": {

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -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"
]
},

View File

@@ -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"
]
},