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 ### 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 - 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 - Improved the deduplication of the portfolio snapshot calculation jobs by considering the filters
- Refactored the deprecated animation providers (`provideAnimations()` and `provideNoopAnimations()`) - 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) { if (state?.user) {
this.user = state.user; this.user = state.user;
this.hasPermissionToCreateOwnTag = this.hasPermissionToCreateOwnTag = hasPermission(
hasPermission(this.user.permissions, permissions.createOwnTag) && this.user?.permissions,
(this.user?.settings?.isExperimentalFeatures ?? false); permissions.createOwnTag
);
this.tagsAvailable = this.tagsAvailable =
this.user?.tags?.map((tag) => { 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 accountForm: FormGroup;
protected currencies: string[] = []; protected currencies: string[] = [];
protected filteredPlatforms: Observable<Platform[]> | undefined; protected filteredPlatforms: Observable<Platform[]> | undefined;
protected hasPermissionToCreateOwnTag: boolean | undefined; protected hasPermissionToCreateOwnTag: boolean;
protected platforms: Platform[] = []; protected platforms: Platform[] = [];
protected tagsAvailable: Tag[] = []; protected tagsAvailable: Tag[] = [];
@ -82,9 +82,10 @@ export class GfCreateOrUpdateAccountDialogComponent {
const { currencies } = this.dataService.fetchInfo(); const { currencies } = this.dataService.fetchInfo();
this.currencies = currencies; this.currencies = currencies;
this.hasPermissionToCreateOwnTag = this.hasPermissionToCreateOwnTag = hasPermission(
this.data.user?.settings?.isExperimentalFeatures && this.data.user?.permissions,
hasPermission(this.data.user?.permissions, permissions.createOwnTag); permissions.createOwnTag
);
this.tagsAvailable = [ this.tagsAvailable = [
...(this.data.user?.tags ?? []), ...(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 currentMarketPrice: number | null = null;
protected defaultDateFormat: string; protected defaultDateFormat: string;
protected defaultLookupItems: LookupItem[] = []; protected defaultLookupItems: LookupItem[] = [];
protected hasPermissionToCreateOwnTag: boolean | undefined; protected hasPermissionToCreateOwnTag: boolean;
protected isLoading = false; protected isLoading = false;
protected readonly isToday = isToday; protected readonly isToday = isToday;
protected mode: 'create' | 'update'; protected mode: 'create' | 'update';
@ -120,9 +120,10 @@ export class GfCreateOrUpdateActivityDialogComponent {
public ngOnInit() { public ngOnInit() {
this.currencyOfAssetProfile = this.data.activity?.assetProfile?.currency; this.currencyOfAssetProfile = this.data.activity?.assetProfile?.currency;
this.hasPermissionToCreateOwnTag = this.hasPermissionToCreateOwnTag = hasPermission(
this.data.user?.settings?.isExperimentalFeatures && this.data.user?.permissions,
hasPermission(this.data.user?.permissions, permissions.createOwnTag); permissions.createOwnTag
);
this.locale = this.data.user.settings.locale ?? DEFAULT_LOCALE; this.locale = this.data.user.settings.locale ?? DEFAULT_LOCALE;
this.mode = this.data.activity?.id ? 'update' : 'create'; this.mode = this.data.activity?.id ? 'update' : 'create';

Loading…
Cancel
Save