clix issues : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-06-13 20:14:47 +05:30
parent 5abd9473c2
commit d6557b316a
4 changed files with 19 additions and 21 deletions

View File

@ -406,9 +406,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
if(this.lenderShortName != 'CLIX'){ if(this.lenderShortName != 'CLIX'){
this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]); this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity(); this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
@ -420,7 +417,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
} }
this._PDtriggerForm.controls['applicant_name'].setValidators([Validators.required]); this._PDtriggerForm.controls['applicant_name'].setValidators([Validators.required]);
this._PDtriggerForm.controls['applicant_name'].updateValueAndValidity(); this._PDtriggerForm.controls['applicant_name'].updateValueAndValidity();
this._PDtriggerForm.controls['applicant_title_name'].setValidators([Validators.required]); this._PDtriggerForm.controls['applicant_title_name'].setValidators([Validators.required]);

View File

@ -107,17 +107,20 @@ export class EditPdMasterComponent implements OnInit {
} }
filterProductAbbr(param,flag){ filterProductAbbr(param,flag){
if(param == 'CLIX'){ if(param == 'CLIX'){
console.log(this.productAllList);
let getProductAbbr = this.productAllList.map(dval => dval.product_abbr); let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
console.log() console.log('getProductAbbr',getProductAbbr);
let ClixProductAbbr = ['BL','LAEP']; let ClixProductAbbr = ['BL','LAEP'];
console.log(ClixProductAbbr);
let FilteredAbbr: any = []; let FilteredAbbr: any = [];
FilteredAbbr = ClixProductAbbr.map(x => { FilteredAbbr = ClixProductAbbr.map(x => {
let findIndex = getProductAbbr.indexOf(x); let findIndex = getProductAbbr.indexOf(x);
return this.productAllList[findIndex]; return this.productAllList[findIndex];
}); });
console.log('FilteredAbbr',FilteredAbbr);
this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList; this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList;
// this.productList = this.productAllList;
} }
else{ else{
this.productList = this.productAllList; this.productList = this.productAllList;
@ -372,9 +375,9 @@ export class EditPdMasterComponent implements OnInit {
this.clearCustomValidatorFields(); this.clearCustomValidatorFields();
this.submitPdDetails(formValue, status); this.submitPdDetails(formValue, status);
} }
//trigger pd
triggerPD(formValue: any, status:any){
triggerPD(formValue: any, status:any){
console.log('functionclicked',formValue, status);
// this._EditPDtriggerForm.controls['fk_lender_id'].setValidators([Validators.required]); // this._EditPDtriggerForm.controls['fk_lender_id'].setValidators([Validators.required]);
// this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity(); // this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
@ -409,14 +412,15 @@ export class EditPdMasterComponent implements OnInit {
// this.notifier.notify('error', 'Please add applicants.!'); // this.notifier.notify('error', 'Please add applicants.!');
// } // }
this.submitPdDetails(formValue, 1);
setTimeout(() => { setTimeout(() => {
this.clearCustomValidatorFields(); this.clearCustomValidatorFields();
}, 10000); }, 10000);
this.submitPdDetails(formValue, status);
} }
// this is for clear custom validator required fields // this is for clear custom validator required fields
clearCustomValidatorFields(){ clearCustomValidatorFields(){
console.log('functionclicked 2');
this._EditPDtriggerForm.controls['fk_lender_id'].clearValidators(); this._EditPDtriggerForm.controls['fk_lender_id'].clearValidators();
this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity(); this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
@ -451,6 +455,7 @@ export class EditPdMasterComponent implements OnInit {
} }
submitPdDetails(formValue: any, status:any) { submitPdDetails(formValue: any, status:any) {
console.log('functionclicked 3');
// let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus; // let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus;
let updateStatus = this.currentPDStatus; let updateStatus = this.currentPDStatus;
@ -464,9 +469,6 @@ export class EditPdMasterComponent implements OnInit {
if(this.lenderShortName == 'CLIX'){ if(this.lenderShortName == 'CLIX'){
this._EditPDtriggerForm.controls['fk_product_id'].clearValidators();
this._EditPDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
this._EditPDtriggerForm.controls['fk_pd_type'].clearValidators(); this._EditPDtriggerForm.controls['fk_pd_type'].clearValidators();
this._EditPDtriggerForm.controls['fk_pd_type'].updateValueAndValidity(); this._EditPDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();

View File

@ -63,7 +63,7 @@
formControlName="is_there_total_fund"> formControlName="is_there_total_fund">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option value="yes disclose">Yes, Disclosed</mat-option> <mat-option value="yes disclose">Yes, Disclosed</mat-option>
<mat-option value="no not disclosed">No,not disclosed</mat-option> <mat-option value="no not disclosed">No,not Disclosed</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<span *ngIf="loanDetailsForm.controls['is_there_total_fund'].value == 'yes disclose'"> <span *ngIf="loanDetailsForm.controls['is_there_total_fund'].value == 'yes disclose'">

View File

@ -305,7 +305,7 @@ export class LoanDetailsComponent implements OnInit {
} }
}) })
if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL') { if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL' || this.productAbbr == 'LAEP') {
this.mortageCardAccess = false; this.mortageCardAccess = false;
this.loanDetailsForm.controls['owner_name'].setValue(''); this.loanDetailsForm.controls['owner_name'].setValue('');
this.loanDetailsForm.controls['owner_name'].clearValidators(); this.loanDetailsForm.controls['owner_name'].clearValidators();