add pd : ps
This commit is contained in:
parent
b94704597a
commit
4d39530bc6
@ -128,53 +128,61 @@
|
|||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Address Details</mat-card-title>
|
<mat-card-title>Address Details</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index;">
|
||||||
|
<mat-card-content [formGroupName]="i">
|
||||||
<mat-form-field style="width: 96%">
|
<mat-form-field style="width: 96%">
|
||||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1" style="text-transform: uppercase"></textarea>
|
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline" style="text-transform: uppercase"></textarea>
|
||||||
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
||||||
<!-- <mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
<!-- <mat-error *ngIf="pdAddresses.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 32%">
|
<mat-form-field style="width: 32%">
|
||||||
<mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)">
|
<mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList($event.value,i)">
|
||||||
<mat-option>
|
<mat-option> Select </mat-option>
|
||||||
Select
|
|
||||||
</mat-option>
|
|
||||||
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
|
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
|
||||||
{{SL.name}}
|
{{SL.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!-- <mat-error *ngIf="pdMain.fk_state.hasError('required')">State Required.</mat-error> -->
|
<!-- <mat-error *ngIf="pdAddresses.fk_state.hasError('required')">State Required.</mat-error> -->
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 32%">
|
<mat-form-field style="width: 32%">
|
||||||
<mat-select placeholder="City" formControlName="fk_city">
|
<mat-select placeholder="City" formControlName="fk_city">
|
||||||
<mat-option> Select </mat-option>
|
<mat-option> Select </mat-option>
|
||||||
<mat-option *ngFor="let CL of cityList" [value]="CL.city_id">
|
<mat-option *ngFor="let CL of cityList[i]" [value]="CL.city_id">
|
||||||
{{CL.city_name}}
|
{{CL.city_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!-- <mat-error *ngIf="pdMain.fk_city.hasError('required')">City Required.</mat-error> -->
|
<!-- <mat-error *ngIf="pdAddresses.fk_city.hasError('required')">City Required.</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 24%">
|
<mat-form-field style="width: 24%">
|
||||||
<mat-select placeholder="Pincode" formControlName="pincode" >
|
<mat-select placeholder="Pincode" formControlName="pincode" (selectionChange)="getPincode($event.value,i)">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let PL of pincodeList" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
<mat-option *ngFor="let PL of pincodeList[i]" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 24%" *ngIf="pdMain.pincode.value == 1" >
|
<mat-form-field style="width: 24%" *ngIf="pincodeflag[i]">
|
||||||
|
<!-- *ngIf="pdAddresses.pincode.value == 1" -->
|
||||||
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" (keypress)="keyPress($event)">
|
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" (keypress)="keyPress($event)">
|
||||||
<mat-error *ngIf="pdMain.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error>
|
<!-- <mat-error *ngIf="pdAddresses.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<div align="end" *ngIf="pdAddresses.controls.length > 1">
|
||||||
|
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeAddresses(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<mat-card-actions align="end">
|
||||||
|
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="addAddresses()"
|
||||||
|
matTooltip="Add More Additional Addresses" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
|
<mat-icon>add</mat-icon>
|
||||||
|
</button>
|
||||||
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
@ -182,6 +190,7 @@
|
|||||||
<mat-card-title>Applicant Details</mat-card-title>
|
<mat-card-title>Applicant Details</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<h5>Applicant 1</h5>
|
||||||
<mat-form-field style="width: 12%">
|
<mat-form-field style="width: 12%">
|
||||||
<mat-select placeholder="Title" formControlName="applicant_title_name">
|
<mat-select placeholder="Title" formControlName="applicant_title_name">
|
||||||
<mat-option *ngFor="let tl of titleList" [value]="tl.title_id">
|
<mat-option *ngFor="let tl of titleList" [value]="tl.title_id">
|
||||||
@ -213,69 +222,62 @@
|
|||||||
<mat-error *ngIf="pdMain.applicant_landline.hasError('maxlength') || pdMain.applicant_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
|
<mat-error *ngIf="pdMain.applicant_landline.hasError('maxlength') || pdMain.applicant_landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<!-- <mat-card formArrayName="items">
|
<div formArrayName="coapplicants" *ngFor="let coDetails of pdCoApplicant.controls; let i = index;">
|
||||||
<mat-card-content>
|
|
||||||
<mat-list *ngFor="let coappList of items.controls; let ca = index;" [formGroupName]="ca">
|
<div class="row" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
<h3>Co App</h3>
|
|
||||||
<mat-list-item>
|
|
||||||
<mat-form-field style="width: 70%">
|
|
||||||
<input matInput autocomplete="off" placeholder="coapp Name" formControlName="coapplicantName" type="text">
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
|
|
||||||
<div style="width:50%">
|
<h5>{{coDetails.controls.label.value}} {{i+2}}</h5>
|
||||||
|
|
||||||
<!-- <span (click)="removeItem(d)">
|
<div [formGroupName]="i">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" type="button"><mat-icon>delete</mat-icon></button>
|
<mat-form-field style="width: 12%">
|
||||||
</span> --
|
<mat-select placeholder="Title" formControlName="applicant_title_name">
|
||||||
</div>
|
<mat-option *ngFor="let tl of titleList" [value]="tl.title_id">
|
||||||
</mat-list-item>
|
{{tl.name}}
|
||||||
</mat-list>
|
</mat-option>
|
||||||
</mat-card-content>
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-card-actions align="end">
|
<mat-form-field style="width: 38%">
|
||||||
|
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="coapplicant_name" type="text" required>
|
||||||
|
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 38%">
|
||||||
|
<input matInput autocomplete="off" placeholder="Company / Firm Name" formControlName="company_name" type="text">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- <mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Name" formControlName="coapplicant_name" type="text" required>
|
||||||
|
</mat-form-field> -->
|
||||||
|
|
||||||
|
<mat-form-field style="width: 38%">
|
||||||
|
<input matInput placeholder="Mobile" formControlName="coapplicant_mobile_no" type="text" (keypress)="keyPress($event)" required>
|
||||||
|
<mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 12%">
|
||||||
|
<input matInput autocomplete="off" placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" (keypress)="keyPress($event)">
|
||||||
|
<mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
|
||||||
|
</mat-form-field> -
|
||||||
|
<mat-form-field style="width: 22%">
|
||||||
|
<input matInput autocomplete="off" placeholder="Landline Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
|
||||||
|
<mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
</mat-card-actions>
|
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeCoApplicant(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||||
|
</div>
|
||||||
</mat-card> -->
|
</div>
|
||||||
<!-- Phone field to be split into 2 parts. Mobile Number mandatory and optional land line number with std code. -->
|
</div>
|
||||||
|
<!-- Phone field to be split into 2 parts. Mobile Number mandatory and optional land line number with std code. ---->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-dialog-actions align="end">
|
|
||||||
<!-- <button mat-raised-button mat-icon-button matTooltip="Add Document" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" (click)="addCoApplicant()" type="button"><mat-icon>attach_file</mat-icon></button> -->
|
<mat-card-actions align="end">
|
||||||
</mat-dialog-actions>
|
<button mat-fab class="mr-1 mb-1" color="primary" matTooltip="Add More Applicant" matTooltipPosition="above" style="opacity: 0.8;border:2px;border-radius: 50%;" (click)="addCoApplicant()"><mat-icon>group_add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||||
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
|
|
||||||
<!---- <div fxLayout="row" fxLayoutGap="5%" fxLayoutAlign="start none">
|
|
||||||
<mat-form-field style="width: 50%">
|
|
||||||
<input matInput placeholder="Mobile" formControlName="coapplicant_mobile_no" type="text" (keypress)="keyPress($event)" required>
|
|
||||||
<!-- <mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error> --
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field style="width: 50%">
|
|
||||||
<input matInput placeholder="LandLine" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
|
|
||||||
<!-- <mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Phone Number. </mat-error> --
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
|
|
||||||
<mat-select placeholder="Relationship" formControlName="relationship">
|
|
||||||
<mat-option *ngFor="let rel of relationShipList" [value]="rel.relationship_id" >
|
|
||||||
{{rel.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<div style="width:20%">
|
|
||||||
<span (click)="removeCoApplicant(i)">
|
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Additional Requirements</mat-card-title>
|
<mat-card-title>Additional Requirements</mat-card-title>
|
||||||
@ -353,89 +355,3 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div fxLayout="row" fxLayoutWrap="wrap">
|
|
||||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
|
||||||
<mat-card class="p-2">
|
|
||||||
<h5>Main Applicant</h5>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Name" formControlName="applicant_name">
|
|
||||||
<mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
<div fxLayout="row" fxLayoutGap="5%" fxLayoutAlign="start none">
|
|
||||||
<mat-form-field style="width: 50%">
|
|
||||||
<input matInput placeholder="Mobile" formControlName="mobile_no" type="text" (keypress)="keyPress($event)" required>
|
|
||||||
<mat-error *ngIf="pdMain.mobile_no.hasError('maxlength') || pdMain.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field style="width: 50%">
|
|
||||||
<input matInput placeholder="LandLine" formControlName="landline" type="text" (keypress)="keyPress($event)">
|
|
||||||
<mat-error *ngIf="pdMain.landline.hasError('maxlength') || pdMain.landline.hasError('minlength')">Enter Valid Phone Number. </mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Email" formControlName="email" type="email">
|
|
||||||
<!-- <mat-error *ngIf="pdMain.email.hasError('required')">Email Required.</mat-error> ----
|
|
||||||
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div fxLayout="row" fxLayoutWrap="wrap" formArrayName="items" *ngFor="let coDetails of pdCoApplicant.controls; let i = index;">
|
|
||||||
|
|
||||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
|
||||||
|
|
||||||
<mat-card class="p-2">
|
|
||||||
<h5>{{coDetails.controls.label.value}} {{i+1}}</h5>
|
|
||||||
|
|
||||||
<div [formGroupName]="i">
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Name" formControlName="coapplicantName" type="text" required>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutGap="5%" fxLayoutAlign="start none">
|
|
||||||
<mat-form-field style="width: 50%">
|
|
||||||
<input matInput placeholder="Mobile" formControlName="coapplicant_mobile_no" type="text" (keypress)="keyPress($event)" required>
|
|
||||||
<mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field style="width: 50%">
|
|
||||||
<input matInput placeholder="LandLine" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
|
|
||||||
<mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Phone Number. </mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
|
|
||||||
<mat-select placeholder="Relationship" formControlName="relationship">
|
|
||||||
<mat-option *ngFor="let rel of relationShipList" [value]="rel.relationship_id" >
|
|
||||||
{{rel.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<div style="width:20%">
|
|
||||||
<span (click)="removeCoApplicant(i)">
|
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div fxLayout="row" fxLayoutWrap="wrap">
|
|
||||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
|
||||||
<mat-card class="p-2">
|
|
||||||
<h5>Co-Applicant</h5>
|
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" color="primary" matTooltip="Add Co-Applicant" matTooltipPosition="above" style="opacity: 0.8;border:2px;border-radius: 50%;" (click)="addCoApplicant()"><mat-icon>group_add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
|
||||||
<button mat-raised-button mat-button-sm color="primary" (click)="addCoApplicant()" type="button">Add More Co-Applicant</button>
|
|
||||||
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
@ -23,15 +23,18 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
PDTriggerStatus: string;
|
PDTriggerStatus: string;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
public _PDtriggerForm: FormGroup;
|
public _PDtriggerForm: FormGroup;
|
||||||
items: FormArray;
|
|
||||||
|
addresses: FormArray;
|
||||||
|
coapplicants: FormArray;
|
||||||
addtional_requirements: FormArray;
|
addtional_requirements: FormArray;
|
||||||
|
|
||||||
productList: any;
|
productList: any;
|
||||||
subProductList: any;
|
subProductList: any;
|
||||||
lenderList: any;
|
lenderList: any;
|
||||||
lenderBranchList: any;
|
lenderBranchList: any;
|
||||||
customerSegmentList: any;
|
customerSegmentList: any;
|
||||||
stateList: any;
|
stateList: any = [];
|
||||||
cityList: any;
|
cityList: any = [];
|
||||||
pdTypeList: any;
|
pdTypeList: any;
|
||||||
billingList: any;
|
billingList: any;
|
||||||
relationShipList: any;
|
relationShipList: any;
|
||||||
@ -43,6 +46,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
createWithLongContent = false;
|
createWithLongContent = false;
|
||||||
dynamicCoApplicant = [];
|
dynamicCoApplicant = [];
|
||||||
disableAfterSubmit: boolean;
|
disableAfterSubmit: boolean;
|
||||||
|
pincodeflag : any = [];
|
||||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent) {
|
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
@ -92,26 +96,21 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
applicant_stdcode: [null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
applicant_stdcode: [null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||||
applicant_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
applicant_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||||
company_name: [null],
|
company_name: [null],
|
||||||
addressline1: [null],
|
|
||||||
fk_city: [null],
|
|
||||||
fk_state: [null],
|
|
||||||
pincode: [null],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
|
||||||
other_pincode: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
|
||||||
remarks: [null],
|
remarks: [null],
|
||||||
// allocation_type: [null],
|
// allocation_type: [null],
|
||||||
// sub_allocation_type: [null],
|
// sub_allocation_type: [null],
|
||||||
items: this._fb.array([]),
|
coapplicants: this._fb.array([]),
|
||||||
|
addresses: this._fb.array([this.createAddresses()]),
|
||||||
documents: this._fb.array([]),
|
documents: this._fb.array([]),
|
||||||
addtional_requirements: this._fb.array([this.createRequiremnt()])
|
addtional_requirements: this._fb.array([this.createRequiremnt()])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** FOR Dropdowns */
|
||||||
selectedLender(lender) {
|
selectedLender(lender) {
|
||||||
// console.log(JSON.stringify(lender));
|
|
||||||
// alert(JSON.stringify(lender['branches ']));
|
|
||||||
this.lenderBranchList = lender['branches'];
|
this.lenderBranchList = lender['branches'];
|
||||||
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
|
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLenderList() {
|
getLenderList() {
|
||||||
@ -122,6 +121,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => this.errorMessage = <any>error);
|
||||||
}
|
}
|
||||||
|
|
||||||
getProductsList() {
|
getProductsList() {
|
||||||
this._pd.getProductsDetails().subscribe(
|
this._pd.getProductsDetails().subscribe(
|
||||||
data => {
|
data => {
|
||||||
@ -131,6 +131,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => this.errorMessage = <any>error);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomerSegmentList() {
|
getCustomerSegmentList() {
|
||||||
this._pd.getCustomersDetails().subscribe(
|
this._pd.getCustomersDetails().subscribe(
|
||||||
data => {
|
data => {
|
||||||
@ -139,14 +140,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => this.errorMessage = <any>error);
|
||||||
}
|
}
|
||||||
// getStateCityList(){
|
|
||||||
// this._pd.getStateCityDetails().subscribe(
|
//get State
|
||||||
// data => {
|
|
||||||
// if (data.status == 200) {
|
|
||||||
// this.stateList=data.records
|
|
||||||
// }
|
|
||||||
// }, error => this.errorMessage = <any> error);
|
|
||||||
// }
|
|
||||||
getStateCityList() {
|
getStateCityList() {
|
||||||
this._pd.getAllMasterDatas('STATE').subscribe(
|
this._pd.getAllMasterDatas('STATE').subscribe(
|
||||||
data => {
|
data => {
|
||||||
@ -155,6 +150,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//get PDType List
|
||||||
getPDTypeList() {
|
getPDTypeList() {
|
||||||
this._pd.getPDTypeDetails().subscribe(
|
this._pd.getPDTypeDetails().subscribe(
|
||||||
data => {
|
data => {
|
||||||
@ -164,31 +161,21 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => this.errorMessage = <any>error);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get sub product list based on prokduct id
|
//get sub product list based on prokduct id
|
||||||
getSubproductList(productID: string) {
|
getSubproductList(productID: string) {
|
||||||
|
|
||||||
this.subProductList = this.productList.filter(item => item.product_id == productID);
|
this.subProductList = this.productList.filter(item => item.product_id == productID);
|
||||||
this.subProductList = this.subProductList[0].subproducts;
|
this.subProductList = this.subProductList[0].subproducts;
|
||||||
this.subProductList = this.subProductList.filter(item => item.is_others == 0);
|
this.subProductList = this.subProductList.filter(item => item.is_others == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get city list details based on state id
|
|
||||||
// getCityList(stateID:string){
|
|
||||||
// console.log(this.cityList);
|
|
||||||
// this.cityList= this.stateList.filter(item => item.state_id == stateID);
|
|
||||||
// console.log(this.cityList);
|
|
||||||
// this.cityList=this.cityList[0].cities;
|
|
||||||
// console.log(this.cityList);
|
|
||||||
// }
|
|
||||||
|
|
||||||
//get city list details based on state id
|
//get city list details based on state id
|
||||||
getCityList(stateID: string) {
|
getCityList(stateID: string,index) {
|
||||||
// console.log('getCityList',stateID);
|
|
||||||
this._pd.getStateWiseCities(stateID).subscribe(data => {
|
this._pd.getStateWiseCities(stateID).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
// console.log(data);
|
this.cityList[index] = data.records.cities;
|
||||||
this.cityList = data.records.cities;
|
this.pincodeList[index] = data.records.pincode;
|
||||||
this.pincodeList = data.records.pincode;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -200,10 +187,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.relationShipList = data.records;
|
this.relationShipList = data.records;
|
||||||
|
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => this.errorMessage = <any>error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get title master
|
// get title master
|
||||||
getTitleMaster() {
|
getTitleMaster() {
|
||||||
let relation = "TITLES";
|
let relation = "TITLES";
|
||||||
@ -211,31 +198,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.titleList = data.records.filter(val => val.isactive == 1);
|
this.titleList = data.records.filter(val => val.isactive == 1);
|
||||||
// console.log(this.titleList);
|
|
||||||
// let index1 = this.titleList.map(data => data.name).indexOf("Master");
|
|
||||||
// this.titleList.splice(index1, 1);
|
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => this.errorMessage = <any>error);
|
||||||
|
|
||||||
}
|
|
||||||
createItem(): FormGroup {
|
|
||||||
return this._fb.group({
|
|
||||||
|
|
||||||
coapplicantName: [null, Validators.compose([Validators.required])],
|
|
||||||
// coapplicantTitleName: [null],
|
|
||||||
// companyName: [null],
|
|
||||||
// applicantType: 0,
|
|
||||||
// coapplicant_mobile_no: [null, Validators.compose([Validators.minLength(10), Validators.maxLength(10), Validators.required])],
|
|
||||||
// coapplicant_landline: [null, Validators.compose([Validators.minLength(12), Validators.maxLength(13)])],
|
|
||||||
// relationship: [null],
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
addCoApplicant() {
|
|
||||||
this.items = this._PDtriggerForm.get('items') as FormArray;
|
|
||||||
this.items.push(this.createItem());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** FOR Documents */
|
||||||
addMoreDocs() {
|
addMoreDocs() {
|
||||||
if (this.totalfiles.length != 0) {
|
if (this.totalfiles.length != 0) {
|
||||||
if (this.documents.value[0].doc_name != "" && ((this.lengthCheckToaddMore) === (this.totalfiles.length))) {
|
if (this.documents.value[0].doc_name != "" && ((this.lengthCheckToaddMore) === (this.totalfiles.length))) {
|
||||||
@ -259,15 +226,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
get documents(): FormArray {
|
get documents(): FormArray {
|
||||||
return this._PDtriggerForm.get('documents') as FormArray;
|
return this._PDtriggerForm.get('documents') as FormArray;
|
||||||
};
|
};
|
||||||
|
|
||||||
get pdMain() {
|
get pdMain() {
|
||||||
return this._PDtriggerForm.controls;
|
return this._PDtriggerForm.controls;
|
||||||
}
|
}
|
||||||
// get pdCoApplicant() { return this._PDtriggerForm.get('items') as FormArray; }
|
|
||||||
|
|
||||||
removeCoApplicant(i: number) {
|
|
||||||
const control = <FormArray>this._PDtriggerForm.controls['items'];
|
|
||||||
control.removeAt(i);
|
|
||||||
}
|
|
||||||
removeItem(index: number) {
|
removeItem(index: number) {
|
||||||
this.totalfiles.splice(index, 1);
|
this.totalfiles.splice(index, 1);
|
||||||
this.totalFileName.splice(index, 1);
|
this.totalFileName.splice(index, 1);
|
||||||
@ -275,6 +238,53 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this.lengthCheckToaddMore = this.lengthCheckToaddMore - 1;
|
this.lengthCheckToaddMore = this.lengthCheckToaddMore - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** FOR Coapplicant */
|
||||||
|
get pdCoApplicant() { return this._PDtriggerForm.get('coapplicants') as FormArray; }
|
||||||
|
|
||||||
|
addCoApplicant() {
|
||||||
|
this.coapplicants = this._PDtriggerForm.get('coapplicants') as FormArray;
|
||||||
|
this.coapplicants.push(this.createCoApplicant());
|
||||||
|
}
|
||||||
|
|
||||||
|
createCoApplicant(): FormGroup {
|
||||||
|
return this._fb.group({
|
||||||
|
label: ['Applicant'],
|
||||||
|
applicant_title_name:[null],
|
||||||
|
coapplicant_name: [null, Validators.compose([Validators.required])],
|
||||||
|
coapplicant_mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10),Validators.required])],
|
||||||
|
coapplicant_stdcode:[null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||||
|
coapplicant_landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])],
|
||||||
|
company_name:[null],
|
||||||
|
relationship: [null],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
removeCoApplicant(i: number) {
|
||||||
|
const control = <FormArray>this._PDtriggerForm.controls['coapplicants'];
|
||||||
|
control.removeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** FOr Adress */
|
||||||
|
get pdAddresses() { return this._PDtriggerForm.get('addresses') as FormArray; }
|
||||||
|
createAddresses(): FormGroup {
|
||||||
|
return this._fb.group({
|
||||||
|
addressline: [null],
|
||||||
|
fk_city: [null],
|
||||||
|
fk_state: [null],
|
||||||
|
pincode: [null],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||||
|
other_pincode: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
addAddresses() {
|
||||||
|
this.addresses = this._PDtriggerForm.get('addresses') as FormArray;
|
||||||
|
this.addresses.push(this.createAddresses());
|
||||||
|
}
|
||||||
|
|
||||||
|
removeAddresses(index: number) {
|
||||||
|
const address_control = <FormArray>this._PDtriggerForm.controls['addresses'];
|
||||||
|
address_control.removeAt(index);
|
||||||
|
}
|
||||||
|
|
||||||
get pdRequirements() { return this._PDtriggerForm.get('addtional_requirements') as FormArray; }
|
get pdRequirements() { return this._PDtriggerForm.get('addtional_requirements') as FormArray; }
|
||||||
createRequiremnt(): FormGroup {
|
createRequiremnt(): FormGroup {
|
||||||
return this._fb.group({
|
return this._fb.group({
|
||||||
@ -317,7 +327,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this.lengthCheckToaddMore = 1;
|
this.lengthCheckToaddMore = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getPincode(e,i){ this.pincodeflag[i] = e == 1 ? true : false;
|
||||||
|
}
|
||||||
// save pd in draft
|
// save pd in draft
|
||||||
saveDraftPD(formValue: any, status: string) {
|
saveDraftPD(formValue: any, status: string) {
|
||||||
//alert('Inside The Draft PD');
|
//alert('Inside The Draft PD');
|
||||||
@ -351,17 +362,17 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this._PDtriggerForm.controls['mobile_no'].setValidators([Validators.required]);
|
this._PDtriggerForm.controls['mobile_no'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['mobile_no'].updateValueAndValidity();
|
this._PDtriggerForm.controls['mobile_no'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['addressline1'].setValidators([Validators.required]);
|
// this._PDtriggerForm.controls['addressline1'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['addressline1'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['addressline1'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['fk_city'].setValidators([Validators.required]);
|
// this._PDtriggerForm.controls['fk_city'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['fk_city'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['fk_city'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['fk_state'].setValidators([Validators.required]);
|
// this._PDtriggerForm.controls['fk_state'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['fk_state'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['fk_state'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['pincode'].setValidators([Validators.required]);
|
// this._PDtriggerForm.controls['pincode'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['pincode'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['pincode'].updateValueAndValidity();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.clearCustomValidatorFields();
|
this.clearCustomValidatorFields();
|
||||||
}, 10000);
|
}, 10000);
|
||||||
@ -397,23 +408,28 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this._PDtriggerForm.controls['mobile_no'].clearValidators();
|
this._PDtriggerForm.controls['mobile_no'].clearValidators();
|
||||||
this._PDtriggerForm.controls['mobile_no'].updateValueAndValidity();
|
this._PDtriggerForm.controls['mobile_no'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['addressline1'].clearValidators();
|
// this._PDtriggerForm.controls['addressline1'].clearValidators();
|
||||||
this._PDtriggerForm.controls['addressline1'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['addressline1'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['fk_city'].clearValidators();
|
// this._PDtriggerForm.controls['fk_city'].clearValidators();
|
||||||
this._PDtriggerForm.controls['fk_city'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['fk_city'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['fk_state'].clearValidators();
|
// this._PDtriggerForm.controls['fk_state'].clearValidators();
|
||||||
this._PDtriggerForm.controls['fk_state'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['fk_state'].updateValueAndValidity();
|
||||||
|
|
||||||
this._PDtriggerForm.controls['pincode'].clearValidators();
|
// this._PDtriggerForm.controls['pincode'].clearValidators();
|
||||||
this._PDtriggerForm.controls['pincode'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['pincode'].updateValueAndValidity();
|
||||||
|
|
||||||
this.validateAllFormFields(this._PDtriggerForm);
|
this.validateAllFormFields(this._PDtriggerForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// common function for both draft and process pd
|
// common function for both draft and process pd
|
||||||
submitPdDetails(formValue: any, status: string) {
|
submitPdDetails(formValue: any, status: string) {
|
||||||
|
|
||||||
|
console.log('formValue',formValue);
|
||||||
|
console.log('formValue.addresses',formValue.addresses);
|
||||||
|
console.log('formValue.addresses[0].addressline',formValue.addresses[0].addressline);
|
||||||
|
|
||||||
if (this._PDtriggerForm.invalid) {
|
if (this._PDtriggerForm.invalid) {
|
||||||
this.validateAllFormFields(this._PDtriggerForm);
|
this.validateAllFormFields(this._PDtriggerForm);
|
||||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||||
@ -426,30 +442,32 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.disableAfterSubmit = true;
|
this.disableAfterSubmit = true;
|
||||||
let concat_landline
|
|
||||||
let concat_landline1
|
let lender_landline_no;
|
||||||
|
let applicant_landline_no;
|
||||||
|
|
||||||
if (formValue.lender_stdcode != null || formValue.lender_landline != null) {
|
if (formValue.lender_stdcode != null || formValue.lender_landline != null) {
|
||||||
if (formValue.lender_stdcode != '' && formValue.lender_landline != '') {
|
if (formValue.lender_stdcode != '' && formValue.lender_landline != '') {
|
||||||
concat_landline = formValue.lender_stdcode + '-' + formValue.lender_landline;
|
lender_landline_no = formValue.lender_stdcode + '-' + formValue.lender_landline;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
concat_landline = null;
|
lender_landline_no = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
concat_landline = null;
|
lender_landline_no = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (formValue.applicant_stdcode != null || formValue.applicant_landline != null) {
|
if (formValue.applicant_stdcode != null || formValue.applicant_landline != null) {
|
||||||
if (formValue.applicant_stdcode != '' && formValue.applicant_landline != '') {
|
if (formValue.applicant_stdcode != '' && formValue.applicant_landline != '') {
|
||||||
concat_landline1 = formValue.applicant_stdcode + '-' + formValue.applicant_landline;
|
applicant_landline_no = formValue.applicant_stdcode + '-' + formValue.applicant_landline;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
concat_landline1 = null;
|
applicant_landline_no = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
concat_landline1 = null;
|
applicant_landline_no = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let pd_details: any = {
|
let pd_details: any = {
|
||||||
@ -458,21 +476,23 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
"pd_branch_id": formValue.pd_branch_id,
|
"pd_branch_id": formValue.pd_branch_id,
|
||||||
"pd_contact_person": formValue.lender_contact_person,
|
"pd_contact_person": formValue.lender_contact_person,
|
||||||
"pd_contact_mobileno": formValue.lender_contact_mobile,
|
"pd_contact_mobileno": formValue.lender_contact_mobile,
|
||||||
"pd_contact_landline": concat_landline,
|
"pd_contact_landline": lender_landline_no,
|
||||||
"fk_product_id": formValue.fk_product_id,
|
"fk_product_id": formValue.fk_product_id,
|
||||||
"fk_subproduct_id": formValue.fk_subproduct_id,
|
"fk_subproduct_id": formValue.fk_subproduct_id,
|
||||||
"fk_pd_type": formValue.fk_pd_type,
|
"fk_pd_type": formValue.fk_pd_type,
|
||||||
"fk_customer_segment": formValue.fk_customer_segment,
|
"fk_customer_segment": formValue.fk_customer_segment,
|
||||||
"loan_amount": formValue.loan_amount,
|
"loan_amount": formValue.loan_amount,
|
||||||
"addressline1": formValue.addressline1.toUpperCase(),
|
"addressline1": formValue.addresses[0].addressline.toUpperCase(),
|
||||||
"fk_city": formValue.fk_city,
|
"fk_city": formValue.addresses[0].fk_city,
|
||||||
"fk_state": formValue.fk_state,
|
"fk_state": formValue.addresses[0].fk_state,
|
||||||
"pincode": formValue.pincode,
|
"pincode": formValue.addresses[0].pincode,
|
||||||
"other_pincode": formValue.other_pincode,
|
"other_pincode": formValue.addresses[0].other_pincode,
|
||||||
"remarks": formValue.remarks,
|
"remarks": formValue.remarks,
|
||||||
"pd_status": status,
|
"pd_status": status,
|
||||||
"fk_createdby": this._aws.getlocale(),
|
"fk_createdby": this._aws.getlocale(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var pd_applicant_details: any = [];
|
var pd_applicant_details: any = [];
|
||||||
if (formValue.applicant_name) {
|
if (formValue.applicant_name) {
|
||||||
pd_applicant_details.push({
|
pd_applicant_details.push({
|
||||||
@ -480,20 +500,35 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
"applicant_title_name": formValue.applicant_title_name,
|
"applicant_title_name": formValue.applicant_title_name,
|
||||||
"company_name": formValue.company_name,
|
"company_name": formValue.company_name,
|
||||||
"mobile_no": formValue.mobile_no,
|
"mobile_no": formValue.mobile_no,
|
||||||
"landline": concat_landline1,
|
"landline": applicant_landline_no,
|
||||||
"applicant_type": 1,
|
"applicant_type": 1,
|
||||||
"relation": "",
|
"relation": "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
formValue.items.forEach((itemElement, itemIndex) => {
|
formValue.coapplicants.forEach((itemElement, itemIndex) => {
|
||||||
|
|
||||||
|
let coapplicant_landline_no;
|
||||||
|
|
||||||
|
if (itemElement.coapplicant_stdcode != null || itemElement.coapplicant_landline != null) {
|
||||||
|
if (itemElement.coapplicant_stdcode != '' && itemElement.coapplicant_landline != '') {
|
||||||
|
coapplicant_landline_no = formValue.coapplicant_stdcode + '-' + itemElement.applicant_landline;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
coapplicant_landline_no = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
coapplicant_landline_no = null;
|
||||||
|
}
|
||||||
|
|
||||||
let obj1 = {
|
let obj1 = {
|
||||||
"applicant_name": itemElement.coapplicantName,
|
"applicant_name":itemElement.coapplicant_name,
|
||||||
"applicant_title_name": itemElement.applicant_title_name,
|
"applicant_title_name": itemElement.applicant_title_name,
|
||||||
"company_name": itemElement.company_name,
|
"company_name": itemElement.company_name,
|
||||||
"mobile_no": itemElement.coapplicant_mobile_no,
|
"mobile_no":itemElement.coapplicant_mobile_no,
|
||||||
"landline": itemElement.coapplicant_landline,
|
"landline": coapplicant_landline_no,
|
||||||
"applicant_type": 0,
|
"applicant_type":0,
|
||||||
"relation": "",
|
"relation": "",
|
||||||
}
|
}
|
||||||
pd_applicant_details.push(obj1)
|
pd_applicant_details.push(obj1)
|
||||||
@ -519,12 +554,28 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pd_form.append("pd_document_titles", JSON.stringify(AllFilesObj))
|
pd_form.append("pd_document_titles", JSON.stringify(AllFilesObj))
|
||||||
|
|
||||||
if (formValue.addtional_requirements.length > 0) {
|
if (formValue.addtional_requirements.length > 0) {
|
||||||
pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements))
|
pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements))
|
||||||
|
|
||||||
}
|
}
|
||||||
// console.log('pd_form',pd_form);
|
return;
|
||||||
// console.log('pd_details',pd_details);
|
// formValue.addresses.forEach((addressElement, itemIndex) => {
|
||||||
|
// let addressobj = {
|
||||||
|
// "addressline": addressElement.addressline.toUpperCase(),
|
||||||
|
// "fk_city": addressElement.fk_city,
|
||||||
|
// "fk_state": addressElement.fk_state,
|
||||||
|
// "pincode": addressElement.pincode,
|
||||||
|
// "other_pincode": addressElement.other_pincode,
|
||||||
|
// }
|
||||||
|
|
||||||
|
// });
|
||||||
|
|
||||||
|
if (formValue.addresses.length > 0) {
|
||||||
|
pd_form.append("addresses", JSON.stringify(formValue.addresses))
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('console.log(pd_form);',pd_form);
|
||||||
|
// return;
|
||||||
this._pd.addPdDetails(pd_form).subscribe(result => {
|
this._pd.addPdDetails(pd_form).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.disableAfterSubmit = false;
|
this.disableAfterSubmit = false;
|
||||||
|
|||||||
@ -172,11 +172,11 @@
|
|||||||
<i class="fa-1x fa fa-user-o" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
<i class="fa-1x fa fa-user-o" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
||||||
{{applicant.applicant_name}}
|
{{applicant.applicant_name}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="applicant.mobile_no != '' && applicant.mobile_no != null" class="mb-2 text-center hover-icon">
|
<span *ngIf="applicant.mobile_no != '' && (applicant.mobile_no != null || applicant.mobile_no != undefined) " class="mb-2 text-center hover-icon">
|
||||||
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
||||||
{{applicant.mobile_no}}
|
{{applicant.mobile_no}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="applicant.landline != '' && applicant.landline != 'null-null' && applicant.landline != null " class="mb-2 text-center hover-icon">
|
<span *ngIf="applicant.landline != '' && (applicant.landline != 'null-null'|| applicant.landline != undefined-undefined) && (applicant.landline != null || applicant.landline != undefined) " class="mb-2 text-center hover-icon">
|
||||||
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
||||||
{{applicant.landline}}
|
{{applicant.landline}}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -96,7 +96,9 @@ export class PdTrigerService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get state and city details
|
/* get state and city details
|
||||||
|
This Api OnlyFor Bussiness info Details This Will Have 'Throughout state' option
|
||||||
|
*/
|
||||||
getStateCityDetails(): Observable<any> {
|
getStateCityDetails(): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl + 'getListOfStatesCities','')
|
return this._http.post<any>(this.apiUrl + 'getListOfStatesCities','')
|
||||||
.pipe(
|
.pipe(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user