Browse Source

Respect activity type and date range filter

pull/7492/head
Thomas Kaul 1 month ago
parent
commit
8dacac702e
  1. 9
      apps/client/src/app/pages/portfolio/activities/activities-page.component.ts

9
apps/client/src/app/pages/portfolio/activities/activities-page.component.ts

@ -316,8 +316,13 @@ export class GfActivitiesPageComponent implements OnInit {
private getDateRange() {
const dateRange = this.user?.settings?.dateRange;
// Omit 'max' as it would exclude drafts, which are dated in the future
return dateRange === 'max' ? undefined : dateRange;
// Omit the date ranges which do not apply to activities: '1d' spans today
// only, while 'max' would exclude drafts, which are dated in the future
if (!dateRange || ['1d', 'max'].includes(dateRange)) {
return undefined;
}
return dateRange;
}
private updateUser(aUser: User) {

Loading…
Cancel
Save