latest change

This commit is contained in:
gayathri1990 2021-01-08 18:41:37 +05:30
parent 047ca76dbb
commit 3dff24df8b
4 changed files with 22 additions and 9 deletions

View File

@ -10,7 +10,7 @@
<mat-card>
<mat-card-header>
<mat-card-title> PD Details </mat-card-title>
<mat-card-title> PD Details </mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width: 28%">
@ -66,8 +66,13 @@
</mat-form-field>
<mat-form-field style="width: 28%">
<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 *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-form-field>
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">

View File

@ -12,7 +12,7 @@ import Swal from 'sweetalert2';
import { takeUntil } from 'rxjs/operators';
import { Subject, ReplaySubject } from 'rxjs';
@Component({
selector: 'app-add-pd',
selector: 'app-add-pd',
templateUrl: './add-pd.component.html',
styleUrls: ['./add-pd.component.scss'],
providers:[TitleCasePipe],
@ -67,9 +67,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
removedControl: any = [];
public lenderFilterCtrl:FormControl = new FormControl();
public lenderpersonFilterCtrl:FormControl = new FormControl();
public branchFilterCtrl:FormControl = new FormControl();
public filteredLenderList: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,
@ -922,7 +924,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
}
else{
this.sales_and_credit_enable=false;
// this._PDtriggerForm.controls['lender_sales_person'].setValue(null)
// this._PDtriggerForm.controls['lender_sales_person'].setValue(null)
this._PDtriggerForm.controls['lender_sales_person'].clearValidators()
this._PDtriggerForm.controls['lender_sales_person'].updateValueAndValidity()
@ -950,7 +952,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
if(records.length >0){
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.filteredLenderpersonList.next(this.sales_and_credit_person.credit_person)
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)
}
else{
@ -964,6 +968,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.sales_and_credit_person=[]
this.notifier.notify("warning",result['msg'])
}
this.filteredLenderpersonList.next(this.sales_and_credit_person.credit_person.slice());
},err=>{this.notifier.notify("error","Network Error")})
// }
@ -1117,6 +1122,9 @@ searchFun(control:any,i:number,option){
this.lenderFilterCtrl.valueChanges.pipe().subscribe(()=>{
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.applyFilter(this.branchFilterCtrl.value,this.filteredBranchList,this.lenderBranchList,'branch_name')
})

View File

@ -125,8 +125,8 @@
<mat-form-field *ngIf="sup.get('residence_ownership').value == 1">
<input matInput placeholder="Specify Ownership" formControlName="ownershipOther">
</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"
OnlyNumber type="text">
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"&#8377;"}} {{sup.get('rent').value | numberToWords}} Only</mat-hint>
@ -139,7 +139,7 @@
</mat-form-field>
</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 *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last "
[formGroupName]="i">
@ -283,7 +283,7 @@
</mat-card-actions>
</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-header>
<mat-card-title>

View File

@ -159,7 +159,7 @@ export class FamilyDetailsComponent implements OnInit {
this.initFamilyFormDetails();
let params: any = {};
params.parent_pdid=this.parent_pdid;
params.parent_pdid=this.parent_pdid;
params.pd_id = this.pdid;
params.pd_form_id = '6';