Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/fix state of delete account button (#911)

Thomas Kaul1a4dc51825ac
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d511e59f00..7e260a0131 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Fixed the state of the account delete button (disable if account contains activities)
- Fixed an issue in the activities filter component (typing a search term)
## 1.147.0 - 10.05.2022
diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.html b/apps/client/src/app/components/accounts-table/accounts-table.component.html
index cf8446e421..08c6c3de9d 100644
--- a/apps/client/src/app/components/accounts-table/accounts-table.component.html
+++ b/apps/client/src/app/components/accounts-table/accounts-table.component.html
@@ -200,7 +200,7 @@
</button>
<button
mat-menu-item
- [disabled]="element.isDefault || element.Order?.length > 0"
+ [disabled]="element.isDefault || element.transactionCount > 0"
(click)="onDeleteAccount(element.id)"
>
<ion-icon class="mr-2" name="trash-outline"></ion-icon>