Tags
diff --git a/apps/client/src/app/components/holding-detail-dialog/interfaces/interfaces.ts b/apps/client/src/app/components/holding-detail-dialog/interfaces/interfaces.ts
index c6cfce1ee..8178838ab 100644
--- a/apps/client/src/app/components/holding-detail-dialog/interfaces/interfaces.ts
+++ b/apps/client/src/app/components/holding-detail-dialog/interfaces/interfaces.ts
@@ -9,6 +9,7 @@ export interface HoldingDetailDialogParams {
deviceType: string;
hasImpersonationId: boolean;
hasPermissionToReportDataGlitch: boolean;
+ hasPermissionToUpdateOrder: boolean;
locale: string;
symbol: string;
}
diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
index dedcdd4a9..323796bef 100644
--- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
+++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts
@@ -53,8 +53,8 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
public isToday = isToday;
public mode: 'create' | 'update';
public platforms: { id: string; name: string }[];
- public separatorKeysCodes: number[] = [ENTER, COMMA];
- public tags: Tag[] = [];
+ public separatorKeysCodes: number[] = [COMMA, ENTER];
+ public tagsAvailable: Tag[] = [];
public total = 0;
public typesTranslationMap = new Map
();
public Validators = Validators;
@@ -81,7 +81,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
this.currencies = currencies;
this.defaultDateFormat = getDateFormatString(this.locale);
this.platforms = platforms;
- this.tags = tags.map(({ id, name }) => {
+ this.tagsAvailable = tags.map(({ id, name }) => {
return {
id,
name: translate(name)
@@ -287,7 +287,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
].valueChanges.pipe(
startWith(this.activityForm.get('tags').value),
map((aTags: Tag[] | null) => {
- return aTags ? this.filterTags(aTags) : this.tags.slice();
+ return aTags ? this.filterTags(aTags) : this.tagsAvailable.slice();
})
);
@@ -441,10 +441,11 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
public onAddTag(event: MatAutocompleteSelectedEvent) {
this.activityForm.get('tags').setValue([
...(this.activityForm.get('tags').value ?? []),
- this.tags.find(({ id }) => {
+ this.tagsAvailable.find(({ id }) => {
return id === event.option.value;
})
]);
+
this.tagInput.nativeElement.value = '';
}
@@ -518,12 +519,12 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
}
private filterTags(aTags: Tag[]) {
- const tagIds = aTags.map((tag) => {
- return tag.id;
+ const tagIds = aTags.map(({ id }) => {
+ return id;
});
- return this.tags.filter((tag) => {
- return !tagIds.includes(tag.id);
+ return this.tagsAvailable.filter(({ id }) => {
+ return !tagIds.includes(id);
});
}
diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
index 56cb66fcd..7795688c0 100644
--- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
+++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
@@ -378,11 +378,11 @@
+
Tags
- @for (tag of activityForm.get('tags')?.value; track tag) {
+ @for (tag of activityForm.get('tags')?.value; track tag.id) {
- @for (tag of filteredTagsObservable | async; track tag) {
+ @for (tag of filteredTagsObservable | async; track tag.id) {
{{ tag.name }}
diff --git a/apps/client/src/app/services/data.service.ts b/apps/client/src/app/services/data.service.ts
index 64e498d12..4f9fd7e20 100644
--- a/apps/client/src/app/services/data.service.ts
+++ b/apps/client/src/app/services/data.service.ts
@@ -47,7 +47,8 @@ import { SortDirection } from '@angular/material/sort';
import {
AccountBalance,
DataSource,
- Order as OrderModel
+ Order as OrderModel,
+ Tag
} from '@prisma/client';
import { format, parseISO } from 'date-fns';
import { cloneDeep, groupBy, isNumber } from 'lodash';
@@ -649,6 +650,17 @@ export class DataService {
return this.http.put(`/api/v1/admin/settings/${key}`, aData);
}
+ public putHoldingTags({
+ dataSource,
+ symbol,
+ tags
+ }: { tags: Tag[] } & UniqueAsset) {
+ return this.http.put(
+ `/api/v1/portfolio/position/${dataSource}/${symbol}/tags`,
+ { tags }
+ );
+ }
+
public putOrder(aOrder: UpdateOrderDto) {
return this.http.put(`/api/v1/order/${aOrder.id}`, aOrder);
}
From 85661884a6f991cf27125e6a2ecc2dba8b197121 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 3 Aug 2024 15:47:52 +0200
Subject: [PATCH 8/8] Release 2.100.0 (#3631)
---
CHANGELOG.md | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8666cb74..8726c4468 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## Unreleased
+## 2.100.0 - 2024-08-03
### Added
diff --git a/package.json b/package.json
index 9d4e673d9..c84514f6a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "2.99.0",
+ "version": "2.100.0",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio",