Skip to content

Commit

Permalink
Merge pull request #668 from OpenOlitor/dev/OO_add_year_filter_work_o…
Browse files Browse the repository at this point in the history
…pportunities_overview

OO add year filter work opportunities overview
  • Loading branch information
mcmpp committed Dec 5, 2023
2 parents f3105ab + 500689a commit ce4642a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ angular
if (existingQuery) {
$scope.search.query = existingQuery;
}
var existingGJ = $location.search().g;
if (existingGJ) {
$scope.geschaeftsjahr = existingGJ;
}

$scope.hasData = function() {
return $scope.entries !== undefined;
Expand Down Expand Up @@ -151,6 +155,17 @@ angular
return ReportvorlagenService.getVorlagen('VorlageKundenbrief');
};

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

$scope.closeBericht = function() {
$scope.showGenerateReport = false;
};
Expand All @@ -177,6 +192,12 @@ angular
isExpanded: true
},
exportODSModel: ArbeitsangeboteModel,
exportODSFilter: function() {
return {
f: $scope.search.filterQuery,
g: $scope.geschaeftsjahr
};
},
getData: function(params) {
if (!$scope.entries) {
return;
Expand Down Expand Up @@ -269,6 +290,7 @@ angular
$scope.loading = true;
$scope.entries = ArbeitsangeboteModel.query(
{
g: /^\d+$/.test($scope.geschaeftsjahr)?$scope.geschaeftsjahr:'',
q: $scope.search.queryQuery
},
function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<h3 class="panel-title"><span class="navbar-brand" translate>Arbeitsangebote</span>
<form class="navbar-form pull-right" role="search">
<div class="form-group">
<oo-overviewfilter-geschaeftsjahre
selected-funct="selectGeschaeftsjahr"
select="geschaeftsjahr"
select-current="true">
</oo-overviewfilter-geschaeftsjahre>
<input type="text" class="form-control" placeholder="{{'Suche in Übersicht...'|translate}}" ng-model="search.query">
<oo-actions-button model="model" actions="actions">{{'Arbeitsangebot erstellen'|translate}}</oo-actions-button>
</div>
Expand Down

0 comments on commit ce4642a

Please sign in to comment.