Feature/Support overriding name of asset profile dialog (#3199)
* Support overriding name of asset profile dialog * Update changelog
This commit is contained in:
parent
b41eb60348
commit
98de2355c4
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Extended the export functionality by the user account’s currency
|
- 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
|
### Fixed
|
||||||
|
|
||||||
|
@ -331,19 +331,35 @@ export class AdminService {
|
|||||||
symbol,
|
symbol,
|
||||||
symbolMapping
|
symbolMapping
|
||||||
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) {
|
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) {
|
||||||
await this.symbolProfileService.updateSymbolProfile({
|
const updatedSymbolProfile: Prisma.SymbolProfileUpdateInput & UniqueAsset =
|
||||||
assetClass,
|
{
|
||||||
assetSubClass,
|
assetClass,
|
||||||
comment,
|
assetSubClass,
|
||||||
countries,
|
comment,
|
||||||
currency,
|
countries,
|
||||||
dataSource,
|
currency,
|
||||||
name,
|
dataSource,
|
||||||
scraperConfiguration,
|
scraperConfiguration,
|
||||||
sectors,
|
sectors,
|
||||||
symbol,
|
symbol,
|
||||||
symbolMapping
|
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([
|
const [symbolProfile] = await this.symbolProfileService.getSymbolProfiles([
|
||||||
{
|
{
|
||||||
|
@ -97,7 +97,8 @@ export class SymbolProfileService {
|
|||||||
scraperConfiguration,
|
scraperConfiguration,
|
||||||
sectors,
|
sectors,
|
||||||
symbol,
|
symbol,
|
||||||
symbolMapping
|
symbolMapping,
|
||||||
|
SymbolProfileOverrides
|
||||||
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) {
|
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) {
|
||||||
return this.prismaService.symbolProfile.update({
|
return this.prismaService.symbolProfile.update({
|
||||||
data: {
|
data: {
|
||||||
@ -109,7 +110,8 @@ export class SymbolProfileService {
|
|||||||
name,
|
name,
|
||||||
scraperConfiguration,
|
scraperConfiguration,
|
||||||
sectors,
|
sectors,
|
||||||
symbolMapping
|
symbolMapping,
|
||||||
|
SymbolProfileOverrides
|
||||||
},
|
},
|
||||||
where: { dataSource_symbol: { dataSource, symbol } }
|
where: { dataSource_symbol: { dataSource, symbol } }
|
||||||
});
|
});
|
||||||
|
@ -205,7 +205,7 @@
|
|||||||
}
|
}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="assetProfile?.dataSource === 'MANUAL'" class="mt-3">
|
<div class="mt-3">
|
||||||
<mat-form-field appearance="outline" class="w-100 without-hint">
|
<mat-form-field appearance="outline" class="w-100 without-hint">
|
||||||
<mat-label i18n>Name</mat-label>
|
<mat-label i18n>Name</mat-label>
|
||||||
<input formControlName="name" matInput type="text" />
|
<input formControlName="name" matInput type="text" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user