diff --git a/APPL/Pictures/resflag0.png b/APPL/Pictures/resflag0.png new file mode 100644 index 0000000000..849033c131 Binary files /dev/null and b/APPL/Pictures/resflag0.png differ diff --git a/APPL/Pictures/resflag1.png b/APPL/Pictures/resflag1.png new file mode 100644 index 0000000000..694550c126 Binary files /dev/null and b/APPL/Pictures/resflag1.png differ diff --git a/APPL/Pictures/resflag2.png b/APPL/Pictures/resflag2.png new file mode 100644 index 0000000000..e472d6bdd3 Binary files /dev/null and b/APPL/Pictures/resflag2.png differ diff --git a/APPL/Pictures/resflag3.png b/APPL/Pictures/resflag3.png new file mode 100644 index 0000000000..7b3fa117c7 Binary files /dev/null and b/APPL/Pictures/resflag3.png differ diff --git a/APPL/Pictures/resflag4.png b/APPL/Pictures/resflag4.png new file mode 100644 index 0000000000..1b8e781e09 Binary files /dev/null and b/APPL/Pictures/resflag4.png differ diff --git a/APPL/Pictures/resflag5.png b/APPL/Pictures/resflag5.png new file mode 100644 index 0000000000..a002fb01b9 Binary files /dev/null and b/APPL/Pictures/resflag5.png differ diff --git a/APPL/Pictures/resflag6.png b/APPL/Pictures/resflag6.png new file mode 100644 index 0000000000..73818ab392 Binary files /dev/null and b/APPL/Pictures/resflag6.png differ diff --git a/APPL/Pictures/resflag7.png b/APPL/Pictures/resflag7.png new file mode 100644 index 0000000000..abbdd128a0 Binary files /dev/null and b/APPL/Pictures/resflag7.png differ diff --git a/APPL/Pictures/resflag8.png b/APPL/Pictures/resflag8.png new file mode 100644 index 0000000000..70057a0189 Binary files /dev/null and b/APPL/Pictures/resflag8.png differ diff --git a/APPL/Pictures/resflag9.png b/APPL/Pictures/resflag9.png new file mode 100644 index 0000000000..0773585f11 Binary files /dev/null and b/APPL/Pictures/resflag9.png differ diff --git a/APPL/RES/res.inc b/APPL/RES/res.inc index 6224e8d29b..7409ba3e9c 100644 --- a/APPL/RES/res.inc +++ b/APPL/RES/res.inc @@ -393,6 +393,7 @@ res = { return statustekst; }, + // Controleert/bepaalt de rechten op het 'Algemeen' blok bij een (deel)reservering // Altijd worden de disciplines van de catering/voorziening bekeken // Voor restype=="R" wordt ook de discipline van de RES_RUIMTE bekeken @@ -1088,7 +1089,7 @@ res = { + " , rv.res_rsv_ruimte_tot" + " , rv.res_rsv_ruimte_dirtlevel" + " , res_ruimte_key_1" - + " , rv.res_status_fo_key, rv.res_reservering_key, res_rsv_ruimte_volgnr, rv.res_rsv_ruimte_key, res_ruimte_key_2" + + " , rv.res_status_fo_key, rv.res_rsv_ruimte_flag, rv.res_reservering_key, res_rsv_ruimte_volgnr, rv.res_rsv_ruimte_key, res_ruimte_key_2" + " , rv.res_rsv_ruimte_host_key" + " , rv.res_rsv_ruimte_contact_key" + " , rv.res_rsv_ruimte_omschrijving" @@ -1134,6 +1135,7 @@ res = { var data = { res_van : new Date(oRs("res_rsv_ruimte_van").value), res_tot : new Date(oRs("res_rsv_ruimte_tot").value), fo_status : oRs("res_status_fo_key").value, + flag_status : oRs("res_rsv_ruimte_flag").value||0, na_koppel : (oRs("res_ruimte_key_1").value == oRs("res_ruimte_key_2").value)? 0 : 1, //aantalP : oRs("aantalP").value, // doen we nog niets mee dirtlevel : oRs("res_rsv_ruimte_dirtlevel").value diff --git a/APPL/RES/res_edit_rsv_ruimte.asp b/APPL/RES/res_edit_rsv_ruimte.asp index 0a335e0324..a6f996d257 100644 --- a/APPL/RES/res_edit_rsv_ruimte.asp +++ b/APPL/RES/res_edit_rsv_ruimte.asp @@ -122,6 +122,7 @@ FCLTHeader.Requires({plugins: ["jQuery", "kenmerk"], reservering_key : -1, status_fo_key : urole=='fo'?S("res_default_fo_status_key"):2, status_bo_key : 2, // default 2, ingevoerd + status_flag : 0, activiteit_key : activiteit_key, srtactiviteit_key : srtact, alg_ruimte_key : getQParamInt("alg_ruimte_key", S("res_default_alg_ruimte_key")), @@ -342,6 +343,7 @@ FCLTHeader.Requires({plugins: ["jQuery", "kenmerk"], sql = "SELECT rr.res_reservering_key, " + " rrr.res_status_fo_key, " + " rrr.res_status_bo_key, " + + " rrr.res_rsv_ruimte_flag, " + " rrr.res_rsv_ruimte_van, " + " rrr.res_rsv_ruimte_tot, " + " rrr.res_activiteit_key, " @@ -394,6 +396,7 @@ FCLTHeader.Requires({plugins: ["jQuery", "kenmerk"], reservering_key : oRs("res_reservering_key").value, status_fo_key : oRs("res_status_fo_key").value, status_bo_key : oRs("res_status_bo_key").value||2, // default 2, ingevoerd + status_flag : oRs("res_rsv_ruimte_flag").value||0, activiteit_key : oRs("res_activiteit_key").value, srtactiviteit_key : srtact, rsv_ruimte_van : new Date(oRs("res_rsv_ruimte_van").value), @@ -475,6 +478,16 @@ FCLTHeader.Requires({plugins: ["jQuery", "kenmerk"], rrr.alg_verdieping_key = oRs("alg_verdieping_key").Value; rrr.alg_ruimte_key = oRs("alg_ruimte_key").Value; } + + // Script zorgt ervoor dat ook bij het openen van het scherm de image achter het label komt te staan. +%> + +<% } lcl.set_dialect(srtact, "RES_SRTACTIVITEIT_KEY"); @@ -747,6 +760,12 @@ FCLTHeader.Requires({plugins: ["jQuery", "kenmerk"], autosetEindtijd(); } + function OnChangeSubstatus() + { + var i = $("#resflag").val(); + $('label[for="resflag"]').html(L("lcl_res_flags") + ": " + " " + ""); + } + function onAfhaalBezorgClick() { $("#ab_mode_filtcode").val( $("#afhaal").prop("checked")? "RESA" : "RESB" ); @@ -1069,6 +1088,23 @@ FCLTHeader.Requires({plugins: ["jQuery", "kenmerk"], } ); + if (S("res_reservering_flags") > 0) + { + flag_array = []; + for (i=0; i 0) + fields.push({ dbs: "res_rsv_ruimte_flag", typ: "number", frm: "resflag" /* notrack */ }); + + // Afhalen of bezorgen alleen voor CV reserveringen if (restype == "CV") { diff --git a/APPL/RES/res_list.inc b/APPL/RES/res_list.inc index e52acdca41..2a9e1cef99 100644 --- a/APPL/RES/res_list.inc +++ b/APPL/RES/res_list.inc @@ -151,6 +151,7 @@ function res_list (pautfunction, params) var res_closed = params.res_closed; var sortout = params.sortout; var groupres = params.groupres; + var flags = params.flags||[]; var roa_arr = new Array(); // array met *alle* disciplines roa_arr = roa_arr.concat(room_key_arr); @@ -214,10 +215,10 @@ function res_list (pautfunction, params) + " (SELECT *" + " FROM res_rsv_ruimte WHERE 1=1"; - if (res_key) - theResrsv += " AND res_reservering_key = " + res_key - else - { // If there is no res_key then determine sql_date + if (res_key) + theResrsv += " AND res_reservering_key = " + res_key + else + { // If there is no res_key then determine sql_date // If from and to are given both are used // If only one of from and to are give, this is used as a (1) day, not an half open interval // 20-10-2009 9:46:28/PF @@ -250,7 +251,12 @@ function res_list (pautfunction, params) if (host_key) theResrsv += " AND res_rsv_ruimte_host_key = " + host_key; - } + // Flags + if (params.flags && params.flags.length > 0 && params.flags.length < S("res_reservering_flags")) + { + theResrsv += " AND res_rsv_ruimte_flag IN (" + params.flags.join(",") + ")"; + } + } if (frontend) // Altijd de FE-autorisatie erop { @@ -283,6 +289,7 @@ function res_list (pautfunction, params) + ", rm.res_rsv_ruimte_key" + ", rm.res_rsv_ruimte_omschrijving descr" + ", rm.res_status_fo_key" + + ", rm.res_rsv_ruimte_flag" + ", rm.res_rsv_ruimte_dirtlevel dirtlevel" + "," + lcl.xsql('r.res_ruimte_nr', 'r.res_ruimte_key') + " waar" + ", res_rsv_ruimte_van datumvan" @@ -418,6 +425,7 @@ function res_list (pautfunction, params) + ", rvarr.res_rsv_ruimte_key" + ", res_rsv_ruimte_omschrijving descr" + ", rvarr.res_status_fo_key" + + ", rvarr.res_rsv_ruimte_flag" + ", rd.res_rsv_deel_dirtlevel dirtlevel" + ", alg_ruimte_aanduiding waar" + ", res_rsv_ruimte_van datumvan" @@ -521,6 +529,7 @@ function res_list (pautfunction, params) + ", rvarr.res_rsv_ruimte_key" + ", res_rsv_ruimte_omschrijving descr" + ", rvarr.res_status_fo_key" + + ", rvarr.res_rsv_ruimte_flag" + ", ra.res_rsv_artikel_dirtlevel dirtlevel" + ", alg_ruimte_aanduiding waar" + ", ra.res_rsv_artikel_levering datumvan" @@ -575,6 +584,7 @@ function res_list (pautfunction, params) sql_select = " rec2.res_reservering_key" + ", rec2.descr" + ", rec2.res_status_fo_key" + + ", rec2.res_rsv_ruimte_flag" + ", rec2.dirtlevel" + ", rec2.waar" + ", MIN(rec2.datumvan) datumvan" @@ -604,6 +614,7 @@ function res_list (pautfunction, params) sql_groupby = " rec2.res_reservering_key" + ", rec2.descr" + ", rec2.res_status_fo_key" + + ", rec2.res_rsv_ruimte_flag" + ", rec2.dirtlevel" + ", rec2.waar" + ", rec2.contact" @@ -619,7 +630,8 @@ function res_list (pautfunction, params) + ", rec2.res_rsv_ruimte_key" + ", rec2.res_srtactiviteit_prefix"; - if (fronto) { + if (fronto) + { if (!res_key && sql_onrgoed != "") sqlA += sql_onrgoed; @@ -659,6 +671,7 @@ function res_list (pautfunction, params) + ", res_rsv_ruimte_key" + ", descr" + ", res_status_fo_key" + + ", res_rsv_ruimte_flag" + ", MAX(dirtlevel) dirtlevel" + ", waar" + ", datumvan" @@ -679,6 +692,7 @@ function res_list (pautfunction, params) + ", res_rsv_ruimte_key" + ", descr" + ", res_status_fo_key" + + ", res_rsv_ruimte_flag" + ", waar" + ", datumvan" + ", datumtot" @@ -811,6 +825,28 @@ function res_list (pautfunction, params) return res.getfostatustext(oRs("res_status_fo_key").value); } + function fncolFlags(oRs) + { + var reskey = oRs("res_reservering_key").Value; + var flagkey = oRs("res_rsv_ruimte_flag").Value || 0; + + var displ = flagkey||""; + if (!excel) // maak er dan nog leuke plaatjes van + { + // Je hoeft er niet op te kunnen klikken, dus voor flag0 niets tonen. + if (flagkey != 0) + { + var flagimg = ""; + // Met hidden flagkey voor sortering. 999 zorgt dat bij 1 keer sorteren de gevlagde direct bovenaan staan + var ttl = L("lcl_res_flag" + flagkey); + displ = "
" + + flagimg + + ""+(flagkey||999)+"
"; + } + } + return displ; + } + function fnHasVZ(oRs) { if (oRs("nrObjects").value > 0) @@ -856,6 +892,8 @@ function res_list (pautfunction, params) }); // Kolommen + if (S("res_reservering_flags") > 0) + rst.addColumn(new Column({caption: "o", content: fncolFlags, align: "center"})); rst.addColumn(new Column({caption: L("lcl_resnr"), content: fncolResNr })); rst.addColumn(new Column({caption: L("lcl_room_n"), content: "waar", hasActions: true})); // Compacter op scherm als datefrom==dateto @@ -954,6 +992,12 @@ function res_list (pautfunction, params) else if (srtact) sql_act = " AND ract.res_srtactiviteit_key = " + srtact; + // Flags + if (params.flags && params.flags.length > 0 && params.flags.length < S("res_reservering_flags")) + { + sql_flag = " AND rrr.res_rsv_ruimte_flag IN (" + params.flags.join(",") + ")"; + } + if (room_key_arr.length != 0) sql_room_key = " AND res_discipline_key IN (" + room_key_arr.join(",") + ")"; diff --git a/APPL/RES/res_plan_room.inc b/APPL/RES/res_plan_room.inc index 3121dd277f..d3daf1710d 100644 --- a/APPL/RES/res_plan_room.inc +++ b/APPL/RES/res_plan_room.inc @@ -175,6 +175,12 @@ function make_plan_regel(room, ar, params, nr_days, hour_px) } } + var res_flag = ""; + if ((S("res_reservering_flags") > 0) && (ar[ci].flag_status != 0)) + { + res_flag = ""; + } + if (ar[ci].na_koppel == 0 && !not_available && !params.forSelectRoom) theClass += " click"; @@ -190,7 +196,7 @@ function make_plan_regel(room, ar, params, nr_days, hour_px) div += " title='" + safe.htmlattr(txt) + "'" } div += " style='z-index:"+ci+";left:"+px_start+"px;width:"+px_width+"px;"+theStyleLeft+theStyleRight+"'>" - +" "; + +res_flag+" "; html.push("\n"+div); } html.push("") diff --git a/APPL/RES/res_search.asp b/APPL/RES/res_search.asp index 5d59bb8f45..bcc71da6b4 100644 --- a/APPL/RES/res_search.asp +++ b/APPL/RES/res_search.asp @@ -286,6 +286,26 @@ var authparams = user.checkAutorisation(autfunction); }); } // !frontend + if (S("res_reservering_flags") > 1 && !frontend) // Flags checkboxen --> + { +%> + + + +<% // Vlag0 heeft dezelfde betekenis als 'geen vlag' en krijgt geen vinkje + for (flagkey=1; flagkey < S("res_reservering_flags"); flagkey++) + { +%> + +<% + } +%> + + +<% + } + + if (backo || minfo) { %> diff --git a/APPL/RES/res_search_list.asp b/APPL/RES/res_search_list.asp index 6f1b617247..43b7638f3b 100644 --- a/APPL/RES/res_search_list.asp +++ b/APPL/RES/res_search_list.asp @@ -123,6 +123,14 @@ else params.res_open = (backo || minfo? res_open : null); // Wordt alleen gebruikt bij bo en mi params.res_closed = (backo || minfo? res_closed : null); // Wordt alleen gebruikt bij bo en mi params.res_noshowonly = (getFParam("res_noshowonly", "") == "on"); // Wordt alleen gebruikt bij bo en mi + + // Flags + params.flags = []; + for (flagkey=0; flagkey < S("res_reservering_flags"); flagkey++) + { + if (getFParam("flag" + flagkey, "off") == "on") + params.flags.push(flagkey); + } } var sortout = getFParamInt("sortout", -1); // Sortering diff --git a/APPL/RES/res_search_plan_room.asp b/APPL/RES/res_search_plan_room.asp index c0a02d2b20..8168347c8f 100644 --- a/APPL/RES/res_search_plan_room.asp +++ b/APPL/RES/res_search_plan_room.asp @@ -339,6 +339,20 @@ hour_px = res.hour_px(width_px-300, nr_days); <% = L("lcl_niet_beschikbaar") %> +<% + if (S("res_reservering_flags") > 1) + { + for (flagIndex=1; flagIndex + + + <% = L("lcl_res_flag" + flagIndex) %> + +<% } + } +%> + <% if (urole != 'fe') { %> diff --git a/APPL/RES/res_show_rsv_ruimte.asp b/APPL/RES/res_show_rsv_ruimte.asp index fa20e0ec1f..2c4afe3b38 100644 --- a/APPL/RES/res_show_rsv_ruimte.asp +++ b/APPL/RES/res_show_rsv_ruimte.asp @@ -53,6 +53,7 @@ FCLTHeader.Requires({plugins: ["jQuery"]}) + " res_rsv_ruimte_verwijder, " + " rrr.res_status_fo_key, " + " rrr.res_status_bo_key, " + + " rrr.res_rsv_ruimte_flag, " + " rrr.res_rsv_ruimte_van, " + " rrr.res_rsv_ruimte_tot, " + " trunc(rrr.res_rsv_ruimte_tot) - trunc(rrr.res_rsv_ruimte_van) meerdaags, " @@ -99,6 +100,7 @@ FCLTHeader.Requires({plugins: ["jQuery"]}) rsv_ruimte_verwijder: oRs("res_rsv_ruimte_verwijder").value, status_fo_key : oRs("res_status_fo_key").value, status_bo_key : oRs("res_status_bo_key").value || 2, // let op: bij CV is deze NULL + status_flag : oRs("res_rsv_ruimte_flag").value||0, activiteit_key : oRs("res_activiteit_key").value, rsv_ruimte_van : new Date(oRs("res_rsv_ruimte_van").value), rsv_ruimte_tot : new Date(oRs("res_rsv_ruimte_tot").value), @@ -378,7 +380,15 @@ FCLTHeader.Requires({plugins: ["jQuery"]}) }); } ROFIELDTR("fldresstatus", L("lcl_status_FO"), res.getfostatustext(rrr.status_fo_key)); - + if (S("res_reservering_flags") > 0) + { + ROFIELDTR("fld", L("lcl_res_flags") + , L("lcl_res_flag"+rrr.status_flag) + , { html: "style='padding-left: 20px; background-repeat: no-repeat; background-image: url(../Pictures/resflag"+rrr.status_flag+".png)'" + , suppressEmpty: true + } + ); + } BLOCK_END() BLOCK_START("resUser",L("lcl_res_info"));