FSN#36616 API2 (tbv. SSC Heerlen): Afdeling-bezetting per Room kunnen ophalen
svn path=/Website/branches/v2016.1/; revision=29573
This commit is contained in:
63
APPL/API2/model_prs_ruimteafdeling.inc
Normal file
63
APPL/API2/model_prs_ruimteafdeling.inc
Normal file
@@ -0,0 +1,63 @@
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: model_prs_ruimteafdeling.inc
|
||||
|
||||
Description:
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<%
|
||||
|
||||
function model_prs_ruimteafdeling()
|
||||
{
|
||||
this.table = "prs_ruimteafdeling";
|
||||
this.primary = "prs_ruimteafdeling_key";
|
||||
this.records_name = "prs_ruimteafdelings";
|
||||
this.record_name = "prs_ruimteafdeling";
|
||||
this.autfunction = "WEB_ALGUSE";
|
||||
this.record_title = L("prs_ruimteafdeling");
|
||||
this.records_title = L("prs_ruimteafdeling_m");
|
||||
|
||||
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "prs_ruimteafdeling_key",
|
||||
"label": "Key",
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "prs_s_prs_ruimteafdeling_key"
|
||||
},
|
||||
"department": {
|
||||
"dbs": "prs_afdeling_key",
|
||||
"label": L("lcl_prs_organisatie"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"foreign": "PRS_AFDELING"
|
||||
},
|
||||
"room": {
|
||||
"dbs": "alg_ruimte_key",
|
||||
"label": L("lcl_room"),
|
||||
"typ": "key",
|
||||
"required": true
|
||||
},
|
||||
"occupation": {
|
||||
"dbs": "prs_ruimteafdeling_bezetting",
|
||||
"label": L("lcl_prs_ruimtebezetting"),
|
||||
"typ": "float",
|
||||
"required": true
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
this.REST_GET = generic_REST_GET(this);
|
||||
this.REST_POST = generic_REST_POST(this);
|
||||
this.REST_PUT = generic_REST_PUT(this);
|
||||
this.REST_DELETE = generic_REST_DELETE(this);
|
||||
}
|
||||
%>
|
||||
@@ -15,6 +15,7 @@
|
||||
<!-- #include file="./model_cadcontours.inc" -->
|
||||
<!-- #include file="./model_custom_fields.inc"-->
|
||||
<!-- #include file="./model_tracking.inc"-->
|
||||
<!-- #include file="./model_prs_ruimteafdeling.inc"-->
|
||||
<%
|
||||
function model_rooms(room_key, params)
|
||||
{
|
||||
@@ -75,14 +76,19 @@ function model_rooms(room_key, params)
|
||||
+ " AND sync.cad_tekening_key = cad_imp_contour.cad_tekening_key(+)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom_fields" : { model: new model_custom_fields(this, "ALG", { readman: true, readuse: true }),
|
||||
joinfield: "flexparentkey"
|
||||
},
|
||||
},
|
||||
"custom_fields" : {
|
||||
"model": new model_custom_fields(this, "ALG", { readman: true, readuse: true }),
|
||||
"joinfield": "flexparentkey"
|
||||
},
|
||||
"tracking": {
|
||||
model: new model_tracking(['ruimte']),
|
||||
joinfield: "fac_tracking_refkey"
|
||||
}
|
||||
"model": new model_tracking(["ruimte"]),
|
||||
"joinfield": "fac_tracking_refkey"
|
||||
},
|
||||
"departments": {
|
||||
"model": new model_prs_ruimteafdeling(),
|
||||
"joinfield": "room"
|
||||
}
|
||||
}
|
||||
|
||||
function _check_authorization (params, method)
|
||||
|
||||
Reference in New Issue
Block a user