[Trunk | Library]

rangeFilter.component.html: [Bug fix additional to r58286] Buttons for "Last 5 years" and "Last 10 years" selected when 5 or 10 last years are selected instead of 6 or 11.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58314 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-03-23 09:38:00 +00:00
parent 97b9ccd885
commit 116777702e
1 changed files with 2 additions and 2 deletions

View File

@ -46,11 +46,11 @@
(click)="yearChanged(0)">This year
</button>
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-5) ? ' uk-text-bold' : '')"
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-4) ? ' uk-text-bold' : '')"
(click)="yearChanged(4)">Last 5 years
</button>
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-10) ? ' uk-text-bold' : '')"
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-9) ? ' uk-text-bold' : '')"
(click)="yearChanged(9)">Last 10 years
</button>