Feature/support translated tags (#1600)

* Support translated tags

* Update changelog
This commit is contained in:
Thomas Kaul
2023-01-14 12:36:30 +01:00
committed by GitHub
parent 69a9e77820
commit 0878941c4f
7 changed files with 33 additions and 6 deletions

View File

@@ -125,7 +125,12 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
this.quantity = quantity;
this.sectors = {};
this.SymbolProfile = SymbolProfile;
this.tags = tags;
this.tags = tags.map(({ id, name }) => {
return {
id,
name: translate(name)
};
});
this.transactionCount = transactionCount;
this.value = value;

View File

@@ -83,7 +83,12 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
this.currencies = currencies;
this.platforms = platforms;
this.tags = tags;
this.tags = tags.map(({ id, name }) => {
return {
id,
name: translate(name)
};
});
this.activityForm = this.formBuilder.group({
accountId: [this.data.activity?.accountId, Validators.required],
@@ -114,7 +119,14 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
},
Validators.required
],
tags: [this.data.activity?.tags],
tags: [
this.data.activity?.tags.map(({ id, name }) => {
return {
id,
name: translate(name)
};
})
],
type: [undefined, Validators.required], // Set after value changes subscription
unitPrice: [this.data.activity?.unitPrice, Validators.required]
});

View File

@@ -183,7 +183,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
return {
id,
label: name,
label: translate(name),
type: 'TAG'
};
});

View File

@@ -159,7 +159,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit {
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
return {
id,
label: name,
label: translate(name),
type: 'TAG'
};
});

View File

@@ -138,7 +138,7 @@ export class HoldingsPageComponent implements OnDestroy, OnInit {
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
return {
id,
label: name,
label: translate(name),
type: 'TAG'
};
});