Added INITIAL FILTER to LA bestellen

Initial filter is: no dummies, neu or geändert.
Now these rows are presented to the user when loading the page.
This commit is contained in:
Cris
2019-10-24 14:03:08 +02:00
committed by hainberg
parent 9a71c29ca2
commit 7cf02c3566
2 changed files with 20 additions and 1 deletions
@@ -178,6 +178,22 @@ $this->load->view(
// Custom filters
// -----------------------------------------------------------------------------------------------------------------
/*
* Filters neue AND geaenderte initially
* NOTE: This is a workaround. The tabulators callback initialFilter is not used here because
* it is processed before the callback tableBuilt, where the status is going to be built.
* The callback dataLoaded is processed after tableBuild and provides the status.
*/
function func_dataLoaded(data, table){
table.setFilter([
{field: 'personalnummer', type: '>=', value: 0}, // not dummy lector AND
[
{field: 'status', type: '=', value: 'Neu'}, // neu OR
{field: 'status', type: '=', value: 'Geändert'} // geaendert
]
]);
}
// Filters geaenderte
function filter_showChanged(data){
@@ -369,7 +369,10 @@ $filterWidgetArray = array(
},
tableBuilt: function(){
func_tableBuilt(this);
}
},
dataLoaded: function(data){
func_dataLoaded(data, this);
},
}', // tabulator properties
'datasetRepFieldsDefs' => '{
// column status is built dynamically in funcTableBuilt()