Skip to content

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

Feature/drop activity id on import (#2769)

Thomas Kaul337ca328c32b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4fd49a7abd..ada43f294d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Set the select column of the lazy-loaded activities table to stick at the end (experimental)
+- Dropped the activity id in the activities import
- Improved the validation of the currency management in the admin control panel
- Improved the performance of the value redaction interceptor for the impersonation mode by eliminating `cloneDeep`
- Modernized the `Nx` executors
diff --git a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
index fcc2decd89..7fc4b234bd 100644
--- a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
+++ b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
@@ -260,6 +260,14 @@ export class ImportActivitiesDialog implements OnDestroy {
}
}
+ content.activities = content.activities.map((activity) => {
+ if (activity.id) {
+ delete activity.id;
+ }
+
+ return activity;
+ });
+
try {
const { activities } =
await this.importActivitiesService.importJson({