Added filter buttons to STGL Anrechnungen

Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2021-01-21 10:48:19 +01:00
committed by cris-technikum
parent 9e5b03b2dc
commit 47c8432faf
3 changed files with 179 additions and 2 deletions
@@ -110,9 +110,35 @@ $this->load->view(
<?php $this->load->view('lehre/anrechnung/approveAnrechnungUebersichtData.php'); ?>
</div>
</div>
<!-- Action Buttons 'Genehmigen', 'Empfehlung anfordern'-->
<div class="row">
<div class="col-xs-12">
<!-- Filter buttons -->
<div class="col-xs-5 col-md-4">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
<button id="show-recommended" class="btn btn-default btn-clearfilter" type="button"
data-toggle="tooltip" data-placement="left"
title="<?php echo $this->p->t('ui', 'nurEmpfohleneAnzeigen'); ?>"><i class='fa fa-thumbs-o-up'></i>
</button>
<button id="show-not-recommended" class="btn btn-default btn-clearfilter" type="button"
data-toggle="tooltip" data-placement="left"
title="<?php echo $this->p->t('ui', 'nurNichtEmpfohleneAnzeigen'); ?>"><i class='fa fa-thumbs-o-down'></i>
</button>
<button id="show-approved" class="btn btn-default btn-clearfilter" type="button"
data-toggle="tooltip" data-placement="left"
title="<?php echo $this->p->t('ui', 'nurGenehmigteAnzeigen'); ?>"><i class='fa fa-check'></i>
</button>
<button id="show-rejected" class="btn btn-default btn-clearfilter" type="button"
data-toggle="tooltip" data-placement="left"
title="<?php echo $this->p->t('ui', 'nurAbgelehnteAnzeigen'); ?>"><i class='fa fa-times'></i>
</button>
</div>
</div>
</div>
<!-- Action Buttons 'Genehmigen', 'Empfehlung anfordern'-->
<div class="col-xs-7 col-md-8">
<div class="pull-right">
<button id="request-recommendation" class="btn btn-default btn-w200 btn-mr50"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungAnfordern')); ?></button>
<button id="reject-anrechnungen" class="btn btn-danger btn-w200"><?php echo ucfirst($this->p->t('global', 'ablehnen')); ?></button>
@@ -86,6 +86,57 @@ $(function(){
$('#tableWidgetTabulator').tabulator('redraw', true);
});
// Show only rows with empfohlene + noch nicht genehmigte/abgelehnte anrechnungen
$("#show-recommended").click(function(){
$('#tableWidgetTabulator').tabulator('setFilter',
[
{field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL},
{field: 'empfehlung_anrechnung', type: '=', value: 'true'}
]
);
});
// Show only rows with nicht empfohlene + noch nicht genehmigte/abgelehnte anrechnungen
$("#show-not-recommended").click(function(){
$('#tableWidgetTabulator').tabulator('setFilter', [
{field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL},
{field: 'empfehlung_anrechnung', type: '=', value: 'false'},
]
);
});
// Show only rows with genehmigte anrechnungen
$("#show-approved").click(function(){
$('#tableWidgetTabulator').tabulator('setFilter',
[
{field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_APPROVED}
]
);
});
// Show only rows with abgelehnte anrechnungen
$("#show-rejected").click(function(){
$('#tableWidgetTabulator').tabulator('setFilter',
[
{field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_REJECTED}
]
);
});
/**
* Show all rows: clear filter and blur button
* Bootstrap button remains in activated style, even when clicking various times.
* This function "resets" button style and clear all tabulators filter.
* NOTE: MUST be after all other filters
*/
$(".btn-clearfilter").click(function(){
if($(this).hasClass('active'))
{
$('#tableWidgetTabulator').tabulator('clearFilter');
$(this).blur();
}
})
// Approve Anrechnungen
$("#approve-anrechnungen").click(function(){
// Get selected rows data
+100
View File
@@ -8468,6 +8468,106 @@ Any unusual occurrences
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'nurEmpfohleneAnzeigen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nur empfohlene anzeigen (die noch genehmigt/abgelehnt werden müssen)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Show only recommended ones (that need to be approved/rejected)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'nurNichtEmpfohleneAnzeigen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nur nicht empfohlene anzeigen (die noch genehmigt/abgelehnt werden müssen)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Show only not recommended ones (that need to be approved/rejected)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'nurGenehmigteAnzeigen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nur genehmigte anzeigen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Show only approved ones',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'nurAbgelehnteAnzeigen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nur abgelehnte anzeigen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Show only rejected ones',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'nurFehlendeEmpfehlungenAnzeigen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nur jene anzeigen, wo eine Empfehlung noch ansteht',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Show only those ones that need your recommendation',
'description' => '',
'insertvon' => 'system'
)
)
)
);