diff --git a/APPL/API2/model_fac_groep.inc b/APPL/API2/model_fac_groep.inc index d04ea43db1..3a2c9d5c0c 100644 --- a/APPL/API2/model_fac_groep.inc +++ b/APPL/API2/model_fac_groep.inc @@ -17,14 +17,18 @@ function model_fac_groep(groep_key, params) { + this.records_name = "authorizationgroups"; + this.record_name = "authorizationgroup"; this.table = "fac_groep"; this.primary = "fac_groep_key"; - this.records_name = "fac_groeps"; - this.record_name = "fac_groep"; + this.autfunction = "WEB_FACMSU"; + this.record_title = L("fac_groep"); + this.records_title = L("fac_groep_m"); + this.fields = { "id": { "dbs": "fac_groep_key", - "label": "Key", + "label": L("lcl_key"), "typ": "key", "required": true, "seq": "fac_s_fac_groep_key" @@ -45,7 +49,7 @@ function model_fac_groep(groep_key, params) "label": L("lcl_prs_substitutes"), "typ": "check0" }, - "nn_leden": { + "membercount": { "dbs": "nn_leden", "sql": "(SELECT COUNT(*) FROM fac_gebruikersgroep WHERE fac_groep.fac_groep_key = fac_gebruikersgroep.fac_groep_key)", "label": L("fac_groep_nn_leden"), @@ -57,7 +61,7 @@ function model_fac_groep(groep_key, params) "users": { "model": new model_fac_gebruikersgroep(), "joinfield": "authorizationgroup", - "multiadd": "user" + "multiadd": "person" } }; @@ -71,10 +75,6 @@ function model_fac_groep(groep_key, params) }; } - this.autfunction = "WEB_FACMSU"; - this.record_title = L("fac_groep"); - this.records_title = L("fac_groep_m"); - // Groepen met WEB_FACFAC en WEB_FACTAB zie je niet als je die rechten niet zelf hebt var xparams = { GET: { wheres: [] } } if (!user.has("WEB_FACFAC"))