Browse Source

Task/move support to create custom tags to general availability (#7410)

* Move support to create custom tags from experimental to general availability

* Update changelog
pull/7413/head
Thomas Kaul 5 days ago
committed by GitHub
parent
commit
697e6c0f77
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 7
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts
  3. 9
      apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts
  4. 9
      apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Moved the support to create custom tags from experimental to general availability
- Recomputed the portfolio snapshot calculation in the background on a portfolio change
- Improved the deduplication of the portfolio snapshot calculation jobs by considering the filters
- Refactored the deprecated animation providers (`provideAnimations()` and `provideNoopAnimations()`)

7
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

@ -581,9 +581,10 @@ export class GfHoldingDetailDialogComponent implements OnInit {
if (state?.user) {
this.user = state.user;
this.hasPermissionToCreateOwnTag =
hasPermission(this.user.permissions, permissions.createOwnTag) &&
(this.user?.settings?.isExperimentalFeatures ?? false);
this.hasPermissionToCreateOwnTag = hasPermission(
this.user?.permissions,
permissions.createOwnTag
);
this.tagsAvailable =
this.user?.tags?.map((tag) => {

9
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts

@ -65,7 +65,7 @@ export class GfCreateOrUpdateAccountDialogComponent {
protected accountForm: FormGroup;
protected currencies: string[] = [];
protected filteredPlatforms: Observable<Platform[]> | undefined;
protected hasPermissionToCreateOwnTag: boolean | undefined;
protected hasPermissionToCreateOwnTag: boolean;
protected platforms: Platform[] = [];
protected tagsAvailable: Tag[] = [];
@ -82,9 +82,10 @@ export class GfCreateOrUpdateAccountDialogComponent {
const { currencies } = this.dataService.fetchInfo();
this.currencies = currencies;
this.hasPermissionToCreateOwnTag =
this.data.user?.settings?.isExperimentalFeatures &&
hasPermission(this.data.user?.permissions, permissions.createOwnTag);
this.hasPermissionToCreateOwnTag = hasPermission(
this.data.user?.permissions,
permissions.createOwnTag
);
this.tagsAvailable = [
...(this.data.user?.tags ?? []),

9
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts

@ -92,7 +92,7 @@ export class GfCreateOrUpdateActivityDialogComponent {
protected currentMarketPrice: number | null = null;
protected defaultDateFormat: string;
protected defaultLookupItems: LookupItem[] = [];
protected hasPermissionToCreateOwnTag: boolean | undefined;
protected hasPermissionToCreateOwnTag: boolean;
protected isLoading = false;
protected readonly isToday = isToday;
protected mode: 'create' | 'update';
@ -120,9 +120,10 @@ export class GfCreateOrUpdateActivityDialogComponent {
public ngOnInit() {
this.currencyOfAssetProfile = this.data.activity?.assetProfile?.currency;
this.hasPermissionToCreateOwnTag =
this.data.user?.settings?.isExperimentalFeatures &&
hasPermission(this.data.user?.permissions, permissions.createOwnTag);
this.hasPermissionToCreateOwnTag = hasPermission(
this.data.user?.permissions,
permissions.createOwnTag
);
this.locale = this.data.user.settings.locale ?? DEFAULT_LOCALE;
this.mode = this.data.activity?.id ? 'update' : 'create';

Loading…
Cancel
Save