Merge branch 'master' into bugfix-Sprint183/Anrechnung_FalschmeldungBeiGrossemDokument

This commit is contained in:
Andreas Österreicher
2022-04-11 16:58:43 +02:00
105 changed files with 3682 additions and 1416 deletions
+2
View File
@@ -107,10 +107,12 @@ var IssuesDataset = {
{
successCallback: function(data, textStatus, jqXHR) {
if (FHC_AjaxClient.isError(data))
{
FHC_DialogLib.alertError(
FHC_PhrasesLib.t("fehlermonitoring", "statusAendernFehler") + ": "
+ FHC_AjaxClient.getError(data)
);
}
else if (FHC_AjaxClient.hasData(data))
{
FHC_FilterWidget.reloadDataset();
@@ -10,6 +10,7 @@ $(function(){
const genehmigung_panel = $('#approveAnrechnungDetail-genehmigung-panel');
const begruendung_panel = $('#approveAnrechnungDetail-begruendung-panel');
const hasReadOnlyAccess = $('#approveAnrechnungDetail-generell').data('readonly');
// Pruefen ob Promise unterstuetzt wird
// Tabulator funktioniert nicht mit IE
@@ -21,6 +22,11 @@ $(function(){
return;
}
if (hasReadOnlyAccess)
{
approveAnrechnungDetail.disableEditElements();
}
// Set status alert color
approveAnrechnungDetail.setStatusAlertColor();
@@ -417,6 +423,34 @@ var approveAnrechnungDetail = {
}
);
},
disableEditElements: function()
{
// Disable:
// ...button Empfehlung anfordern
$('#approveAnrechnungDetail-request-recommendation')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ...button Empfehlung zuruecknehmen
$('#approveAnrechnungDetail-withdraw-request-recommedation')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ...button Genehmigen
$('#approveAnrechnungDetail-approve-anrechnung-ask')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ...button Ablehnen
$('#approveAnrechnungDetail-reject-anrechnung-ask')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ...button Genehmigung zurücknehmen
$('#approveAnrechnungDetail-withdraw-anrechnung-approvement')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ... form Empfehlungsnotiz
$('#form-empfehlungNotiz :input')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
},
copyIntoTextarea: function(elem){
// Find closest textarea
@@ -148,6 +148,8 @@ $(function(){
const genehmigung_panel = $('#approveAnrechnungUebersicht-genehmigung-panel');
const begruendung_panel = $('#approveAnrechnungUebersicht-begruendung-panel');
const hasReadOnlyAccess = $('#formApproveAnrechnungUebersicht').data('readonly');
const hasCreateAnrechnungAccess = $('#formApproveAnrechnungUebersicht').data('createaccess');
// Pruefen ob Promise unterstuetzt wird
// Tabulator funktioniert nicht mit IE
@@ -165,6 +167,16 @@ $(function(){
$('#tableWidgetTabulator').tabulator('redraw', true);
});
if (hasReadOnlyAccess)
{
approveAnrechnung.disableEditElements();
}
if (!hasCreateAnrechnungAccess)
{
approveAnrechnung.disableCreateAnrechnungButton();
}
// Set status alert color
approveAnrechnung.setStatusAlertColor();
@@ -517,6 +529,30 @@ var approveAnrechnung = {
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning');
}
},
disableEditElements: function()
{
// Disable:
// ...button Empfehlung anfordern
$('#approveAnrechnungUebersicht-request-recommendation')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ...button Ablehnen
$('#approveAnrechnungUebersicht-reject-anrechnungen-ask')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
// ...button Genehmigen
$('#approveAnrechnungUebersicht-approve-anrechnungen-ask')
.prop('disabled', true)
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
},
disableCreateAnrechnungButton: function()
{
// Disable button Antrag anlegen
$('#approveAnrechnungUebersicht-create-anrechnung')
.removeAttr('href')
.css({'color': 'grey', 'pointer-events': 'none'}); // property disabled does not work for <a> link
},
copyIntoTextarea: function(elem){
// Find closest textarea