WEB-684 Allow negative values in Fund Mapping
This commit is contained in:
@@ -132,6 +132,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
matInput
|
matInput
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
formControlName="minOutStandingAmountPercentage"
|
formControlName="minOutStandingAmountPercentage"
|
||||||
placeholder="{{ 'labels.inputs.Minimum Value' | translate }}"
|
placeholder="{{ 'labels.inputs.Minimum Value' | translate }}"
|
||||||
/>
|
/>
|
||||||
@@ -150,6 +151,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
matInput
|
matInput
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
formControlName="outStandingAmountPercentage"
|
formControlName="outStandingAmountPercentage"
|
||||||
placeholder="{{ 'labels.inputs.Comparison Value' | translate }}"
|
placeholder="{{ 'labels.inputs.Comparison Value' | translate }}"
|
||||||
/>
|
/>
|
||||||
@@ -168,6 +170,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
matInput
|
matInput
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
formControlName="maxOutStandingAmountPercentage"
|
formControlName="maxOutStandingAmountPercentage"
|
||||||
placeholder="{{ 'labels.inputs.Maximum Value' | translate }}"
|
placeholder="{{ 'labels.inputs.Maximum Value' | translate }}"
|
||||||
/>
|
/>
|
||||||
@@ -213,6 +216,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
matInput
|
matInput
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
formControlName="minOutstandingAmount"
|
formControlName="minOutstandingAmount"
|
||||||
placeholder="{{ 'labels.inputs.Minimum Value' | translate }}"
|
placeholder="{{ 'labels.inputs.Minimum Value' | translate }}"
|
||||||
/>
|
/>
|
||||||
@@ -231,6 +235,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
matInput
|
matInput
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
formControlName="outstandingAmount"
|
formControlName="outstandingAmount"
|
||||||
placeholder="{{ 'labels.inputs.Comparison Value' | translate }}"
|
placeholder="{{ 'labels.inputs.Comparison Value' | translate }}"
|
||||||
/>
|
/>
|
||||||
@@ -249,6 +254,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
matInput
|
matInput
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
formControlName="maxOutstandingAmount"
|
formControlName="maxOutstandingAmount"
|
||||||
placeholder="{{ 'labels.inputs.Maximum Value' | translate }}"
|
placeholder="{{ 'labels.inputs.Maximum Value' | translate }}"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -186,17 +186,26 @@ export class FundMappingComponent implements OnInit {
|
|||||||
if (_value === 'between') {
|
if (_value === 'between') {
|
||||||
this.fundMappingForm.addControl(
|
this.fundMappingForm.addControl(
|
||||||
'minOutStandingAmountPercentage',
|
'minOutStandingAmountPercentage',
|
||||||
new UntypedFormControl('', Validators.required)
|
new UntypedFormControl('', [
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)
|
||||||
|
])
|
||||||
);
|
);
|
||||||
this.fundMappingForm.addControl(
|
this.fundMappingForm.addControl(
|
||||||
'maxOutStandingAmountPercentage',
|
'maxOutStandingAmountPercentage',
|
||||||
new UntypedFormControl('', Validators.required)
|
new UntypedFormControl('', [
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)
|
||||||
|
])
|
||||||
);
|
);
|
||||||
this.fundMappingForm.removeControl('outStandingAmountPercentage');
|
this.fundMappingForm.removeControl('outStandingAmountPercentage');
|
||||||
} else {
|
} else {
|
||||||
this.fundMappingForm.addControl(
|
this.fundMappingForm.addControl(
|
||||||
'outStandingAmountPercentage',
|
'outStandingAmountPercentage',
|
||||||
new UntypedFormControl('', Validators.required)
|
new UntypedFormControl('', [
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)
|
||||||
|
])
|
||||||
);
|
);
|
||||||
this.fundMappingForm.removeControl('minOutStandingAmountPercentage');
|
this.fundMappingForm.removeControl('minOutStandingAmountPercentage');
|
||||||
this.fundMappingForm.removeControl('maxOutStandingAmountPercentage');
|
this.fundMappingForm.removeControl('maxOutStandingAmountPercentage');
|
||||||
@@ -216,11 +225,29 @@ export class FundMappingComponent implements OnInit {
|
|||||||
this.fundMappingForm.addControl('outstandingAmountCondition', new UntypedFormControl('', Validators.required));
|
this.fundMappingForm.addControl('outstandingAmountCondition', new UntypedFormControl('', Validators.required));
|
||||||
this.fundMappingForm.get('outstandingAmountCondition').valueChanges.subscribe((_value: string) => {
|
this.fundMappingForm.get('outstandingAmountCondition').valueChanges.subscribe((_value: string) => {
|
||||||
if (_value === 'between') {
|
if (_value === 'between') {
|
||||||
this.fundMappingForm.addControl('minOutstandingAmount', new UntypedFormControl('', Validators.required));
|
this.fundMappingForm.addControl(
|
||||||
this.fundMappingForm.addControl('maxOutstandingAmount', new UntypedFormControl('', Validators.required));
|
'minOutstandingAmount',
|
||||||
|
new UntypedFormControl('', [
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)
|
||||||
|
])
|
||||||
|
);
|
||||||
|
this.fundMappingForm.addControl(
|
||||||
|
'maxOutstandingAmount',
|
||||||
|
new UntypedFormControl('', [
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)
|
||||||
|
])
|
||||||
|
);
|
||||||
this.fundMappingForm.removeControl('outstandingAmount');
|
this.fundMappingForm.removeControl('outstandingAmount');
|
||||||
} else {
|
} else {
|
||||||
this.fundMappingForm.addControl('outstandingAmount', new UntypedFormControl('', Validators.required));
|
this.fundMappingForm.addControl(
|
||||||
|
'outstandingAmount',
|
||||||
|
new UntypedFormControl('', [
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)
|
||||||
|
])
|
||||||
|
);
|
||||||
this.fundMappingForm.removeControl('minOutstandingAmount');
|
this.fundMappingForm.removeControl('minOutstandingAmount');
|
||||||
this.fundMappingForm.removeControl('maxOutstandingAmount');
|
this.fundMappingForm.removeControl('maxOutstandingAmount');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user