PCHW#41702 Activiteiten krijgen een (post)schoonmaaktijd, betreft res_rsv
svn path=/Website/trunk/; revision=36868
This commit is contained in:
@@ -66,6 +66,14 @@ function model_res_activiteit()
|
|||||||
"typ": "check",
|
"typ": "check",
|
||||||
"multiedit": true
|
"multiedit": true
|
||||||
},
|
},
|
||||||
|
"posttime": {
|
||||||
|
"dbs": "res_activiteit_posttime",
|
||||||
|
"label": L("res_activiteit_posttime"),
|
||||||
|
"typ": "float",
|
||||||
|
"defaultvalue": 0,
|
||||||
|
required: true,
|
||||||
|
"multiedit": true
|
||||||
|
},
|
||||||
"visitorsmandatory": {
|
"visitorsmandatory": {
|
||||||
"dbs": "res_activiteit_aantalverplicht",
|
"dbs": "res_activiteit_aantalverplicht",
|
||||||
"label": L("res_activiteit_aantalverplicht"),
|
"label": L("res_activiteit_aantalverplicht"),
|
||||||
|
|||||||
@@ -1481,6 +1481,7 @@ res = {
|
|||||||
+ " , rv.res_rsv_ruimte_host_key"
|
+ " , rv.res_rsv_ruimte_host_key"
|
||||||
+ " , rv.res_rsv_ruimte_contact_key"
|
+ " , rv.res_rsv_ruimte_contact_key"
|
||||||
+ " , rv.res_rsv_ruimte_omschrijving"
|
+ " , rv.res_rsv_ruimte_omschrijving"
|
||||||
|
+ " , ra.res_activiteit_posttime"
|
||||||
+ " , (SELECT count(1) FROM res_v_aanwezigrsv_artikel rra"
|
+ " , (SELECT count(1) FROM res_v_aanwezigrsv_artikel rra"
|
||||||
+ " WHERE rra.res_rsv_ruimte_key = rv.res_rsv_ruimte_key) aantalA" // dat de CV dirty kan zijn negeren we.
|
+ " WHERE rra.res_rsv_ruimte_key = rv.res_rsv_ruimte_key) aantalA" // dat de CV dirty kan zijn negeren we.
|
||||||
+ " , (SELECT count(1) FROM res_v_aanwezigrsv_deel rrd"
|
+ " , (SELECT count(1) FROM res_v_aanwezigrsv_deel rrd"
|
||||||
@@ -1488,7 +1489,8 @@ res = {
|
|||||||
+ " AND rrd.bez_bezoekers_key IS NULL) aantalD" // Uitsluiten parkeerplaatsen met een bez_bezoekers_key.
|
+ " AND rrd.bez_bezoekers_key IS NULL) aantalD" // Uitsluiten parkeerplaatsen met een bez_bezoekers_key.
|
||||||
+ " FROM res_v_aanwezigrsv_ruimte rv"
|
+ " FROM res_v_aanwezigrsv_ruimte rv"
|
||||||
+ " , res_ruimte_opstelling ro"
|
+ " , res_ruimte_opstelling ro"
|
||||||
+ (params.anonymous?", res_activiteit ra, res_srtactiviteit rsa":"")
|
+ " , res_activiteit ra"
|
||||||
|
+ (params.anonymous?", res_srtactiviteit rsa":"")
|
||||||
// ///////Koppelzalen meenemen want daardoor kunnen we ook bezet raken
|
// ///////Koppelzalen meenemen want daardoor kunnen we ook bezet raken
|
||||||
+ " , ( SELECT DISTINCT r1.res_ruimte_key res_ruimte_key_1, r2.res_ruimte_key res_ruimte_key_2, r2.alg_ruimte_key "
|
+ " , ( SELECT DISTINCT r1.res_ruimte_key res_ruimte_key_1, r2.res_ruimte_key res_ruimte_key_2, r2.alg_ruimte_key "
|
||||||
+ " FROM res_alg_ruimte r1, res_alg_ruimte r2 "
|
+ " FROM res_alg_ruimte r1, res_alg_ruimte r2 "
|
||||||
@@ -1499,10 +1501,10 @@ res = {
|
|||||||
+ " WHERE rv.res_rsv_ruimte_van between " + params.res_van.toSQL() + " AND " + params.res_tot.endToSQL()
|
+ " WHERE rv.res_rsv_ruimte_van between " + params.res_van.toSQL() + " AND " + params.res_tot.endToSQL()
|
||||||
+ " AND rv.res_ruimte_opstel_key = ro.res_ruimte_opstel_key"
|
+ " AND rv.res_ruimte_opstel_key = ro.res_ruimte_opstel_key"
|
||||||
+ " AND X.res_ruimte_key_2 = ro.res_ruimte_key"
|
+ " AND X.res_ruimte_key_2 = ro.res_ruimte_key"
|
||||||
|
+ " AND rv.res_activiteit_key = ra.res_activiteit_key"
|
||||||
+ (params.anonymous
|
+ (params.anonymous
|
||||||
? " AND rv.res_activiteit_key = ra.res_activiteit_key"
|
? " AND ra.res_srtactiviteit_key = rsa.res_srtactiviteit_key"
|
||||||
+ " AND ra.res_srtactiviteit_key = rsa.res_srtactiviteit_key"
|
: "")
|
||||||
: "")
|
|
||||||
+ (params.res_ruimte_key && !params.forSelectRoom
|
+ (params.res_ruimte_key && !params.forSelectRoom
|
||||||
? " AND res_ruimte_key_1=" + params.res_ruimte_key
|
? " AND res_ruimte_key_1=" + params.res_ruimte_key
|
||||||
: "")
|
: "")
|
||||||
@@ -1533,6 +1535,8 @@ res = {
|
|||||||
res_tot : new Date(oRs("res_rsv_ruimte_tot").Value),
|
res_tot : new Date(oRs("res_rsv_ruimte_tot").Value),
|
||||||
fo_status : oRs("res_status_fo_key").Value
|
fo_status : oRs("res_status_fo_key").Value
|
||||||
};
|
};
|
||||||
|
if (oRs("res_activiteit_posttime").Value)
|
||||||
|
data.act_post_time = oRs("res_activiteit_posttime").Value;
|
||||||
if (oRs("res_rsv_ruimte_flag").Value)
|
if (oRs("res_rsv_ruimte_flag").Value)
|
||||||
data.flag_status = oRs("res_rsv_ruimte_flag").Value;
|
data.flag_status = oRs("res_rsv_ruimte_flag").Value;
|
||||||
if (oRs("res_ruimte_key_1").Value != oRs("res_ruimte_key_2").Value)
|
if (oRs("res_ruimte_key_1").Value != oRs("res_ruimte_key_2").Value)
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ function set_will_fit(plan_rooms_info, plan_bezet_info, params)
|
|||||||
{
|
{
|
||||||
var is_nofit = false;
|
var is_nofit = false;
|
||||||
var room = plan_rooms_info[i_room];
|
var room = plan_rooms_info[i_room];
|
||||||
|
|
||||||
|
room.post_time = Math.max(room.prepost_time, params.act_post_time);
|
||||||
|
|
||||||
var ar = plan_bezet_info[room.res_ruimte_key];
|
var ar = plan_bezet_info[room.res_ruimte_key];
|
||||||
|
|
||||||
var df = params.res_van.getHours() + params.res_van.getMinutes()/60;
|
var df = params.res_van.getHours() + params.res_van.getMinutes()/60;
|
||||||
@@ -46,8 +49,11 @@ function set_will_fit(plan_rooms_info, plan_bezet_info, params)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (params.res_van.getTime() - room.prepost_time*60*60*1000 < ar[ci].res_tot.getTime()
|
// deze_room.pre_time = Max van deze_room.prepost_time en geplande_room.activity.post_time
|
||||||
&& params.res_tot.getTime() + room.prepost_time*60*60*1000 > ar[ci].res_van.getTime())
|
room.pre_time = (ar[ci].act_post_time ? Math.max(room.prepost_time, ar[ci].act_post_time) : room.prepost_time);
|
||||||
|
|
||||||
|
if (params.res_van.getTime() - room.pre_time *60*60*1000 < ar[ci].res_tot.getTime()
|
||||||
|
&& params.res_tot.getTime() + room.post_time*60*60*1000 > ar[ci].res_van.getTime())
|
||||||
is_nofit = true; // Overlap!
|
is_nofit = true; // Overlap!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -190,13 +196,15 @@ function make_plan_regel(room, ar, params, nr_days, hour_px)
|
|||||||
var theStyleLeft = ""; // voor cleaning blokje afmeting
|
var theStyleLeft = ""; // voor cleaning blokje afmeting
|
||||||
var theStyleRight = "";
|
var theStyleRight = "";
|
||||||
// Perhaps cleaning time, alleen optie en definitief
|
// Perhaps cleaning time, alleen optie en definitief
|
||||||
if (room.prepost_time > 0 && (ar[ci].fo_status == 1 || ar[ci].fo_status == 2))
|
// room.post_time >= room.prepost_time (always)
|
||||||
|
|
||||||
|
if (room.post_time > 0 && (ar[ci].fo_status == 1 || ar[ci].fo_status == 2))
|
||||||
{
|
{
|
||||||
theClass += " res_cleaning";
|
theClass += " res_cleaning";
|
||||||
|
|
||||||
// maximaal kwartier 'doorschieten' links/rechts
|
// maximaal kwartier 'doorschieten' links/rechts
|
||||||
var preclean = Math.min(room.prepost_time, h_start - S("res_t1") + 0.25);
|
var preclean = Math.min(room.prepost_time, h_start - S("res_t1") + 0.25);
|
||||||
var postclean = Math.min(room.prepost_time, S("res_t2") - h_end + 0.25);
|
var postclean = Math.min(room.post_time, S("res_t2") - h_end + 0.25);
|
||||||
|
|
||||||
if ( Math.round(hour_px * postclean - 1) > 0 )
|
if ( Math.round(hour_px * postclean - 1) > 0 )
|
||||||
theStyleRight = "border-right-width:"+Math.round(hour_px * postclean - 1)+"px;"
|
theStyleRight = "border-right-width:"+Math.round(hour_px * postclean - 1)+"px;"
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ var activiteit_key = getQParamInt("activiteit_key");
|
|||||||
var sql = "SELECT res_srtactiviteit_key, "
|
var sql = "SELECT res_srtactiviteit_key, "
|
||||||
+ lcl.xsqla('a.res_activiteit_omschrijving', 'a.res_activiteit_key')
|
+ lcl.xsqla('a.res_activiteit_omschrijving', 'a.res_activiteit_key')
|
||||||
+ " , a.res_activiteit_duur"
|
+ " , a.res_activiteit_duur"
|
||||||
|
+ " , a.res_activiteit_posttime"
|
||||||
+ " FROM res_activiteit a"
|
+ " FROM res_activiteit a"
|
||||||
+ " WHERE res_activiteit_key = " + activiteit_key;
|
+ " WHERE res_activiteit_key = " + activiteit_key;
|
||||||
var oRs = Oracle.Execute(sql);
|
var oRs = Oracle.Execute(sql);
|
||||||
@@ -67,6 +68,7 @@ var params = {id: "tab_room_sched",
|
|||||||
rsv_ruimte_key: rsv_ruimte_key,
|
rsv_ruimte_key: rsv_ruimte_key,
|
||||||
vis: vis,
|
vis: vis,
|
||||||
activiteit_key: activiteit_key,
|
activiteit_key: activiteit_key,
|
||||||
|
act_post_time: oRs("res_activiteit_posttime").Value,
|
||||||
srtact: oRs("res_srtactiviteit_key").Value,
|
srtact: oRs("res_srtactiviteit_key").Value,
|
||||||
forSelectRoom: true,
|
forSelectRoom: true,
|
||||||
authparams: user.checkAutorisation(autfunction, null, null, true), // pessimistisch
|
authparams: user.checkAutorisation(autfunction, null, null, true), // pessimistisch
|
||||||
|
|||||||
Reference in New Issue
Block a user