This commit is contained in:
surya 2022-04-07 17:53:45 +05:30
parent 2f32d5f2ec
commit a55e370654
3 changed files with 65 additions and 54 deletions

View File

@ -1270,8 +1270,6 @@
"version": "11.1.5",
"resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-11.1.5.tgz",
"integrity": "sha512-BRRHMrgw9tG0BezTnfszzFTlpW9B9Zh5kyZF/pxqfJxpUsZ0aA/uXlL4cloe4+msQ6yIdu1/jhUCDInwSzmpFw=="
<<<<<<< HEAD
=======
},
"@swimlane/ngx-dnd": {
"version": "9.0.0",
@ -1307,7 +1305,6 @@
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}
}
>>>>>>> 6f3613fe88d9f917ac496803b264c51a0ccc6410
},
"@types/aws-sdk": {
"version": "2.7.0",

View File

@ -23,7 +23,7 @@
</mat-option>
<mat-option> Select </mat-option>
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of filteredLenderList | async" [value]="LL.entity_id" >
{{LL.full_name}}{{LL.entity_id}}
{{LL.full_name}}
</mat-option>
</mat-select>
</mat-form-field>
@ -57,10 +57,10 @@
<mat-form-field style="width: 28%">
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Application ID</mat-label>
<input matInput autocomplete="off" formControlName="lender_applicant_id" type="text" (change)="checkExistPd($event.target.value,1)">
<mat-error *ngIf="_PDtriggerForm.get('fk_lender_id').value =='16'"> Required</mat-error>
<!-- <mat-error *ngIf="_PDtriggerForm.get('fk_lender_id').value =='16'"> Required</mat-error> -->
<!-- <div *ngIf="_PDtriggerForm.get('fk_lender_id').value =='16'"><mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')" >Applicant ID Required</mat-error> </div>
<ng-container *ngIf="_PDtriggerForm.get('fk_lender_id').value =='16'" ngProjectAs="mat-error"> <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')" >Applicant ID Required</mat-error> </ng-container> -->
<mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error>
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->
<mat-form-field style="width: 28%">
@ -176,8 +176,8 @@
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{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-error *ngIf="_PDtriggerForm.get('fk_lender_id').value =='16'">Loan Amount Required</mat-error>
<!-- <mat-error *ngIf="_PDtriggerForm.get('fk_lender_id').value =='16'">Loan Amount Required</mat-error>
-->
</mat-form-field>
</mat-card-content>
</mat-card>

View File

@ -195,6 +195,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
lenderShortName:string;
/** FOR Dropdowns */
selectedLender(lender) {
// if(this.lenderShortName == 'CLIX'){
// this._PDtriggerForm.controls['lender_applicant_id'].setValidators([Validators.required,Validators.pattern('^[0-9]*$')])
// this._PDtriggerForm.controls['lender_applicant_id'].updateValueAndValidity();
// // this._PDtriggerForm.controls["lender_applicant_id"].setValidators
// }
console.log('lender',lender);
this.lenderBranchList = lender['branches'];
this.filteredBranchList.next(this.lenderBranchList.slice());
@ -211,6 +217,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
// this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity()
// }
if(this.lenderShortName == 'CLIX')
{
this._PDtriggerForm.controls['lender_applicant_id'].setValidators([Validators.required])
}
// if(this.lenderShortName == 'CLIX'){
// let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
@ -277,12 +288,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
// }
// console.log("len",lender)
if(lender.entity_id == '16')
{
alert('kjjhf')
this._PDtriggerForm.controls['lender_applicant_id'].setValidators([Validators.required])
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required])
}
// if(lender.entity_id == '16'|| this.lenderShortName == 'CLIX')
// {
// this._PDtriggerForm.controls['lender_applicant_id'].setValidators([Validators.required])
// this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required])
// }
}
@ -1058,6 +1069,9 @@ checkExistPd(value,option){
// if(option == 2 || ){
if((this.pdMain.mobile_no.value != null && this.pdMain.applicant_name.value != null && option == 2) || option == 1){
this._pd.checkExistPDDetails(param).subscribe(result=>{
if(result['dataStatus']){
if(result['records'].length > 0){