|
|
@ -16,6 +16,7 @@ import { GfFabComponent } from '@ghostfolio/ui/fab'; |
|
|
import { DataService } from '@ghostfolio/ui/services'; |
|
|
import { DataService } from '@ghostfolio/ui/services'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
|
|
|
ChangeDetectionStrategy, |
|
|
ChangeDetectorRef, |
|
|
ChangeDetectorRef, |
|
|
Component, |
|
|
Component, |
|
|
DestroyRef, |
|
|
DestroyRef, |
|
|
@ -44,6 +45,7 @@ import { ImportActivitiesDialogParams } from './import-activities-dialog/interfa |
|
|
MatSnackBarModule, |
|
|
MatSnackBarModule, |
|
|
RouterModule |
|
|
RouterModule |
|
|
], |
|
|
], |
|
|
|
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
selector: 'gf-activities-page', |
|
|
selector: 'gf-activities-page', |
|
|
styleUrls: ['./activities-page.scss'], |
|
|
styleUrls: ['./activities-page.scss'], |
|
|
templateUrl: './activities-page.html' |
|
|
templateUrl: './activities-page.html' |
|
|
@ -112,6 +114,7 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
.subscribe((impersonationId) => { |
|
|
.subscribe((impersonationId) => { |
|
|
this.hasImpersonationId = !!impersonationId; |
|
|
this.hasImpersonationId = !!impersonationId; |
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this.userService.stateChanged |
|
|
this.userService.stateChanged |
|
|
@ -132,6 +135,8 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
this.dataSource = undefined; |
|
|
this.dataSource = undefined; |
|
|
this.totalItems = undefined; |
|
|
this.totalItems = undefined; |
|
|
|
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
|
|
|
|
|
const dateRange = this.user?.settings?.dateRange; |
|
|
const dateRange = this.user?.settings?.dateRange; |
|
|
const range = this.isCalendarYear(dateRange) ? dateRange : undefined; |
|
|
const range = this.isCalendarYear(dateRange) ? dateRange : undefined; |
|
|
|
|
|
|
|
|
@ -448,5 +453,7 @@ export class GfActivitiesPageComponent implements OnInit { |
|
|
this.hasPermissionToDeleteActivity = |
|
|
this.hasPermissionToDeleteActivity = |
|
|
!this.hasImpersonationId && |
|
|
!this.hasImpersonationId && |
|
|
hasPermission(this.user.permissions, permissions.deleteActivity); |
|
|
hasPermission(this.user.permissions, permissions.deleteActivity); |
|
|
|
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|