Merge 2022.2 Gold D patches (2/2)

svn path=/Website/trunk/; revision=57077
This commit is contained in:
2022-09-01 17:58:29 +00:00
parent 4ed1489b4f
commit 494899d0cc
9 changed files with 60 additions and 44 deletions

View File

@@ -128,8 +128,11 @@ function model_prs_bedrijfdienstlocatie()
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
if (!(bedrijf_key > -1 || prs_key > -1))
if (user.has("WEB_PRSMSU")) {
this.REST_PUT = generic_REST_PUT(this);
}
if (!(bedrijf_key > -1 || prs_key > -1)) {
this.REST_DELETE = generic_REST_DELETE(this);
}
}
%>

View File

@@ -27,7 +27,9 @@ function model_prs_dienst()
this.record_name = "service";
this.table = "prs_dienst";
this.primary = "prs_dienst_key";
this.autfunction = ["WEB_PRSMSU", (prsauthparams.readcontact ? prsauthparams.fac_functie_code : "")]
this.autfunction = ["WEB_PRSMSU"]
if (prsauthparams.readcontact)
this.autfunction.push("WEB_EXTREL");
this.record_title = L("prs_dienst");
this.records_title = L("prs_dienst_m");
@@ -155,17 +157,13 @@ function model_prs_dienst()
this.REST_GET = generic_REST_GET(this, gparams);
this.REST_POST = generic_REST_POST(this);
if (hasQParam("company") && company_key == -1)
{ // Vanuit het tabblad Service mogen de knoppen Wijzigen en Verwijderen niet aanwezig zijn.
// Als dit scherm wordt aangeroepen vanuit het tabblad Admin moeten ze er natuurlijk wel zijn.
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this, {});
}
if (hasQParam("person"))
{
this.REST_DELETE = generic_REST_DELETE(this, {});
if (prs_key == -1)
if (user.has("WEB_PRSMSU") && // Nvt met alleen EXTREL
(hasQParam("company") && !(company_key > -1)) ||
(hasQParam("person") && !(prs_key > -1))) {
// Vanuit het tabblad Service mogen de knoppen Wijzigen en Verwijderen niet aanwezig zijn.
// Als dit scherm wordt aangeroepen vanuit het tabblad Admin moeten ze er natuurlijk wel zijn.
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this, {});
}
}
%>

View File

@@ -20,12 +20,7 @@ var model_params = {
]
},
"list": {
"columns": [
(bedrijf_key > -1 ? "company" : "person"),
"location",
"building",
"duration"
],
"columns": [],
"requires": {
js: ["./prs_bedrijfdienstlocatie.js"]
}
@@ -45,6 +40,10 @@ var model_params = {
"service": dienst_key
}
};
model_params.list.columns = ( bedrijf_key > -1
? ["company", "location", "building", "duration"]
: ["person"]
);
function _main_block_title()
{
@@ -75,13 +74,6 @@ if (mode == "list")
{ icon: "fa-map-marker-edit fa-lg", title: L("lcl_prs_dienst_edit_scope"), action: "scf_add_location("+dienst_key+","+bedrijf_key+")", id: "btn_scf_my_add" }
];
}
if (prs_key > -1)
{
// Voeg een knop voor toevoegen van dienst aan persoon toe.
model_params.list.buttons = [
{ icon: "fa-plus", title: L("lcl_add"), action: "scf_add_service("+dienst_key+","+prs_key+")", id: "btn_scf_my_add" }
];
}
model_params.list.buttons.push({ icon: "fa-trash-alt", title: L("lcl_prs_del_bedrijfdienst"), action: "scf_del_bedrijfdienst()", id: "btn_scf_my_del" });
}

View File

