add pd (remove validation loan amount,loan applicant id)
This commit is contained in:
parent
a7c6897a5c
commit
baae0d0aba
@ -158,13 +158,21 @@
|
||||
<!-- <mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD Type Required.</mat-error> -->
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%">
|
||||
<!--<mat-form-field style="width: 60%">
|
||||
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Amount <span *ngIf="pdMain.loan_amount.hasError('required')">*</span></mat-label>
|
||||
<input matInput autocomplete="off" placeholder="Enter the amount" formControlName="loan_amount" OnlyNumber autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"₹"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
|
||||
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Required.</mat-error>
|
||||
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
|
||||
|
||||
</mat-form-field>-->
|
||||
<mat-form-field style="width: 60%">
|
||||
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Amount </mat-label>
|
||||
<input matInput autocomplete="off" placeholder="Enter the amount" formControlName="loan_amount" OnlyNumber autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"₹"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
|
||||
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Required.</mat-error>
|
||||
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
@ -277,7 +285,7 @@
|
||||
<mat-error *ngIf="pdMain.additional_mobile_no.hasError('maxlength') || pdMain.additional_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 12%">
|
||||
<mat-form-field style="width: 12%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="applicant_stdcode" type="text" ForMobileNumbers maxlength="5">
|
||||
<mat-error *ngIf="pdMain.applicant_stdcode.hasError('maxlength') || pdMain.applicant_stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error>
|
||||
</mat-form-field> -
|
||||
|
||||
@ -102,14 +102,18 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this.filterList()
|
||||
}
|
||||
getProCusPDType(entity_id){
|
||||
|
||||
console.log(entity_id);
|
||||
this._pd.getEntityPreferences(entity_id).subscribe(res=>{
|
||||
if(res['dataStatus']){
|
||||
console.log(res);
|
||||
console.log('res');
|
||||
this.productAllList=res['records'].products
|
||||
this.pdTypeList=res['records'].pd_types
|
||||
this.customerSegmentAllList=res['records'].customer_segments
|
||||
this.finInstitutionList=res['records'].financial_institutions
|
||||
let lender_other_config = res['records'].lender_other_config
|
||||
|
||||
lender_other_config = JSON.parse(lender_other_config)
|
||||
if(lender_other_config != null){
|
||||
this.removedControl = lender_other_config.non_mandatory_fields
|
||||
@ -117,6 +121,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
console.log('lendercofig',lender_config)
|
||||
this._PDtriggerForm.controls[lender_config].clearValidators();
|
||||
this._PDtriggerForm.controls[lender_config].updateValueAndValidity()
|
||||
this._PDtriggerForm.controls['loan_amount'].clearValidators();
|
||||
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity()
|
||||
})
|
||||
}
|
||||
else{
|
||||
@ -176,7 +182,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
applicant_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
company_name: [null],
|
||||
remarks: [null],
|
||||
// allocation_type: [null],
|
||||
// allocation_type: [null],
|
||||
// sub_allocation_type: [null],
|
||||
coapplicants: this._fb.array([]),
|
||||
addresses: this._fb.array([this.createAddresses()]),
|
||||
@ -197,7 +203,14 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
|
||||
|
||||
this.productList = this.productAllList;
|
||||
|
||||
// if(this.lenderShortName == 'CLIX')
|
||||
// {
|
||||
|
||||
// this._PDtriggerForm.controls['loan_amount'].setValue(null)
|
||||
// this._PDtriggerForm.controls['loan_amount'].clearValidators()
|
||||
// this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity()
|
||||
// alert('clix');
|
||||
// }
|
||||
// if(this.lenderShortName == 'CLIX'){
|
||||
|
||||
// let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
|
||||
@ -242,10 +255,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.pattern('^[0-9]*$')])
|
||||
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required,Validators.pattern('^[0-9]*$')]);
|
||||
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
|
||||
}
|
||||
// else{
|
||||
// this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required,Validators.pattern('^[0-9]*$')]);
|
||||
// this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
|
||||
// }
|
||||
|
||||
// if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
||||
// // console.log("entered");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user