diff --git a/APPL/API2/model_fac_setting.inc b/APPL/API2/model_fac_setting.inc index 55225c452d..17d5cb9d9e 100644 --- a/APPL/API2/model_fac_setting.inc +++ b/APPL/API2/model_fac_setting.inc @@ -12,33 +12,18 @@ */ %> <% -function model_fac_setting(setting_key, params) +function model_fac_setting() { - this.REST_GET = generic_REST_GET(_model_fac_setting, - { "GET": { - wheres: [ "BITAND(fac_setting_flags,1)=1" - ] - } - } - ) - -// this.REST_POST = generic_REST_POST(_model_mld_discipline); -// this.REST_PUT = generic_REST_PUT(_model_mld_discipline); -// this.REST_DELETE = generic_REST_DELETE(this); -} - -_model_fac_setting = // Internal only -{ - "table": "fac_setting", - "primary": "fac_setting_key", - "records_name": "fac_settings", - "record_name": "fac_setting", - "autfunction": "WEB_PROFIL", - "record_title": L("lcl_fac_setting"), - "records_title": L("lcl_fac_setting_m"), + this.table = "fac_setting"; + this.primary = "fac_setting_key"; + this.records_name = "fac_settings"; + this.record_name = "fac_setting"; + this.autfunction = "WEB_PROFIL"; //Om zelf al je geregistreerde gegevens te kunnen inzien + this.record_title = L("lcl_fac_setting"); +// this.records_title = L("lcl_fac_setting_m"); - "fields": { + this.fields = { "id": { "dbs": "fac_setting_key", "label": "Key", @@ -114,6 +99,30 @@ _model_fac_setting = // Internal only "typ": "key", "foreign": "fac_functie" } - } + }; + + this.list = { + "columns": [ + "id", + "name", + "value" + ] + }; + this.search = { + "autosearch": true + }; + + + this.REST_GET = generic_REST_GET(this, + { "GET": { + wheres: [ "BITAND(fac_setting_flags,1)=1" + ] + } + } + ) + + //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