Merge branch 'feature-28278/Anrechnung_Neue-Begruendung-bei-Ablehnung' into merged_Anrechnungen_26625_27388_28278_28557

This commit is contained in:
Harald Bamberger
2023-04-24 11:31:39 +02:00
11 changed files with 183 additions and 36 deletions
@@ -141,6 +141,13 @@ $(function(){
return;
}
// Check if forgot to fulfill begruendung
if (begruendung.trim().endsWith('weil') || begruendung.endsWith('because of'))
{
FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungVervollstaendigen"));
return;
}
// Get form data
let form_data = $('form').serializeArray();
@@ -463,11 +470,27 @@ var approveAnrechnungDetail = {
textarea.val($.trim($('#approveAnrechnungDetail-empfehlungDetail-begruendung').text()));
return;
}
else
// Find Begruendung span
let textspan = $(elem).parent().find('span:first');
// Get Begruendung
let begruendung = textspan.text();
// Check if Begruendung has helptext
let hasHelptext = textspan.children('span #helpTxtBegruendungErgaenzen').length > 0;
if (hasHelptext)
{
// Copy begruendung into textarea
textarea.val($.trim($(elem).parent().find('span:first').text()));
let helptext = textspan.children('span #helpTxtBegruendungErgaenzen').text();
// Remove helptext
begruendung = begruendung.replace(helptext, '');
}
// Copy begruendung into textarea and set focus
textarea.val($.trim(begruendung)).focus();
},
formatEmpfehlungIsRequested: function(statusBezeichnung, empfehlungsanfrageAm, empfehlungsanfrageAn) {
$('#approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAm').html(empfehlungsanfrageAm);
@@ -701,8 +701,8 @@ var approveAnrechnung = {
// Find closest textarea
let textarea = $(elem).closest('div').find('textarea');
// Copy begruendung into textarea
textarea.val($.trim($(elem).parent().text()));
// Copy begruendung into textarea and set focus
textarea.val($.trim($(elem).parent().text())).focus();
},
focusFilterbuttonIfTableStartsWithStoredFilter(filters){
switch (filters[0].value) {
@@ -133,6 +133,13 @@ $(function(){
return;
}
// Check if forgot to fulfill begruendung
if (begruendung.trim().endsWith('weil') || begruendung.endsWith('because of'))
{
FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungVervollstaendigen"));
return;
}
// Get form data
let form_data = $('form').serializeArray();
@@ -241,8 +248,26 @@ var reviewAnrechnung = {
// Find closest textarea
let textarea = $(elem).closest('div').find('textarea');
// Copy begruendung into textarea
textarea.val($.trim($(elem).parent().find('span:first').text()));
// Find Begruendung span
let textspan = $(elem).parent().find('span:first');
// Get Begruendung
let begruendung = textspan.text();
// Check if Begruendung has helptext
let hasHelptext = textspan.children('span #helpTxtBegruendungErgaenzen').length > 0;
if (hasHelptext)
{
let helptext = textspan.children('span #helpTxtBegruendungErgaenzen').text();
// Remove helptext
begruendung = begruendung.replace(helptext, '');
}
// Copy begruendung into textarea and set focus
textarea.val($.trim(begruendung)).focus();
},
formatEmpfehlungIsTrue: function(empfehlungAm, emfehlungVon, statusBezeichnung){
$('#reviewAnrechnungDetail-status_kurzbz').text(statusBezeichnung);
@@ -449,7 +449,7 @@ var reviewAnrechnung = {
// Find closest textarea
let textarea = $(elem).closest('div').find('textarea');
// Copy begruendung into textarea
textarea.val($.trim($(elem).parent().text()));
// Copy begruendung into textarea and set focus
textarea.val($.trim($(elem).parent().text())).focus();
}
}