Skip to content

Commit

Permalink
Merge pull request #205 from OpenOlitor/dev/OO#149_new_filter_years_f…
Browse files Browse the repository at this point in the history
…or_work_collaborations

OO#149_new_filter_years_for_work_collaborations
  • Loading branch information
mcmpp authored Apr 19, 2024
2 parents cc855dc + 8afa804 commit b910348
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ angular
$scope.arbeitseinsatzTableParams = undefined;
$scope.contactsVisible = [];
$scope.entries = [];
$scope.loading = false;
$scope.model = {};
$scope.maxEntries = 10;
var today = new Date();

$scope.initArbeitseinsaetzeTableParams = function(){
ArbeitseinsaetzeListModel.query(function(data) {
ArbeitseinsaetzeListModel.query({
g: /^\d+$/.test($scope.geschaeftsjahr)?$scope.geschaeftsjahr:''
},(function(data) {
$scope.limitDateForDeletion = today.setDate(today.getDate()+1);
$scope.entries = _(data).groupBy('arbeitsangebotId')
.map(function(items, arbeitsangebotId) {
Expand Down Expand Up @@ -79,7 +80,24 @@ angular
list: $scope.entries
};
msgBus.emitMsg(msg);
});
}));
}

var existingGJ = $location.search().g;
if (existingGJ) {
$scope.geschaeftsjahr = existingGJ;
}

$scope.selectGeschaeftsjahr = function(gj) {
if(angular.isDefined(gj)) {
$scope.geschaeftsjahr = gj;
} else {
$scope.geschaeftsjahr = undefined;
}
$scope.initGJ = true;
$scope.maxEntries = 10;
$scope.initArbeitseinsaetzeTableParams();
return false;
}

$scope.initArbeitseinsaetzeTableParams();
Expand All @@ -91,8 +109,17 @@ angular
sorting: {
zeitVon: 'asc'
}
},
{
},{
filterDelay: 0,
groupOptions: {
isExpanded: true
},
exportODSModel: ArbeitseinsaetzeListModel,
exportODSFilter: function() {
return {
g: $scope.geschaeftsjahr
};
},
getData: function(params) {
if (!$scope.entries) {
return;
Expand Down
5 changes: 5 additions & 0 deletions app/scripts/arbeitseinsaetze/list/arbeitseinsaetzelist.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
</div>
<div class="row">
<div class="col-md-12">
<oo-overviewfilter-geschaeftsjahre
selected-funct="selectGeschaeftsjahr"
select="geschaeftsjahr"
select-current="true">
</oo-overviewfilter-geschaeftsjahre>
<table ng-show="entries" ng-table="arbeitseinsatzTableParams" class="table table-striped" show-filter="false" template-pagination="scripts/ngtable/oo-ngtable-noPaginationTemplate.html">
<tr ng-repeat-start="arbeitseinsatz in $data">
<td>
Expand Down

0 comments on commit b910348

Please sign in to comment.