|
|
|
@ -65,7 +65,7 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
public routeQueryParams: Subscription; |
|
|
|
public sortColumn = 'date'; |
|
|
|
public sortDirection: SortDirection = 'desc'; |
|
|
|
public totalItems: number; |
|
|
|
public totalItems: number | undefined; |
|
|
|
public user: User; |
|
|
|
|
|
|
|
public constructor( |
|
|
|
@ -135,8 +135,11 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
} |
|
|
|
|
|
|
|
public fetchActivities() { |
|
|
|
const dateRange = this.user?.settings?.dateRange; |
|
|
|
// Reset dataSource and totalItems to show loading state
|
|
|
|
this.dataSource = undefined; |
|
|
|
this.totalItems = undefined; |
|
|
|
|
|
|
|
const dateRange = this.user?.settings?.dateRange; |
|
|
|
const range = this.isCalendarYear(dateRange) ? dateRange : undefined; |
|
|
|
|
|
|
|
this.dataService |
|
|
|
@ -200,6 +203,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
.subscribe(); |
|
|
|
|
|
|
|
this.fetchActivities(); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -214,6 +219,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
.subscribe(); |
|
|
|
|
|
|
|
this.fetchActivities(); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -289,6 +296,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
.subscribe(); |
|
|
|
|
|
|
|
this.fetchActivities(); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -316,6 +325,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
.subscribe(); |
|
|
|
|
|
|
|
this.fetchActivities(); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -365,6 +376,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
.subscribe({ |
|
|
|
next: () => { |
|
|
|
this.fetchActivities(); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -422,6 +435,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
|
.subscribe(); |
|
|
|
|
|
|
|
this.fetchActivities(); |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|