diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts index bc467f1b7..f7b56d4b4 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts @@ -71,7 +71,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit { public assetProfile: AdminMarketDataDetails['assetProfile']; public assetProfileIdentifierForm = this.formBuilder.group( { - editedSearchSymbol: new FormControl( + symbol: new FormControl( { symbol: null, dataSource: null }, [Validators.required] ) @@ -253,11 +253,11 @@ export class AssetProfileDialog implements OnDestroy, OnInit { private isNewSymbolValid(control: AbstractControl): ValidationErrors { const currentAssetProfileIdentifier: AssetProfileIdentifier | undefined = - control.get('editedSearchSymbol').value; + control.get('symbol').value; if ( - currentAssetProfileIdentifier.dataSource === this.data?.dataSource && - currentAssetProfileIdentifier.symbol === this.data?.symbol + currentAssetProfileIdentifier?.dataSource === this.data?.dataSource && + currentAssetProfileIdentifier?.symbol === this.data?.symbol ) { return { equalsPreviousSymbol: true @@ -340,10 +340,8 @@ export class AssetProfileDialog implements OnDestroy, OnInit { public async onSubmitAssetProfileIdentifierForm() { const assetProfileIdentifierData: UpdateAssetProfileDto = { dataSource: - this.assetProfileIdentifierForm.get('editedSearchSymbol').value - .dataSource, - symbol: - this.assetProfileIdentifierForm.get('editedSearchSymbol').value.symbol + this.assetProfileIdentifierForm.get('symbol').value.dataSource, + symbol: this.assetProfileIdentifierForm.get('symbol').value.symbol }; try { @@ -372,7 +370,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit { catchError((error: HttpErrorResponse) => { if (error.status === 409) { this.snackBar.open( - $localize`This symbol is already in use`, + $localize`This symbol is already in use.`, undefined, { duration: ms('3 seconds') @@ -380,7 +378,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit { ); } else { this.snackBar.open( - $localize`An error occurred while updating the symbol`, + $localize`An error occurred while updating the symbol.`, undefined, { duration: ms('3 seconds') diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index 50e49df92..86210c890 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -100,7 +100,7 @@ Name, symbol or ISIN @@ -110,10 +110,8 @@ mat-flat-button type="submit" [disabled]=" - assetProfileIdentifierForm.hasError( - 'invalidData', - 'editedSearchSymbol' - ) || assetProfileIdentifierForm.hasError('equalsPreviousSymbol') + assetProfileIdentifierForm.hasError('invalidData', 'symbol') || + assetProfileIdentifierForm.hasError('equalsPreviousSymbol') " > Apply