|
@ -139,7 +139,8 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { |
|
|
unitPriceInCustomCurrency: [ |
|
|
unitPriceInCustomCurrency: [ |
|
|
this.data.activity?.unitPrice, |
|
|
this.data.activity?.unitPrice, |
|
|
Validators.required |
|
|
Validators.required |
|
|
] |
|
|
], |
|
|
|
|
|
updateAccountBalance: [false] |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this.activityForm.valueChanges |
|
|
this.activityForm.valueChanges |
|
@ -297,6 +298,8 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { |
|
|
Validators.required |
|
|
Validators.required |
|
|
); |
|
|
); |
|
|
this.activityForm.controls['searchSymbol'].updateValueAndValidity(); |
|
|
this.activityForm.controls['searchSymbol'].updateValueAndValidity(); |
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].disable(); |
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].setValue(false); |
|
|
} else { |
|
|
} else { |
|
|
this.activityForm.controls['accountId'].setValidators( |
|
|
this.activityForm.controls['accountId'].setValidators( |
|
|
Validators.required |
|
|
Validators.required |
|
@ -314,6 +317,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { |
|
|
Validators.required |
|
|
Validators.required |
|
|
); |
|
|
); |
|
|
this.activityForm.controls['searchSymbol'].updateValueAndValidity(); |
|
|
this.activityForm.controls['searchSymbol'].updateValueAndValidity(); |
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].enable(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
@ -411,7 +415,9 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { |
|
|
: this.activityForm.controls['searchSymbol'].value.symbol, |
|
|
: this.activityForm.controls['searchSymbol'].value.symbol, |
|
|
tags: this.activityForm.controls['tags'].value, |
|
|
tags: this.activityForm.controls['tags'].value, |
|
|
type: this.activityForm.controls['type'].value, |
|
|
type: this.activityForm.controls['type'].value, |
|
|
unitPrice: this.activityForm.controls['unitPrice'].value |
|
|
unitPrice: this.activityForm.controls['unitPrice'].value, |
|
|
|
|
|
updateAccountBalance: |
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].value |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
if (this.data.activity.id) { |
|
|
if (this.data.activity.id) { |
|
|