[develop | DONE | CHANGED] set min/max year variables to Dates defaults, pass them as parameters to

This commit is contained in:
argirok 2024-02-23 10:14:35 +02:00
parent ec72cef87a
commit a9dfd55db2
2 changed files with 4 additions and 2 deletions

View File

@ -241,7 +241,7 @@
<ng-container *ngTemplateOutlet="selected_filters_pills"></ng-container>
<ul class="uk-list uk-list-xlarge uk-list-divider uk-margin-top">
<li>
<range-filter #rangeFilter [filter]="periodFilter" yearMin="2000" [yearMax]="currentYear"
<range-filter #rangeFilter [filter]="periodFilter" [yearMin]="minYear" [yearMax]="maxYear"
[mandatoryRange]="true"
(onFilterChange)="filter()"></range-filter>
</li>

View File

@ -13,7 +13,7 @@ import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
import {SearchResearchResultsService} from "../../openaireLibrary/services/searchResearchResults.service";
import {CustomFilterService} from "../../openaireLibrary/shared/customFilter.service";
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
import {Dates, StringUtils} from "../../openaireLibrary/utils/string-utils.class";
import {Filter, Value} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
import {SearchFields} from "../../openaireLibrary/utils/properties/searchFields";
@ -43,6 +43,8 @@ export class MonitorComponent extends MonitorIndicatorStakeholderBaseComponent {
ngOnInit() {
super.ngOnInit();
this.minYear = Dates.yearMin;
this.maxYear = Dates.yearMax;
this.requireLogin = false;
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;