fix update activity, hide update cash balance on edit (#1959)
* Fix update activity, hide update cash balance on edit * Update changelog
This commit is contained in:
parent
a2e1209196
commit
8e000baef2
@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Improved the market price on the first buy date in the chart of the position detail dialog
|
||||
- Restructured the admin control panel with a new settings tab
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an error that occurred while editing an activity caused by the cash balance update
|
||||
|
||||
## 1.268.0 - 2023-05-08
|
||||
|
||||
### Added
|
||||
|
@ -68,5 +68,5 @@ export class CreateOrderDto {
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
updateAccountBalance: boolean;
|
||||
updateAccountBalance?: boolean;
|
||||
}
|
||||
|
@ -67,8 +67,4 @@ export class UpdateOrderDto {
|
||||
|
||||
@IsNumber()
|
||||
unitPrice: number;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
updateAccountBalance: boolean;
|
||||
}
|
||||
|
@ -415,13 +415,14 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
|
||||
: this.activityForm.controls['searchSymbol'].value.symbol,
|
||||
tags: this.activityForm.controls['tags'].value,
|
||||
type: this.activityForm.controls['type'].value,
|
||||
unitPrice: this.activityForm.controls['unitPrice'].value,
|
||||
updateAccountBalance:
|
||||
this.activityForm.controls['updateAccountBalance'].value
|
||||
unitPrice: this.activityForm.controls['unitPrice'].value
|
||||
};
|
||||
|
||||
if (this.data.activity.id) {
|
||||
(activity as UpdateOrderDto).id = this.data.activity.id;
|
||||
} else {
|
||||
(activity as CreateOrderDto).updateAccountBalance =
|
||||
this.activityForm.controls['updateAccountBalance'].value;
|
||||
}
|
||||
|
||||
this.dialogRef.close({ activity });
|
||||
|
@ -18,8 +18,12 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field appearance="outline" class="mb-1 without-hint w-100">
|
||||
<div [ngClass]="{'mb-3': data.activity.id}">
|
||||
<mat-form-field
|
||||
appearance="outline"
|
||||
class="w-100"
|
||||
[ngClass]="{'mb-1 without-hint': !data.activity.id}"
|
||||
>
|
||||
<mat-label i18n>Account</mat-label>
|
||||
<mat-select formControlName="accountId">
|
||||
<mat-option
|
||||
@ -32,7 +36,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<div class="mb-3" [ngClass]="{'d-none': data.activity.id}">
|
||||
<mat-checkbox color="primary" formControlName="updateAccountBalance" i18n
|
||||
>Update Cash Balance</mat-checkbox
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user