{
+ const items = await this.prismaService.symbolProfile.findMany({
select: {
assetClass: true,
assetSubClass: true,
currency: true,
dataSource: true,
name: true,
- symbol: true
+ symbol: true,
+ userId: true
},
where: {
- OR: [
+ AND: [
{
- dataSource: this.getName(),
- name: {
- mode: 'insensitive',
- startsWith: query
- }
+ dataSource: this.getName()
},
{
- dataSource: this.getName(),
- symbol: {
- mode: 'insensitive',
- startsWith: query
- }
+ OR: [
+ {
+ name: {
+ mode: 'insensitive',
+ startsWith: query
+ }
+ },
+ {
+ symbol: {
+ mode: 'insensitive',
+ startsWith: query
+ }
+ }
+ ]
+ },
+ {
+ OR: [{ userId }, { userId: null }]
}
]
}
});
- items = items.filter(({ symbol }) => {
- // Remove UUID symbols (activities of type ITEM)
- return !isUUID(symbol);
- });
-
return {
items: items.map((item) => {
return { ...item, dataProviderInfo: this.getDataProviderInfo() };
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 cb21c255d..feeb4abc8 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
@@ -20,7 +20,6 @@ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { AssetClass, AssetSubClass, Tag, Type } from '@prisma/client';
-import { isUUID } from 'class-validator';
import { isAfter, isToday } from 'date-fns';
import { EMPTY, Observable, Subject, lastValueFrom, of } from 'rxjs';
import { catchError, delay, map, startWith, takeUntil } from 'rxjs/operators';
@@ -476,10 +475,8 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
fee: this.activityForm.get('fee').value,
quantity: this.activityForm.get('quantity').value,
symbol:
- this.activityForm.get('searchSymbol').value?.symbol === undefined ||
- isUUID(this.activityForm.get('searchSymbol').value?.symbol)
- ? this.activityForm.get('name').value
- : this.activityForm.get('searchSymbol').value.symbol,
+ this.activityForm.get('searchSymbol')?.value?.symbol ??
+ this.activityForm.get('name')?.value,
tags: this.activityForm.get('tags').value,
type: this.activityForm.get('type').value,
unitPrice: this.activityForm.get('unitPrice').value
From be4ac17a5cd86f944033c7485fc98a2a18e56f4c Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Wed, 25 Dec 2024 17:08:06 +0100
Subject: [PATCH 6/8] Release 2.131.0 (#4143)
---
CHANGELOG.md | 2 +-
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd21f635a..beed10704 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.131.0 - 2024-12-25
### Changed
diff --git a/package-lock.json b/package-lock.json
index d715ccc9a..7ad5c59c1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "ghostfolio",
- "version": "2.130.0",
+ "version": "2.131.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ghostfolio",
- "version": "2.130.0",
+ "version": "2.131.0",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
diff --git a/package.json b/package.json
index 2eea5cc6a..84b49ca05 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "2.130.0",
+ "version": "2.131.0",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio",
From 38908f0e19b4cfaf0ac4082ad16a5b81a7ebf1ca Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Thu, 26 Dec 2024 10:40:15 +0100
Subject: [PATCH 7/8] Feature/upgrade husky to version 9.1.7 (#4134)
* Upgrade husky to version 9.1.7
* Update changelog
---
CHANGELOG.md | 6 ++++++
package-lock.json | 8 ++++----
package.json | 2 +-
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index beed10704..fdc0994e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ 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
+
+### Changed
+
+- Upgraded `husky` from version `9.1.6` to `9.1.7`
+
## 2.131.0 - 2024-12-25
### Changed
diff --git a/package-lock.json b/package-lock.json
index 7ad5c59c1..21889217d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -144,7 +144,7 @@
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-storybook": "0.6.15",
- "husky": "9.1.6",
+ "husky": "9.1.7",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-preset-angular": "14.1.0",
@@ -20798,9 +20798,9 @@
}
},
"node_modules/husky": {
- "version": "9.1.6",
- "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz",
- "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==",
+ "version": "9.1.7",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
+ "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"license": "MIT",
"bin": {
diff --git a/package.json b/package.json
index 84b49ca05..007330d56 100644
--- a/package.json
+++ b/package.json
@@ -190,7 +190,7 @@
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-storybook": "0.6.15",
- "husky": "9.1.6",
+ "husky": "9.1.7",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-preset-angular": "14.1.0",
From c9047e7c17b9de26162d0ac6e5514078b87f21ca Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Fri, 27 Dec 2024 10:12:45 +0100
Subject: [PATCH 8/8] Feature/add user interface for received access (#4146)
* Add user interface for received access
* Update changelog
---
CHANGELOG.md | 4 ++++
apps/api/src/app/user/user.service.ts | 4 +++-
.../user-account-access.component.ts | 15 +++++++++++++--
.../user-account-access/user-account-access.html | 10 ++++++----
libs/common/src/lib/interfaces/user.interface.ts | 7 ++-----
5 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fdc0994e5..c9cd8d29a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Added
+
+- Added the user interface for received access from others
+
### Changed
- Upgraded `husky` from version `9.1.6` to `9.1.7`
diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts
index bac6ed19b..33e9a67da 100644
--- a/apps/api/src/app/user/user.service.ts
+++ b/apps/api/src/app/user/user.service.ts
@@ -89,6 +89,7 @@ export class UserService {
}),
this.tagService.getTagsForUser(id)
]);
+
const access = userData[0];
const firstActivity = userData[1];
let tags = userData[2];
@@ -119,7 +120,8 @@ export class UserService {
access: access.map((accessItem) => {
return {
alias: accessItem.alias,
- id: accessItem.id
+ id: accessItem.id,
+ permissions: accessItem.permissions
};
}),
accounts: Account,
diff --git a/apps/client/src/app/components/user-account-access/user-account-access.component.ts b/apps/client/src/app/components/user-account-access/user-account-access.component.ts
index 16a7627c9..02f7d1b8d 100644
--- a/apps/client/src/app/components/user-account-access/user-account-access.component.ts
+++ b/apps/client/src/app/components/user-account-access/user-account-access.component.ts
@@ -27,7 +27,8 @@ import { CreateOrUpdateAccessDialog } from './create-or-update-access-dialog/cre
templateUrl: './user-account-access.html'
})
export class UserAccountAccessComponent implements OnDestroy, OnInit {
- public accesses: Access[];
+ public accessesGet: Access[];
+ public accessesGive: Access[];
public deviceType: string;
public hasPermissionToCreateAccess: boolean;
public hasPermissionToDeleteAccess: boolean;
@@ -125,11 +126,21 @@ export class UserAccountAccessComponent implements OnDestroy, OnInit {
}
private update() {
+ this.accessesGet = this.user.access.map(({ alias, id, permissions }) => {
+ return {
+ alias,
+ id,
+ permissions,
+ grantee: $localize`Me`,
+ type: 'PRIVATE'
+ };
+ });
+
this.dataService
.fetchAccesses()
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((accesses) => {
- this.accesses = accesses;
+ this.accessesGive = accesses;
this.changeDetectorRef.markForCheck();
});
diff --git a/apps/client/src/app/components/user-account-access/user-account-access.html b/apps/client/src/app/components/user-account-access/user-account-access.html
index e5d43cadc..efb918984 100644
--- a/apps/client/src/app/components/user-account-access/user-account-access.html
+++ b/apps/client/src/app/components/user-account-access/user-account-access.html
@@ -1,14 +1,16 @@
-
+ @if (accessesGet.length > 0) {
+ Received Access
+
+ }
+
Granted Access
@if (user?.subscription?.type === 'Basic') {
}
[];
accounts: Account[];
dateOfFirstActivity: Date;
id: string;