latest change
This commit is contained in:
parent
047ca76dbb
commit
3dff24df8b
@ -66,8 +66,13 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
<mat-select placeholder="Lender Credit Person" formControlName="lender_credit_person">
|
<mat-select placeholder="Lender Credit Person" formControlName="lender_credit_person">
|
||||||
|
<mat-option>
|
||||||
|
<ngx-mat-select-search [formControl]="lenderpersonFilterCtrl"
|
||||||
|
[placeholderLabel]="'Search Lender Person...'"
|
||||||
|
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let person of sales_and_credit_person.credit_person" [value]="person.userid">{{person.user_name}}</mat-option>
|
<mat-option *ngFor="let person of filteredLenderpersonList | async" [value]="person.userid">{{person.user_name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
||||||
|
|||||||
@ -67,9 +67,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
removedControl: any = [];
|
removedControl: any = [];
|
||||||
|
|
||||||
public lenderFilterCtrl:FormControl = new FormControl();
|
public lenderFilterCtrl:FormControl = new FormControl();
|
||||||
|
public lenderpersonFilterCtrl:FormControl = new FormControl();
|
||||||
public branchFilterCtrl:FormControl = new FormControl();
|
public branchFilterCtrl:FormControl = new FormControl();
|
||||||
public filteredLenderList:ReplaySubject<any> = new ReplaySubject<any>(1);
|
public filteredLenderList:ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
public filteredBranchList:ReplaySubject<any> = new ReplaySubject<any>(1);
|
public filteredBranchList:ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
|
public filteredLenderpersonList:ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
|
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||||
@ -950,7 +952,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
if(records.length >0){
|
if(records.length >0){
|
||||||
this.sales_and_credit_person.sales_person=records.filter(val=>val.role_type == "SALES")
|
this.sales_and_credit_person.sales_person=records.filter(val=>val.role_type == "SALES")
|
||||||
this.sales_and_credit_person.credit_person=records.filter(val=>val.role_type == "CREDIT")
|
this.sales_and_credit_person.credit_person=records.filter(val=>val.role_type == "CREDIT")
|
||||||
|
this.filteredLenderpersonList.next(this.sales_and_credit_person.credit_person)
|
||||||
if(this.sales_and_credit_person.credit_person.length > 0){
|
if(this.sales_and_credit_person.credit_person.length > 0){
|
||||||
|
|
||||||
this._PDtriggerForm.controls['lender_credit_person'].setValue(this.sales_and_credit_person.credit_person[0].userid)
|
this._PDtriggerForm.controls['lender_credit_person'].setValue(this.sales_and_credit_person.credit_person[0].userid)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -964,6 +968,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this.sales_and_credit_person=[]
|
this.sales_and_credit_person=[]
|
||||||
this.notifier.notify("warning",result['msg'])
|
this.notifier.notify("warning",result['msg'])
|
||||||
}
|
}
|
||||||
|
this.filteredLenderpersonList.next(this.sales_and_credit_person.credit_person.slice());
|
||||||
},err=>{this.notifier.notify("error","Network Error")})
|
},err=>{this.notifier.notify("error","Network Error")})
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -1117,6 +1122,9 @@ searchFun(control:any,i:number,option){
|
|||||||
this.lenderFilterCtrl.valueChanges.pipe().subscribe(()=>{
|
this.lenderFilterCtrl.valueChanges.pipe().subscribe(()=>{
|
||||||
this.applyFilter(this.lenderFilterCtrl.value,this.filteredLenderList,this.lenderList,'full_name')
|
this.applyFilter(this.lenderFilterCtrl.value,this.filteredLenderList,this.lenderList,'full_name')
|
||||||
})
|
})
|
||||||
|
this.lenderpersonFilterCtrl.valueChanges.pipe().subscribe(()=>{
|
||||||
|
this.applyFilter(this.lenderpersonFilterCtrl.value,this.filteredLenderpersonList,this.sales_and_credit_person.credit_person,'user_name')
|
||||||
|
})
|
||||||
this.branchFilterCtrl.valueChanges.pipe().subscribe(()=>{
|
this.branchFilterCtrl.valueChanges.pipe().subscribe(()=>{
|
||||||
this.applyFilter(this.branchFilterCtrl.value,this.filteredBranchList,this.lenderBranchList,'branch_name')
|
this.applyFilter(this.branchFilterCtrl.value,this.filteredBranchList,this.lenderBranchList,'branch_name')
|
||||||
})
|
})
|
||||||
|
|||||||
@ -126,7 +126,7 @@
|
|||||||
<input matInput placeholder="Specify Ownership" formControlName="ownershipOther">
|
<input matInput placeholder="Specify Ownership" formControlName="ownershipOther">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3" style="width:43%;">
|
<mat-form-field *ngIf="sup.get('residence_ownership').value == 1" style="width:43%;">
|
||||||
<input matInput placeholder=" Monthly Rent Amount" formControlName="rent"
|
<input matInput placeholder=" Monthly Rent Amount" formControlName="rent"
|
||||||
OnlyNumber type="text">
|
OnlyNumber type="text">
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"₹"}} {{sup.get('rent').value | numberToWords}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"₹"}} {{sup.get('rent').value | numberToWords}} Only</mat-hint>
|
||||||
@ -139,7 +139,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div *ngIf="lender_short_name !== 'CLIX' && lender_short_name !== 'MWISE' || prod_catagory === 'LFMP'">
|
<div *ngIf="lender_short_name !== 'CLIX' && lender_short_name !== 'MWISE' && lender_short_name !== 'UDAAN' || prod_catagory === 'LFMP'">
|
||||||
<div formArrayName="family_members_details">
|
<div formArrayName="family_members_details">
|
||||||
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last "
|
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last "
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
@ -283,7 +283,7 @@
|
|||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="lender_short_name === 'CLIX' || lender_short_name === 'MWISE' && prod_catagory != 'LFMP'">
|
<div *ngIf="lender_short_name === 'CLIX' || lender_short_name === 'MWISE' || lender_short_name === 'UDAAN' && prod_catagory != 'LFMP'">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user