@@ -36,7 +36,6 @@ function scf_del_bedrijfdienst()
id: scfKeyString
};
protectRequest.dataToken(data);
console.log(scfKeyString);
$.post("./prs_bedrijfdienstlocatie.asp?mode=delete&multi=" + (rowArray.length > 1 ? "1" : "0"),
data,
FcltCallbackAndThen(function() {

View File

@@ -41,34 +41,32 @@ var model_params = {
}
}
if (bedrijf_key > -1)
if (bedrijf_key > -1 || perslid_key > -1)
{
model_params.wrap = {
"frames": [
{ id: "bedrijfdienstlocatie",
url: "prs_bedrijfdienstlocatie.asp?mode=list&service={0}&company="+bedrijf_key+"&person="+perslid_key,
autfunction: "WEB_PRSMSU",
autfunction: this_model.autfunction,
title: L("lcl_prs_dienst_scope"),
icon: "fa-list"
}
]
};
model_params.transit = { "company": bedrijf_key };
}
else
{
if (bedrijf_key > -1) {
model_params.transit = { "company": bedrijf_key };
} else {
model_params.transit = { "person": perslid_key };
}
if (mode == "list")
{
if (mode == "list") {
// Voeg een knop voor toevoegen van dienst aan bedrijf toe.
model_params.list.buttons = [{ icon: "fa-plus", title: L("lcl_add"), action: "scf_add_service("+bedrijf_key+", "+perslid_key+")", id: "btn_scf_my_add" }];
if (hasCollapsed)
model_params.edit.modal = false;
}
else if (mode == "show" && bedrijf_key > -1)
{
} else if (mode == "show" && (bedrijf_key > -1 || perslid_key > -1)) {
model_params.show.buttons = [{ icon: "fa-trash-alt", title: L("lcl_prs_del_bedrijfdienst"), action: "scf_del_bedrijfdienst()", id: "btn_scf_my_del" }];
%>
<script>

View File

@@ -17,14 +17,13 @@
<!-- #include file="../prs/prs.inc" -->
<%
FCLTHeader.Requires({plugins:["suggest","jQuery"], js: ["jQuery-ui.js"]})
// jQuery-ui.js is nodig in het child formulier prs_perslidwerkplek_search_list
// jQuery-ui.js is nodig in het child formulier prs_perslidwerkplek_search_list
var autfunction = ["WEB_RELUSE"];
if (user.iamContact())
autfunction.push("WEB_EXTREL");
var authparams = user.checkAutorisation(autfunction);
var cps_key = getQParamInt("key", -1);
if (cps_key == -1)
cps_key = getQParamInt("cps_key", -1);
@@ -81,13 +80,30 @@ PAGE_START();
IFRAMER("cpsFrame", page, { FcltClose: "cpsClose", title: L("lcl_prs_contactpersoon_frame") } );
// Als de contactpersoon ook een user is (prs_perslid) [en een uitvoerende?]
// dan kunnen er uitvoeringsgerelateerde gegevens worden gedefineerd
// door de beheerder van het bijbehorende bedrijf (WEB_EXTREL) of een algemene beheerder (WEB_PRSMAN??)
// Dit hoort in feite in prs_perslid, maar dupliceren we hier precies zo, want zo een beheerder kan niet bij perslid.asp
// Setting S("use_capacity_planning") moet wel gezet zijn (..)
if (S("use_capacity_planning") == 1 && prs_key > 0 && prs.checkAutorisation(prs_key).writecontact)
{
// 2. De inzetbaarheid
page = "prs_inzetbaar_list.asp?embedded=1&prs_key=" + prs_key;
IFRAMER("prsinzetframe", page, { refreshOnClose: true, icon: "fa-list", title: L("lcl_prs_inzetbaar_title") } );
// Is dit deel al reserveerbaar?
// 3. de skills (diensten)
// UNDER CONSTRUCTION TODO: autorisatie
// Om Diensten (bij een persoon) te kunnen beheren had je PRSMSU nodig. Dat is hiervoor te zwaar.
var thisPrs = new Perslid(prs_key);
if (prs.checkAutorisation(prs_key).writecontact && (thisPrs.has("WEB_MLDORD") || thisPrs.has("WEB_EXTORD")))
{
// 3. De dienstenxpersoon
//page = "../mgt/prs_bedrijfdienstlocatie.asp?mode=list&prs_key=" + prs_key;
page = "../mgt/prs_dienst.asp?mode=list&person=" + prs_key;
IFRAMER("prsdienstlistframe", page, { refreshOnClose: true, icon: "fa-list" } );
}
// 4. de planning&blokkades..
// Is deze resource al reserveerbaar?
var sql = "SELECT res_deel_key"
+ " FROM res_deel"
+ " WHERE res_deel_verwijder IS NULL"
@@ -101,10 +117,11 @@ PAGE_START();
oRs.Close();
}
var authparamsINSFOF = user.checkAutorisation("WEB_INSFOF", true);
var insfof_read = authparamsINSFOF;
if (insfof_read && cps_key > 0) // Bij interne contactpersonen met INSFOF leesrechten nu ook het objecten frame tonen (UWVA#51402).
{ // 2. Het optionele objectenschem met objecten die aan contactpersoon zijn uitgeleend
{ // 5. Het optionele objectenschem met objecten die aan contactpersoon zijn uitgeleend
page="../ins/ins_list.asp?urole=fo&embedded=1&inacObjIncl=1&cps_key=" + cps_key;
IFRAMER("insdeel", page, { refreshOnClose: true, title: L("lcl_ins_objects") } );
}

View File

@@ -29,6 +29,7 @@
if (prs_key == -1)
prs_key = getQParamInt("prs_key", -1);
var dienstauthparams = user.checkAutorisation("WEB_PRSMSU", true); // zoals bij bedrijf. goed?
var activeTab = getQParamSafe("active_tab", "");
// *** UNEXUS koppeling ***
@@ -123,12 +124,20 @@ PAGE_START();
if (prs_key > 0)
{
if (S("use_capacity_planning") == 1)
if (S("use_capacity_planning") == 1) // hier niet ook die mldord-enz check? BONS?
{
// 2. De inzetbaarheid
page = "prs_inzetbaar_list.asp?embedded=1&prs_key=" + prs_key;
IFRAMER("prsinzetframe", page, { refreshOnClose: true, icon: "fa-list", title: L("lcl_prs_inzetbaar_title") } );
}
// als dit een uitvoerende is, kan ik de skills aangeven (mits voldoende autorisatie aldaar)
if (dienstauthparams && (thisPrs.has("WEB_MLDORD") || thisPrs.has("WEB_EXTORD")))
{
// 3. De dienstenxpersoon
page = "../mgt/prs_dienst.asp?mode=list&person=" + prs_key;
IFRAMER("prsdienstlistframe", page, { refreshOnClose: true, icon: "fa-list" } );
}
if (canBOF)
{ // 3. De bezetting

View File

@@ -11,7 +11,7 @@
function add_reservation(res_deel_key)
{
var url = "appl/res/res_reservering.asp?restype=CV&mld_opdr_key=1&urole=fo&res_deel_key=" + res_deel_key; //activiteit_key=11&
var url = "appl/res/res_reservering.asp?restype=O&mld_opdr_key=1&urole=fo&res_deel_key=" + res_deel_key; //activiteit_key=11&
FcltMgr.openDetail(url, "");
}

View File

@@ -8,7 +8,7 @@
Context: Vanuit ELK asp bestand
*/
var FCLTVersion="2022.2c";
var FCLTVersion="2022.2d";
var FCLTMinDatabaseSchema="42"; // Alleen de cijfers
var custpath = rooturl + "/cust/" + customerId; // path to customer files