Browse Source
Bugfix/custom asset name rendering in import activities dialog (#5787)
* Fix custom asset name rendering in import activities dialog
* Update changelog
pull/5829/head
Sven Günther
6 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
21 additions and
10 deletions
-
CHANGELOG.md
-
apps/api/src/app/import/import.service.ts
-
apps/api/src/app/order/create-order.dto.ts
-
apps/api/src/app/order/order.service.ts
-
apps/client/src/app/services/import-activities.service.ts
-
libs/ui/src/lib/activities-table/activities-table.component.html
|
|
|
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the style in the footer row of the accounts table |
|
|
|
- Fixed the rendering of names and symbols for custom assets in the import activities dialog |
|
|
|
|
|
|
|
## 2.210.1 - 2025-10-22 |
|
|
|
|
|
|
|
|
|
|
|
@ -539,6 +539,7 @@ export class ImportService { |
|
|
|
connectOrCreate: { |
|
|
|
create: { |
|
|
|
dataSource, |
|
|
|
name, |
|
|
|
symbol, |
|
|
|
currency: assetProfile.currency, |
|
|
|
userId: dataSource === 'MANUAL' ? user.id : undefined |
|
|
|
@ -746,10 +747,19 @@ export class ImportService { |
|
|
|
if (['FEE', 'INTEREST', 'LIABILITY'].includes(type)) { |
|
|
|
// Skip asset profile validation for FEE, INTEREST, and LIABILITY
|
|
|
|
// as these activity types don't require asset profiles
|
|
|
|
const assetProfileInImport = assetProfilesWithMarketDataDto?.find( |
|
|
|
(profile) => { |
|
|
|
return ( |
|
|
|
profile.dataSource === dataSource && profile.symbol === symbol |
|
|
|
); |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
assetProfiles[getAssetProfileIdentifier({ dataSource, symbol })] = { |
|
|
|
currency, |
|
|
|
dataSource, |
|
|
|
symbol |
|
|
|
symbol, |
|
|
|
name: assetProfileInImport?.name |
|
|
|
}; |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
@ -44,7 +44,8 @@ export class CreateOrderDto { |
|
|
|
customCurrency?: string; |
|
|
|
|
|
|
|
@IsEnum(DataSource) |
|
|
|
dataSource: DataSource; |
|
|
|
@IsOptional() // Optional for type FEE, INTEREST, and LIABILITY (default data source is resolved in the backend)
|
|
|
|
dataSource?: DataSource; |
|
|
|
|
|
|
|
@IsISO8601() |
|
|
|
@Validate(IsAfter1970Constraint) |
|
|
|
|
|
|
|
@ -129,7 +129,7 @@ export class OrderService { |
|
|
|
const assetSubClass = data.assetSubClass; |
|
|
|
const dataSource: DataSource = 'MANUAL'; |
|
|
|
|
|
|
|
let name: string; |
|
|
|
let name = data.SymbolProfile.connectOrCreate.create.name; |
|
|
|
let symbol: string; |
|
|
|
|
|
|
|
if ( |
|
|
|
@ -142,7 +142,7 @@ export class OrderService { |
|
|
|
symbol = data.SymbolProfile.connectOrCreate.create.symbol; |
|
|
|
} else { |
|
|
|
// Create custom asset profile
|
|
|
|
name = data.SymbolProfile.connectOrCreate.create.symbol; |
|
|
|
name = name ?? data.SymbolProfile.connectOrCreate.create.symbol; |
|
|
|
symbol = uuidv4(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -76,12 +76,8 @@ export class ImportActivitiesService { |
|
|
|
updateAccountBalance: false |
|
|
|
}); |
|
|
|
|
|
|
|
if ( |
|
|
|
dataSource === DataSource.MANUAL && |
|
|
|
!['FEE', 'INTEREST', 'LIABILITY'].includes(type) |
|
|
|
) { |
|
|
|
if (dataSource === DataSource.MANUAL) { |
|
|
|
// Create synthetic asset profile for MANUAL data source
|
|
|
|
// (except for FEE, INTEREST, and LIABILITY which don't require asset profiles)
|
|
|
|
assetProfiles.push({ |
|
|
|
currency, |
|
|
|
symbol, |
|
|
|
|
|
|
|
@ -143,7 +143,10 @@ |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@if (!isUUID(element.SymbolProfile?.symbol)) { |
|
|
|
@if ( |
|
|
|
element.SymbolProfile?.dataSource !== 'MANUAL' && |
|
|
|
!isUUID(element.SymbolProfile?.symbol) |
|
|
|
) { |
|
|
|
<div> |
|
|
|
<small class="text-muted">{{ |
|
|
|
element.SymbolProfile?.symbol | gfSymbol |
|
|
|
|