From 9fac1373fd6741265b391d1a5c65ec38c2475fdb Mon Sep 17 00:00:00 2001 From: x1c0 Date: Wed, 10 May 2023 21:26:22 +0200 Subject: [PATCH] fix update activity, hide update cash balance on edit --- CHANGELOG.md | 4 ++++ apps/api/src/app/order/order.service.ts | 2 ++ .../create-or-update-activity-dialog.html | 16 ++++++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a753aab6a..ff53394ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ 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). +### Fixed + +- Fixed the error that was occuring when updating an activity and also hide the update cash balance in edit mode + ## Unreleased ### Changed diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index b3f27c221..00a13b139 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -354,6 +354,7 @@ export class OrderService { dataSource?: DataSource; symbol?: string; tags?: Tag[]; + updateAccountBalance?: boolean; }; where: Prisma.OrderWhereUniqueInput; }): Promise { @@ -394,6 +395,7 @@ export class OrderService { delete data.dataSource; delete data.symbol; delete data.tags; + delete data.updateAccountBalance; // Remove existing tags await this.prismaService.order.update({ 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 9ad56c907..dc18b6d84 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 @@ -18,8 +18,12 @@ -
- +
+ Account
-
- Update Cash Balance +
+ + Update Cash Balance +