Browse Source
Feature/Support overriding name of asset profile dialog (#3199)
* Support overriding name of asset profile dialog
* Update changelog
pull/3202/head
Fedron
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
35 additions and
16 deletions
-
CHANGELOG.md
-
apps/api/src/app/admin/admin.service.ts
-
apps/api/src/services/symbol-profile/symbol-profile.service.ts
-
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
|
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Added |
|
|
|
|
|
|
|
- Extended the export functionality by the user account’s currency |
|
|
|
- Added support to override the name of an asset profile in the asset profile details dialog of the admin control |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
@ -331,19 +331,35 @@ export class AdminService { |
|
|
|
symbol, |
|
|
|
symbolMapping |
|
|
|
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) { |
|
|
|
await this.symbolProfileService.updateSymbolProfile({ |
|
|
|
assetClass, |
|
|
|
assetSubClass, |
|
|
|
comment, |
|
|
|
countries, |
|
|
|
currency, |
|
|
|
dataSource, |
|
|
|
name, |
|
|
|
scraperConfiguration, |
|
|
|
sectors, |
|
|
|
symbol, |
|
|
|
symbolMapping |
|
|
|
}); |
|
|
|
const updatedSymbolProfile: Prisma.SymbolProfileUpdateInput & UniqueAsset = |
|
|
|
{ |
|
|
|
assetClass, |
|
|
|
assetSubClass, |
|
|
|
comment, |
|
|
|
countries, |
|
|
|
currency, |
|
|
|
dataSource, |
|
|
|
scraperConfiguration, |
|
|
|
sectors, |
|
|
|
symbol, |
|
|
|
symbolMapping, |
|
|
|
...(dataSource === 'MANUAL' |
|
|
|
? { name } |
|
|
|
: { |
|
|
|
SymbolProfileOverrides: { |
|
|
|
upsert: { |
|
|
|
create: { |
|
|
|
name: name as string |
|
|
|
}, |
|
|
|
update: { |
|
|
|
name: name as string |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}; |
|
|
|
|
|
|
|
await this.symbolProfileService.updateSymbolProfile(updatedSymbolProfile); |
|
|
|
|
|
|
|
const [symbolProfile] = await this.symbolProfileService.getSymbolProfiles([ |
|
|
|
{ |
|
|
|
|
|
@ -97,7 +97,8 @@ export class SymbolProfileService { |
|
|
|
scraperConfiguration, |
|
|
|
sectors, |
|
|
|
symbol, |
|
|
|
symbolMapping |
|
|
|
symbolMapping, |
|
|
|
SymbolProfileOverrides |
|
|
|
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) { |
|
|
|
return this.prismaService.symbolProfile.update({ |
|
|
|
data: { |
|
|
@ -109,7 +110,8 @@ export class SymbolProfileService { |
|
|
|
name, |
|
|
|
scraperConfiguration, |
|
|
|
sectors, |
|
|
|
symbolMapping |
|
|
|
symbolMapping, |
|
|
|
SymbolProfileOverrides |
|
|
|
}, |
|
|
|
where: { dataSource_symbol: { dataSource, symbol } } |
|
|
|
}); |
|
|
|
|
|
@ -205,7 +205,7 @@ |
|
|
|
} |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
<div *ngIf="assetProfile?.dataSource === 'MANUAL'" class="mt-3"> |
|
|
|
<div class="mt-3"> |
|
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
|
<mat-label i18n>Name</mat-label> |
|
|
|
<input formControlName="name" matInput type="text" /> |
|
|
|