remove field business asset form

This commit is contained in:
gayathri1990 2021-05-05 20:38:01 +05:30
parent 36d708072f
commit f0396d5c9a
2 changed files with 14 additions and 14 deletions

View File

@ -117,7 +117,7 @@
</mat-form-field> </mat-form-field>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" <!--<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"
*ngIf="(itemrow.get('business_ownership_type').value == 'owned')"> *ngIf="(itemrow.get('business_ownership_type').value == 'owned')">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
@ -155,21 +155,21 @@
*ngIf="itemrow.controls['business_name_of_the_other_owner'].hasError('required')">Asset *ngIf="itemrow.controls['business_name_of_the_other_owner'].hasError('required')">Asset
Owned by Required</mat-error> Owned by Required</mat-error>
</mat-form-field> </mat-form-field>
<!-- {{(lender_short_name == 'MWISE' ? prod_catagory != 'BL' ? true : false : true)}} -->
<div *ngIf="(lender_short_name != 'CLIX') && (lender_short_name == 'MWISE' ? prod_catagory != 'BL' ? true : false : true)"> <div *ngIf="(lender_short_name != 'CLIX') && (lender_short_name == 'MWISE' ? prod_catagory != 'BL' ? true : false : true)">
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Age of Asset in Years</mat-label> <mat-label>Age of Asset in Years</mat-label>
<input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage" <input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage"
minlength="1" maxlength="2" OnlyNumber type="text" minlength="1" maxlength="2" OnlyNumber type="text"
(keyup)="calculateVintagePurchase($event.target.value,i,1)"> (keyup)="calculateVintagePurchase($event.target.value,i,1)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width:45%"> <mat-form-field style="width:45%">
<mat-label>Age of Asset in Months</mat-label> <mat-label>Age of Asset in Months</mat-label>
<input matInput autocomplete="off" placeholder="eg.12" formControlName="asset_months" <input matInput autocomplete="off" placeholder="eg.12" formControlName="asset_months"
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,5)"> minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,5)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field> </mat-form-field>
@ -178,13 +178,13 @@
<input matInput autocomplete="off" placeholder="YYYY eg.2018" <input matInput autocomplete="off" placeholder="YYYY eg.2018"
formControlName="business_purchase_year" minlength="4" maxlength="4" OnlyNumber formControlName="business_purchase_year" minlength="4" maxlength="4" OnlyNumber
type="text" (keyup)="calculateVintagePurchase($event.target.value,i,4)"> type="text" (keyup)="calculateVintagePurchase($event.target.value,i,4)">
<!-- <mat-error> Invalid year format</mat-error> -->
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>-->
<span *ngIf="lender_short_name != 'CLIX' && lender_short_name != 'MWISE' || prod_catagory === 'LFMP'"> <!--<span *ngIf="lender_short_name != 'CLIX' && lender_short_name != 'MWISE' || prod_catagory === 'LFMP'">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width:95%" <mat-form-field style="width:95%"
*ngIf="(itemrow.get('business_ownership_type').value == 'owned')"> *ngIf="(itemrow.get('business_ownership_type').value == 'owned')">
@ -197,7 +197,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
</span> </span>-->
</div> </div>

View File

@ -507,7 +507,7 @@ console.log(selectedAddressType)
business_name_of_the_other_owner: [''], business_name_of_the_other_owner: [''],
business_vintage: [''], business_vintage: [''],
asset_months:[''], asset_months:[''],
business_purchase_year: ['', Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])], business_purchase_year: [''],
business_emi: [''], business_emi: [''],
}); });
} }
@ -530,7 +530,7 @@ console.log(selectedAddressType)
business_name_of_the_other_owner: [''], business_name_of_the_other_owner: [''],
business_vintage: [''], business_vintage: [''],
asset_months:[''], asset_months:[''],
business_purchase_year: ['', Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])], business_purchase_year: [''],
business_emi: [''], business_emi: [''],
}); });
} }
@ -1350,8 +1350,8 @@ console.log(selectedAddressType)
if (value == 'owned') { if (value == 'owned') {
item.controls.business_monthly_rented_amt.setValue(''); item.controls.business_monthly_rented_amt.setValue('');
item.controls.business_monthly_rented_amt.clearValidators(); item.controls.business_monthly_rented_amt.clearValidators();
item.controls.business_name_of_the_owner.setValidators([Validators.required]); item.controls.business_name_of_the_owner.setValidators();
item.controls.business_approximate_market_value.setValidators([Validators.required]); item.controls.business_approximate_market_value.setValidators();
} }
else { else {
item.controls.business_monthly_rented_amt.setValidators([Validators.required]); item.controls.business_monthly_rented_amt.setValidators([Validators.required]);