MARX#71880 Resourceplanboard: activiteitsoort-soort 2=restype O uitgewerkt. Objectenlijst ook doorklikbaar als niet uitleenbaar
svn path=/Website/trunk/; revision=55860
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
function add_reservation(opdr_key)
|
||||
{
|
||||
var url = "appl/res/res_reservering.asp?restype=CV&mld_opdr_key="+opdr_key+"&urole=fo"; //activiteit_key=11&
|
||||
var url = "appl/res/res_reservering.asp?restype=O&mld_opdr_key="+opdr_key+"&urole=fo"; //&res_srtactiviteit_soort=2
|
||||
FcltMgr.openDetail(url, "");
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
Description: Muteerscherm voor reserveringen
|
||||
Parameters: (allemaal optioneel)
|
||||
rsv_ruimte_key: te bewerken
|
||||
restype: "R" of "CV" om (via CV) alleen catering/objecten te reserven. "R" is default.
|
||||
restype: "R" of "CV" of "O" om (via CV) alleen catering/objecten te reserven. "R" is default.
|
||||
"O" is vanuit Opdrachten, een variant van CV, biedt de optie om bepaalde activiteiten (nl CV)
|
||||
niet te tonen.
|
||||
verynew: we zijn heel erg nieuw (net aangemaakt)
|
||||
gevolg:==> Bij CV wordt catering direct geopend
|
||||
==> ?? Automatisch multi voor alle deelreservingen ??
|
||||
@@ -196,6 +198,16 @@ if (rsv_ruimte_key == -1)
|
||||
oRs_a.Close();
|
||||
}
|
||||
|
||||
// letters van de ASP naar code in tabel
|
||||
function restype2srtactiviteit_soort (prestype)
|
||||
{
|
||||
var soortvalue;
|
||||
if (prestype == "R") soortvalue = 0;
|
||||
if (prestype == "CV") soortvalue = 1;
|
||||
if (prestype == "O") soortvalue = 2;
|
||||
return soortvalue;
|
||||
}
|
||||
|
||||
var restype;
|
||||
if (srtact > 0)
|
||||
{
|
||||
@@ -205,7 +217,7 @@ if (rsv_ruimte_key == -1)
|
||||
+ " FROM res_srtactiviteit sa"
|
||||
+ " WHERE sa.res_srtactiviteit_key = " + srtact;
|
||||
var oRs = Oracle.Execute(sql);
|
||||
var restype = oRs("res_srtactiviteit_soort").value == 0? "R" : "CV";
|
||||
var restype = ["R", "CV", "O"][oRs("res_srtactiviteit_soort").value]; // srtactiviteit_soort2restype()
|
||||
rrr.srtactiviteit_prefix = oRs("res_srtactiviteit_prefix").value || "";
|
||||
oRs.Close();
|
||||
}
|
||||
@@ -215,7 +227,6 @@ if (rsv_ruimte_key == -1)
|
||||
|
||||
rrr.met_eindtijd = meteindtijd;
|
||||
|
||||
//FCLTHeader.Title(restype=='R'?L("lcl_menu_rooms"):L("lcl_menu_res_fe_objects"));
|
||||
}
|
||||
else // Bestaande reservering
|
||||
{
|
||||
@@ -671,7 +682,7 @@ if (options.length > 1) {
|
||||
buttons.push( {id: "repeatbutton", title: L("lcl_res_add_deelres"), icon: "fa-clone", action: "makeMulti()" } );
|
||||
if (restype == "R")
|
||||
buttons.push( {id: "addspacebutton", title: L("lcl_res_add_deelresruimte"), icon: "fa-calendar-plus", action: "ruimteErbij('" + restype + "')" } );
|
||||
if (restype == "CV")
|
||||
if (restype == "CV") // en O??
|
||||
buttons.push( {id: "addpartresbutton", title: L("lcl_res_add_deelresreservering"), icon: "fa-layer-plus", action: "ruimteErbij('" + restype + "')" } );
|
||||
}
|
||||
if (multiDeel && this_res.couldCreate)
|
||||
@@ -726,7 +737,7 @@ if (options.length > 1) {
|
||||
+ " WHERE res_activiteit_verwijder IS NULL"
|
||||
+ " AND a.res_srtactiviteit_key = sa.res_srtactiviteit_key"
|
||||
+ " AND sa.res_srtactiviteit_key = " + srtact
|
||||
+ " AND sa.res_srtactiviteit_soort = " + (restype == "R"? "0" : "1")
|
||||
+ " AND sa.res_srtactiviteit_soort = " + restype2srtactiviteit_soort(restype)
|
||||
+ " AND EXISTS (SELECT rad.res_activiteit_key"
|
||||
+ " FROM res_activiteitdiscipline rad"
|
||||
+ " , ins_tab_discipline disc"
|
||||
@@ -848,7 +859,7 @@ if (options.length > 1) {
|
||||
+ " AND (g.fac_gebruiker_alg_level_write < 9"
|
||||
+ " AND g.fac_gebruiker_prs_level_write < 9)"
|
||||
+ " AND g.prs_perslid_key = " + user_key + ")"
|
||||
+ " AND sa.res_srtactiviteit_soort = " + (restype == "R"? "0" : "1")
|
||||
+ " AND sa.res_srtactiviteit_soort = " + restype2srtactiviteit_soort(restype)
|
||||
+ (urole == "fe"
|
||||
? " AND ra.res_activiteit_notfrontend = 0"
|
||||
: "")
|
||||
|
||||
@@ -162,33 +162,37 @@ oRs.Close();
|
||||
|
||||
function fnOmschrijving(oRs)
|
||||
{
|
||||
var this_ins = {canReadAny: false};
|
||||
// Alleen voor uitleenbare objecten autorisatie opvragen.
|
||||
if (oRs("ins_srtdeel_uitleenbaar").Value == 1)
|
||||
this_ins = ins.func_enabled_deel(oRs("ins_deel_key").Value);
|
||||
if (this_ins.canReadAny) // Als canReadAny true is, dan is het object ook uitleenbaar.
|
||||
{
|
||||
// doorklikbaar naar objectdetails
|
||||
var action = 'FcltMgr.openDetail("appl/ins/ins_deel.asp?urole=fo&ins_key=' + oRs('ins_deel_key').value + '"); FcltMgr.stopPropagation(event);';
|
||||
var returnval = "";
|
||||
|
||||
return "<a href='#' onclick='" + action + "'>" + safe.html(oRs("res_deel_omschrijving").value) + "</a> "
|
||||
+ (oRs("res_rsv_deel_prijs").value != 0 ? (oRs("inclBTW").value? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW")) : "")
|
||||
+ (oRs("verval").value == 0? L("lcl_inactive_data_suffix") : "");
|
||||
// Voor objecten de autorisatie opvragen om eventueel door te kunnen klikken (omdat dat bij personen ook kan)
|
||||
var this_ins = {canReadAny: false};
|
||||
if (oRs("ins_deel_key").Value != null) // alleen als res_deel is ins_deel
|
||||
{
|
||||
this_ins = ins.func_enabled_deel(oRs("ins_deel_key").Value);
|
||||
var action = ""; // default geen doorklik
|
||||
if (this_ins.canReadAny)
|
||||
{
|
||||
// doorklikbaar naar objectdetails, voor details of om uit te lenen
|
||||
if (oRs("ins_srtdeel_uitleenbaar").Value == 1 && this_ins.canWriteINSFOF)
|
||||
action = 'FcltMgr.openDetail("appl/ins/ins_deel.asp?urole=fo&ins_key=' + oRs('ins_deel_key').value + '"); FcltMgr.stopPropagation(event);';
|
||||
else
|
||||
action = 'FcltMgr.openDetail("appl/ins/ins_deel.asp?urole=bo&ins_key=' + oRs('ins_deel_key').value + '"); FcltMgr.stopPropagation(event);';
|
||||
}
|
||||
returnval = (action == "" ? safe.html(oRs("res_deel_omschrijving").value) + " "
|
||||
: "<a href='#' onclick='" + action + "'>" + safe.html(oRs("res_deel_omschrijving").value) + "</a> ")
|
||||
+ (oRs("res_rsv_deel_prijs").value != 0 ? (oRs("inclBTW").value ? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW")) : "")
|
||||
+ (oRs("verval").value == 0 ? L("lcl_inactive_data_suffix") : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (oRs("ins_deel_key").value == null)
|
||||
{ // als persoonlijke resource
|
||||
var action = 'FcltMgr.openDetail("appl/prs/prs_perslid.asp?urole=fe&prs_key=' + oRs('prs_perslid_key').value + '"); FcltMgr.stopPropagation(event);';
|
||||
return "<a href='#' onclick='" + action + "'>" + safe.html(oRs("res_deel_omschrijving").value) + "</a> " + safe.html(oRs("prs_srtperslid_omschrijving").value) + " "
|
||||
+ (oRs("res_rsv_deel_prijs").value != 0 ? (oRs("inclBTW").value? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW")) : "")
|
||||
+ (oRs("verval").value == 0? L("lcl_inactive_data_suffix") : "");
|
||||
}
|
||||
else // object
|
||||
return safe.html(oRs("res_deel_omschrijving").value + " "
|
||||
+ (oRs("res_rsv_deel_prijs").value != 0 ? (oRs("inclBTW").value? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW")) : "")
|
||||
+ (oRs("verval").value == 0? L("lcl_inactive_data_suffix") : ""));
|
||||
{ // persoonlijke resource
|
||||
// TODO: hier ook autorisatie checken of ik wel door mag klikken
|
||||
var action = 'FcltMgr.openDetail("appl/prs/prs_perslid.asp?urole=fe&prs_key=' + oRs('prs_perslid_key').value + '"); FcltMgr.stopPropagation(event);';
|
||||
returnval = "<a href='#' onclick='" + action + "'>" + safe.html(oRs("res_deel_omschrijving").value) + "</a> " + safe.html(oRs("prs_srtperslid_omschrijving").value) + " "
|
||||
+ (oRs("res_rsv_deel_prijs").value != 0 ? (oRs("inclBTW").value? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW")) : "")
|
||||
+ (oRs("verval").value == 0? L("lcl_inactive_data_suffix") : "");
|
||||
}
|
||||
|
||||
return returnval;
|
||||
}
|
||||
|
||||
function fnImage (oRs)
|
||||
|
||||
Reference in New Issue
Block a user