Skip to content

Commit e38689d

Browse files
committed
Merge branch 'dspace-cris-7' of bitbucket.org:4Science/dspace-angular into dspace-cris-7
2 parents 662b44c + cc8662e commit e38689d

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

src/app/statistics-page/cris-statistics-page/cris-statistics-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>{{'statistics.categories.title' | translate}}</h2>
2121
<div class="datepicker-container">
2222
<div class="form-group">
2323
<div class="input-group">
24-
<input class="form-control date-input" placeholder="Start Date" name="dp" [(ngModel)]="dateFrom" (ngModelChange)="dateChanged()"
24+
<input class="form-control date-input" placeholder="Start Date" name="dp" [(ngModel)]="dateFrom" (ngModelChange)="startDateChanged()"
2525
ngbDatepicker #df="ngbDatepicker">
2626
<div class="input-group-append">
2727
<button class="btn btn-outline-secondary" (click)="df.toggle()" type="button">
@@ -32,7 +32,7 @@ <h2>{{'statistics.categories.title' | translate}}</h2>
3232
</div>
3333
<div class="form-group">
3434
<div class="input-group ml-2">
35-
<input class="form-control date-input" placeholder="End Date" name="dp" [(ngModel)]="dateTo" (ngModelChange)="dateChanged()"
35+
<input class="form-control date-input" placeholder="End Date" name="dp" [(ngModel)]="dateTo" (ngModelChange)="endDateChanged()"
3636
ngbDatepicker #dt="ngbDatepicker">
3737

3838
<div class="input-group-append">

src/app/statistics-page/cris-statistics-page/cris-statistics-page.component.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,21 @@ export class CrisStatisticsPageComponent implements OnInit, OnDestroy {
197197
}
198198

199199
/**
200-
* Refresh categories when the date from or date to is changed.
200+
* Refresh categories when the date from is changed.
201201
*/
202-
dateChanged() {
203-
this.categories$ = this.getCategories$();
202+
startDateChanged() {
203+
if (typeof this.dateFrom === 'object' || this.dateFrom === null && this.dateFrom === undefined) {
204+
this.categories$ = this.getCategories$();
205+
}
206+
}
207+
208+
/**
209+
* Refresh categories when the date to is changed.
210+
*/
211+
endDateChanged() {
212+
if (typeof this.dateTo === 'object' || this.dateTo === null || this.dateTo === undefined) {
213+
this.categories$ = this.getCategories$();
214+
}
204215
}
205216

206217
/**

src/assets/i18n/en.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4750,6 +4750,8 @@
47504750

47514751
"search.filters.applied.charts.RELATION.Project.fundings.title": "Fundings",
47524752

4753+
"search.filters.applied.charts.RELATION.Project.researchoutputs.title": "Research Output",
4754+
47534755
"search.filters.applied.charts.no.data.found": "No data found",
47544756

47554757
"search.filters.applied.charts.show.hide": "Show/Hide",

0 commit comments

Comments
 (0)