mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-07 23:29:28 +00:00
Fixed: Recommendation button was not enabled correctly after withdrawing approvement
Now, if approvment is withdrawn, the recommendation button is enabled again ONLY if no recommendation was submitted until yet. Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -145,7 +145,8 @@ $this->load->view(
|
||||
<form>
|
||||
<input type="hidden" name="anrechnung_id"
|
||||
value="<?php echo $anrechnungData->anrechnung_id ?>">
|
||||
<div class="panel panel-default" id="test">
|
||||
<div class="panel panel-default" id="approveAnrechnungDetail-empfehlung"
|
||||
data-empfehlung="<?php echo json_encode($empfehlungData->empfehlung) ?>">
|
||||
|
||||
<div class="panel-heading">
|
||||
<span class="text-uppercase"><b><?php echo $this->p->t('anrechnung', 'empfehlung'); ?></b></span> 
|
||||
|
||||
@@ -403,6 +403,8 @@ var approveAnrechnungDetail = {
|
||||
$('#approveAnrechnungDetail-withdraw-anrechnung-approvement').removeClass('hidden');
|
||||
},
|
||||
formatGenehmigungIsWithdrawed: function (statusBezeichnung){
|
||||
let empfehlung = $('#approveAnrechnungDetail-empfehlung').data('empfehlung'); // null / false / true
|
||||
|
||||
$('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung);
|
||||
$('#approveAnrechnungDetail-status_kurzbz').closest('div').removeClass('alert-danger').removeClass('alert-success');
|
||||
$('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-warning');
|
||||
@@ -414,7 +416,11 @@ var approveAnrechnungDetail = {
|
||||
$('#approveAnrechnungDetail-abgeschlossenAm').text('-');
|
||||
$('#approveAnrechnungDetail-abgeschlossenVon').text('-');
|
||||
|
||||
$('#approveAnrechnungDetail-request-recommendation').prop('disabled', false);
|
||||
// Only enable recommendation button again if no recommendation was submitted until now
|
||||
if (empfehlung === null)
|
||||
{
|
||||
$('#approveAnrechnungDetail-request-recommendation').prop('disabled', false);
|
||||
}
|
||||
$('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', false);
|
||||
$('#approveAnrechnungDetail-reject-anrechnung-ask').prop('disabled', false);
|
||||
// Hide button to withdraw approval
|
||||
|
||||
Reference in New Issue
Block a user