FSN#35817 Autorisaties via API2/Scaffolding

svn path=/Website/trunk/; revision=28924
This commit is contained in:
Jos Groot Lipman
2016-04-13 14:58:37 +00:00
parent 24be0cdd81
commit ed8ec92cb1
3 changed files with 11 additions and 14 deletions

View File

@@ -85,14 +85,12 @@ function model_fac_functie (functie_key, params)
"dbs": "fac_functie_omschrijving",
"label": L("fac_functie_omschrijving"),
"typ": "varchar",
"readonly": true,
"required": true
},
"info": {
"dbs": "fac_functie_info",
"label": L("fac_functie_info"),
"readonly": true,
"typ": "varchar"
"typ": "memo"
}
};
@@ -109,10 +107,6 @@ function model_fac_functie (functie_key, params)
this.record_title = L("fac_functie");
this.records_title = L("fac_functie_m");
this.edit = {
"modal": true
}
var xparams = { GET: { wheres: [] } }
if (params.disc_key > 0)
{

View File

@@ -33,7 +33,7 @@ function model_fac_gebruikersgroep()
},
"fac_groep": {
"dbs": "fac_groep_key",
"label": L("fac_groep_omschrijving"),
"label": L("fac_groep"),
"typ": "key",
"required": true,
"foreign": {
@@ -44,7 +44,7 @@ function model_fac_gebruikersgroep()
},
"user": {
"dbs": "prs_perslid_key",
"label": L("lcl_user"),
"label": L("prs_perslid"),
"typ": "key",
"required": true,
"foreign": "PRS_PERSLID"

View File

@@ -34,6 +34,7 @@ model_persons =
records_title: L("prs_perslid_m"),
fields: {"id" : { dbs: "prs_perslid_key", typ: "key", filter: "exact"},
"name" : { dbs: "prs_v_perslid_fullnames_all.prs_perslid_naam_friendly", typ: "varchar" },
"lastname" : { dbs: "prs_perslid_naam", label: L("lcl_prs_person_name"), typ: "varchar", filter: "like"},
"firstname" : { dbs: "prs_perslid_voornaam", label: L("lcl_prs_person_voornaam"), typ: "varchar", filter: "like"},
"mail" : { dbs: "prs_perslid_email", label: L("lcl_prs_person_email"), typ: "varchar", filter: "exact"},
@@ -45,13 +46,13 @@ model_persons =
"room" : { dbs: "prs_v_werkplek_gegevens.alg_ruimte_key", typ: "key", foreign: "alg_ruimte" }
},
includes: { "tracking": {
model: new model_tracking(['perslid']),
joinfield: "fac_tracking_refkey"
},
"authorization": {
includes: { "authorization": {
"model": new model_fac_gebruikersgroep(),
"joinfield": "user"
},
"tracking": {
model: new model_tracking(['perslid']),
joinfield: "fac_tracking_refkey"
}
},
@@ -69,6 +70,8 @@ model_persons =
}
var query = api2.sqlfields(params, model_persons );
query.tables.push("prs_v_perslid_fullnames_all");
query.wheres.push("prs_v_perslid_fullnames_all.prs_perslid_key(+) = prs_perslid.prs_perslid_key");
query.tables.push("prs_v_werkplek_gegevens");
query.tables.push("prs_v_hoofdperslidwerkplek");
query.wheres.push("prs_v_hoofdperslidwerkplek.prs_perslid_key(+) = prs_perslid.prs_perslid_key");