Browse Source
Merge branch 'main' into feature/improve-currency-code-validation
pull/4598/head
Thomas Kaul
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
2 deletions
-
CHANGELOG.md
-
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
|
@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
- Improved the error message of the currency code validation |
|
|
- Improved the error message of the currency code validation |
|
|
- Tightened the currency code validation by requiring uppercase letters |
|
|
- Tightened the currency code validation by requiring uppercase letters |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Improved the file selector of the activities import functionality to accept case-insensitive file extensions (`.CSV` and `.JSON`) |
|
|
|
|
|
|
|
|
## 2.155.0 - 2025-04-23 |
|
|
## 2.155.0 - 2025-04-23 |
|
|
|
|
|
|
|
|
### Added |
|
|
### Added |
|
|
|
@ -247,9 +247,10 @@ export class ImportActivitiesDialog implements OnDestroy { |
|
|
|
|
|
|
|
|
reader.onload = async (readerEvent) => { |
|
|
reader.onload = async (readerEvent) => { |
|
|
const fileContent = readerEvent.target.result as string; |
|
|
const fileContent = readerEvent.target.result as string; |
|
|
|
|
|
const fileExtension = file.name.split('.').pop()?.toLowerCase(); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
if (file.name.endsWith('.json')) { |
|
|
if (fileExtension === 'json') { |
|
|
const content = JSON.parse(fileContent); |
|
|
const content = JSON.parse(fileContent); |
|
|
|
|
|
|
|
|
this.accounts = content.accounts; |
|
|
this.accounts = content.accounts; |
|
@ -294,7 +295,7 @@ export class ImportActivitiesDialog implements OnDestroy { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return; |
|
|
return; |
|
|
} else if (file.name.endsWith('.csv')) { |
|
|
} else if (fileExtension === 'csv') { |
|
|
const content = fileContent.split('\n').slice(1); |
|
|
const content = fileContent.split('\n').slice(1); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|