fixes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-03-27 20:29:02 +05:30
parent d5a25ea608
commit 731815229e
7 changed files with 373 additions and 359 deletions

View File

@ -20,7 +20,14 @@
</mat-card-header>
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<textarea matInput style="text-transform: uppercase" placeholder="Address" type="text" name="address" formControlName="address"></textarea>
<textarea matInput style="text-transform: uppercase;" placeholder="Address" type="text" name="address" formControlName="address" rows = "{{countRowsForTextarea(item.get('address').value)}}"></textarea>
<!-- <textarea matInput style="text-transform: uppercase" placeholder="Address" name="address" formControlName="address"
cdkTextareaAutosize
#autosize="cdkTextareaAutosize"
cdkAutosizeMinRows="2"
cdkAutosizeMaxRows="5"></textarea> -->
<!-- <mat-error *ngIf="pdforms.controls['lenAppID'].hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
</div>
@ -101,18 +108,15 @@
</mat-form-field>
</div>
<mat-form-field style="width: 100%" *ngIf="item.get('locality').value == 1">
<input matInput placeholder="Specify Locality" name="locality_others"
formControlName="locality_others" autocomplete="off">
</mat-form-field>
<mat-form-field *ngIf="item.get('locality').value == 5" style="width: 100%">
<!-- <mat-form-field *ngIf="item.get('locality').value == 5" style="width: 100%">
<input matInput placeholder="Specify the MixUse *" formControlName="locality_mixuse"
autocomplete="off">
</mat-form-field>
</mat-form-field> -->
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%;">
<mat-select placeholder="Approach to PD Location" name="pd_location" formControlName="pd_location">

View File

@ -11,4 +11,7 @@ page-pd-question-address {
.mat-card-content{
margin-bottom: 0px !important;
}
textarea {
resize: none;
}
}

View File

@ -210,7 +210,18 @@ export class PdQuestionAddressPage {
)
}
countRowsForTextarea(text){
// console.log('text.length%100',text.length%190);
// console.log('text.length/100',text.length/100);
if(text.length%100 > 5)
return 5;
else if(text.length%100 <= 3)
return 3;
else return Math.floor(text.length%100);
}
ionViewWillLeave()
{
@ -431,7 +442,7 @@ export class PdQuestionAddressPage {
console.log("pin init", this.pincodeValue[0])
if(AddressDetails != null){
return this.fb.group({
address: [AddressDetails.address, Validators.compose([Validators.required])],
address: [AddressDetails.address + 'qqqqqqqqqqqqqqqqqqqqqqqqqqqq wwwwwwwwwwwwwwwwwwwe eeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrr', Validators.compose([Validators.required])],
address_type: [AddressDetails.address_type, Validators.compose([Validators.required])],
address_type_others: [AddressDetails.address_type_others],
state: [AddressDetails.state],
@ -443,7 +454,7 @@ export class PdQuestionAddressPage {
pincode_others: [AddressDetails.pincode_others, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
locality: [AddressDetails.locality, Validators.compose([Validators.required])],
locality_others: [AddressDetails.locality_others],
locality_mixuse: [AddressDetails.locality_mixuse],
// locality_mixuse: [AddressDetails.locality_mixuse],
pd_location: [AddressDetails.pd_location, Validators.compose([Validators.required])],
comment_locality: [AddressDetails.comment_locality, Validators.compose([Validators.required])],
estimated_area: [AddressDetails.estimated_area],
@ -465,7 +476,7 @@ export class PdQuestionAddressPage {
pincode_others: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
locality: ['', Validators.compose([Validators.required])],
locality_others: [''],
locality_mixuse: [''],
// locality_mixuse: [''],
pd_location: ['', Validators.compose([Validators.required])],
comment_locality: ['', Validators.compose([Validators.required])],
estimated_area: [''],
@ -619,7 +630,7 @@ export class PdQuestionAddressPage {
'pincode_others':datas.pincode_others,
'locality': datas.locality,
'locality_others': datas.locality_others,
'locality_mixuse': datas.locality_mixuse,
// 'locality_mixuse': datas.locality_mixuse,
'pd_location': datas.pd_location,
'comment_locality': datas.comment_locality,
'estimated_area': datas.estimated_area,
@ -763,7 +774,7 @@ export class PdQuestionAddressPage {
'pincode_others': datas.other_pincode,
'locality': '',
'locality_others': '',
'locality_mixuse':'',
// 'locality_mixuse':'',
'pd_location': '',
'comment_locality': '',
'estimated_area': '',

View File

@ -45,7 +45,7 @@
</mat-accordion>
<br/>
<div *ngIf="assessedProcess">
<ion-row >
<ion-row>
<ion-col col-6 text-center>
<mat-card (click)="getViewPage(1)" class="item-ribbon" style="height: 110px;">
<span *ngIf="salesData;else noSalesData"class="ribbon cruzeiro">
@ -74,8 +74,8 @@
<h1 class="htag">PURCHASE</h1>
</mat-card>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col col-6 text-center>
<mat-card (click)="getViewPage(3)" class="item-ribbon" style="height: 110px;">
<span *ngIf="businessData;else nobusinessData"class="ribbon cruzeiro">
@ -104,8 +104,8 @@
<h1 class="htag">HOUSE HOLD</h1>
</mat-card>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<!-- <ion-col col-6 text-center>
<mat-card (click)="getViewPage(5)" class="item-ribbon" style="height: 110px;">
<span *ngIf="businessIncome;else nobusinessIncome"class="ribbon cruzeiro">

View File

@ -366,7 +366,7 @@
</ion-col>
<ion-col col-2 offset-1 *ngIf="l" >
<!-- <button float-right ion-button clear (click)="addMoreManufacturing()" ><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button><br/> -->
<button ion-button color="optblue" round (click)="addMoreManufacturing()">Add Material</button>
<button ion-button color="optblue" round (click)="addMoreManufacturing()">Add More Product</button>
</ion-col>
</ion-buttons>
@ -620,7 +620,7 @@
</ion-col>
<ion-col *ngIf="l" col-2 offset-1>
<!-- <button float-right ion-button clear (click)="addMoreRetail()" ><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button><br/> -->
<button ion-button color="optblue" round (click)="addMoreRetail()">Add Product</button>
<button ion-button color="optblue" round (click)="addMoreRetail()">Add More Product</button>
</ion-col>
</ion-buttons>
@ -868,7 +868,7 @@
</ion-col>
<ion-col *ngIf="l" col-2 offset-1>
<!-- <button float-right ion-button clear (click)="addMoreWholesale()" ><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button><br/> -->
<button ion-button color="optblue" round (click)="addMoreWholesale()">Add Product</button>
<button ion-button color="optblue" round (click)="addMoreWholesale()">Add More Product</button>
</ion-col>
</ion-buttons>
@ -1128,7 +1128,7 @@
</ion-col>
<ion-col *ngIf="l" col-2 offset-1>
<!-- <button float-right ion-button clear (click)="addMoreServiceprovider()" ><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button><br/> -->
<button ion-button color="optblue" round (click)="addMoreServiceprovider()">Add Services</button>
<button ion-button color="optblue" round (click)="addMoreServiceprovider()">Add More Services</button>
</ion-col>
</ion-buttons>

View File

@ -6,370 +6,364 @@
</button>
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<form [formGroup]="generalForm">
<mat-card style="padding: 0px 10px !important;">
<h6 padding>Name of Person(s) Met and Individual Loan Applicant(s)</h6>
<ion-list formArrayName="list_value">
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.list_value['controls']; let i=index">
<ion-item>
<ion-label>
<h2 style="font-size: 18px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
<p>Age : {{item.get('age').value}}&nbsp;&nbsp;<ion-icon name="school">
</ion-icon> {{item.get('qualification_name').value}}</p>
<p *ngIf="item.get('course_name').value != ''"><ion-icon name="copy"></ion-icon>&nbsp; {{item.get('course_name').value | titlecase}}</p>
</ion-label>
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)"><ion-icon name="md-create"></ion-icon></button>
</ion-item>
<ion-item-options side="right">
<ion-list>
<ion-row >
<ion-col color="primary">
<p style="font-size: 11px !important;">Person</p>
<ion-checkbox color="dark" formControlName="is_person_met"></ion-checkbox>
</ion-col>
<ion-col color="primary">
<p style="font-size: 12px !important;">Applicant</p>
<ion-checkbox color="dark" formControlName="is_applicant"></ion-checkbox>
</ion-col>
</ion-row>
</ion-list>
<button ion-button color="danger" (click)="removeList(i,1)">
<ion-icon name="trash"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
<hr>
<mat-card-content>
<ion-row>
<ion-col end>
<div class="btn">
<button *ngIf="!buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)"> <ion-icon name="person-add"></ion-icon></button>
<button *ngIf="buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)">Close &nbsp;&nbsp;<ion-icon name="md-close"></ion-icon></button>
</div>
</ion-col>
</ion-row>
<div *ngIf="buttonClick" >
<mat-card-header>
<mat-card-title *ngIf="addIndi">Add Name of Person(s) Met and Individual Loan Applicant(s)</mat-card-title>
<mat-card-title *ngIf="!addIndi">Update Name of Person(s) Met and Individual Loan Applicant(s)</mat-card-title>
</mat-card-header>
<!--Individual Value add Field-->
<div formArrayName="individuals">
<div [formGroupName]="i" *ngFor="let indi of generalForm.controls.individuals['controls']; let i=index">
<mat-form-field style="width:100%">
<mat-card style="padding: 0px 10px !important;">
<h6 padding>Name of Person(s) Met and Individual Loan Applicant(s)</h6>
<ion-list formArrayName="list_value">
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.list_value['controls']; let i=index">
<ion-item>
<ion-label>
<h2 style="font-size: 18px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
<p>Age : {{item.get('age').value}}&nbsp;&nbsp;<ion-icon name="school">
</ion-icon> {{item.get('qualification_name').value}}</p>
<p *ngIf="item.get('course_name').value != ''">
<ion-icon name="copy"></ion-icon>&nbsp; {{item.get('course_name').value | titlecase}}
</p>
</ion-label>
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)">
<ion-icon name="md-create"></ion-icon>
</button>
</ion-item>
<ion-item-options side="right">
<ion-list>
<ion-row>
<ion-col color="primary">
<p style="font-size: 11px !important;">Person</p>
<ion-checkbox color="dark" formControlName="is_person_met"></ion-checkbox>
</ion-col>
<ion-col color="primary">
<p style="font-size: 12px !important;">Applicant</p>
<ion-checkbox color="dark" formControlName="is_applicant"></ion-checkbox>
</ion-col>
</ion-row>
</ion-list>
<button ion-button color="danger" (click)="removeList(i,1)">
<ion-icon name="trash"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
<hr>
<mat-card-content>
<ion-row>
<ion-col end>
<div class="btn">
<button *ngIf="!buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)">
<ion-icon name="person-add"></ion-icon>
</button>
<button *ngIf="buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)">Close
&nbsp;&nbsp;<ion-icon name="md-close"></ion-icon></button>
</div>
</ion-col>
</ion-row>
<div *ngIf="buttonClick">
<mat-card-header>
<mat-card-title *ngIf="addIndi">Add Name of Person(s) Met and Individual Loan Applicant(s)</mat-card-title>
<mat-card-title *ngIf="!addIndi">Update Name of Person(s) Met and Individual Loan Applicant(s)</mat-card-title>
</mat-card-header>
<!--Individual Value add Field-->
<div formArrayName="individuals">
<div [formGroupName]="i" *ngFor="let indi of generalForm.controls.individuals['controls']; let i=index">
<mat-form-field style="width:100%">
<mat-select placeholder="Title" formControlName="applicant_title_name">
<mat-option>Select</mat-option>
<mat-option>Select</mat-option>
<mat-option *ngFor="let t1 of titleList" [value]="t1.title_id">{{t1.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput type="text" placeholder="Name of the Person" formControlName="applicant_name">
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['applicant_name'].errors?.required || indi.controls['applicant_name'].touched">Name is Required</mat-error>
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput type="number" placeholder="Person Age" formControlName="age">
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['age'].errors?.required || indi.controls['age'].touched">Age is Required</mat-error>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select placeholder="Qualification" formControlName="qualification" >
<mat-option>Select</mat-option>
<mat-option [value]="qu.qualification_id" *ngFor="let qu of qualificationList">{{qu.qualification_name}}</mat-option>
</mat-select>
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['qualification'].errors?.required || indi.controls['qualification'].touched">Qualification is Required</mat-error>
</mat-form-field>
<!-- {{indi.get('qualification').value}} -->
<div *ngIf="indi.get('qualification').value !== ''">
<mat-form-field style="width:100%" *ngIf="indi.get('qualification').value != '4' && indi.get('qualification').value != '6'">
<input matInput placeholder="Qualification Details" formControlName="course_name">
</mat-form-field>
</div>
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_person_met">Is Person Met</mat-checkbox><br/> <br/>
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
<ion-row>
<ion-col end>
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="delete(1)">Add</button>
<button *ngIf="!addIndi" float-right ion-button color="optblue" (click)="update(1)">Update</button>
</ion-col>
</ion-row>
</div>
</div>
<!-- <span float-right ion-button large color="optblue" icon-left clear (click)="add()"><ion-icon name="md-add"></ion-icon></span>-->
</div>
</mat-card-content>
</mat-card>
<!-- <mat-card>
<mat-card-title>Name of Person Met</mat-card-title>
<div formArrayName="applicant_list">
<mat-list *ngFor="let applicant of generalForm.controls.applicant_list['controls']; let c = index;" [formGroupName]="c">
<mat-checkbox class="example-margin" color="primary" formControlName="exist_status" (change)="coapplicantChange($event, c, applicant.controls)">{{applicant.controls.applicant_name.value}}</mat-checkbox>
</mat-list>
</div>
</mat-card>-->
<!--<ion-list>
<ion-item>
<ion-grid item-content>
<h5>1</h5>
<ion-row>
<ion-col>
<h4 class="p_name"> Hai skdjfkjdsfkjdsf kjdsf</h4>
<h5 class="p_age">dsf</h5>
<h5 class="p_qual">dsf</h5>
</ion-col>
<ion-col text-right width-10>
<ion-row>
<ion-item>
<ion-label></ion-label>
<ion-toggle></ion-toggle>
</ion-item>
<ion-item>
<ion-label>Person Met</ion-label>
<ion-toggle></ion-toggle>
</ion-item>
</ion-row>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
</ion-list>
-->
</mat-form-field>
<!--Individual Value Display Field-->
<mat-card *ngIf="customer_segment_abbr == 'SE-RI'">
<mat-card-title><h6>Number of Years for which rental income is being received</h6></mat-card-title>
<mat-form-field style="width: 100%;">
<input matInput placeholder="Year" formControlName="rental_income_rcv_in_years"
autocomplete="off" OnlyNumber type="text" required>
<mat-error style="font-size: 12px">Please Enter Correct Year</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%;">
<input matInput type="text" placeholder="Month" formControlName="rental_income_rcv_in_month"
autocomplete="off" OnlyNumber type="text" (change)="ConvertMonthintoYearforBusiness($event.target.value,'',2)">
</mat-form-field>
</mat-card>
<!--Company Value Display Field-->
<mat-card style="padding: 0px 10px !important;" *ngIf="customer_segment_abbr != 'SE-RI'">
<h6 padding> Company/Firm </h6>
<div formArrayName="company_value">
<ion-list>
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.company_value['controls']; let i=index">
<ion-item>
<!--<ion-label>{{i+1}}</ion-label>-->
<ion-label>
<h2 h2 style="font-size: 18px !important;">{{item.get('company_name').value | titlecase}}</h2>
<p style="font-size: 14px;"> <span *ngIf="item.get('business_entity_type').value != 1">{{item.get('business_entity_type_name').value}}</span><span *ngIf="item.get('business_entity_type').value == 1">{{item.get('business_entity_type_other').value+"-Others"}}</span></p>
<p style="font-size: 14px;"><ion-icon name="md-calendar"></ion-icon>&nbsp; <span *ngIf="item.get('business_years').value != '' && item.get('business_years').value != 0">{{item.get('business_years').value}} Years</span> <span *ngIf="item.get('business_month').value != ''&& item.get('business_month').value != 0">{{item.get('business_month').value}} Months</span></p>
</ion-label>
<!-- <ion-toggle item-end class="applicant_t" formControlName="is_company_applicant"></ion-toggle>
<button align="end" ion-button clear item-end small color="optblue" (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></button> -->
<!-- <span float-right ion-button small color="optblue" clear (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></span>-->
<button ion-button align="end" item-end small clear (click)="editCompanies(i)"><ion-icon name="md-create"></ion-icon></button>
</ion-item>
<ion-item-options slide="right">
<ion-list>
<ion-row >
<ion-col color="primary">
<p style="font-size: 11px !important;text-align: center">Company Applicant</p>
<ion-checkbox color="dark" formControlName="is_company_applicant"></ion-checkbox>
</ion-col>
</ion-row>
</ion-list>
<button ion-button color="danger" (click)="removeList(i,2)">
<ion-icon name="trash"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
</div>
<mat-form-field style="width:100%">
<input matInput type="text" placeholder="Name of the Person" formControlName="applicant_name">
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['applicant_name'].errors?.required || indi.controls['applicant_name'].touched">Name
is Required</mat-error>
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput type="number" placeholder="Person Age" formControlName="age">
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['age'].errors?.required || indi.controls['age'].touched">Age
is Required</mat-error>
</mat-form-field>
<!--Company Value add Field-->
<mat-card-content>
<ion-row>
<ion-col end>
<div class="btn1">
<button *ngIf="!h_companies" float-right ion-button large color="optblue" icon-left clear (click)="addRec(2)"><ion-icon name="add"></ion-icon></button>
<button *ngIf="h_companies" float-right ion-button large color="optblue" icon-left clear (click)="addRec(2)">Close &nbsp;&nbsp;<ion-icon name="md-close"></ion-icon></button>
</div>
</ion-col>
</ion-row>
<div *ngIf="h_companies">
<mat-card-header>
<mat-card-title> Add Company/Firm</mat-card-title>
</mat-card-header>
<div formArrayName="companies" #comp>
<div *ngFor="let cmp of generalForm.controls.companies['controls']; let i=index" [formGroupName]="i">
<mat-form-field style="width:100%">
<mat-label color="primary" stacked>Company / Firm</mat-label>
<input matInput type="text" formControlName="company_name" required>
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['company_name'].errors?.required || cmp.controls['company_name'].touched">Company Name is Required</mat-error>
</mat-form-field>
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant">Is Applicant</mat-checkbox><br/>
<br/>
<mat-form-field style="width:100%">
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type" required>
<mat-form-field style="width:100%">
<mat-select placeholder="Qualification" formControlName="qualification">
<mat-option>Select</mat-option>
<mat-option *ngFor="let business of businessEntityTypeList" [value]="business.business_entity_type_id">
{{business.business_entity_type_name}}
</mat-option>
</mat-select>
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['business_entity_type'].errors?.required || cmp.controls['business_entity_type'].touched">Business Entity Required</mat-error>
</mat-form-field>
<mat-form-field style="width:100%" *ngIf="cmp.value.business_entity_type==1">
<input matInput type="text" placeholder="Please Specity Others" formControlName="business_entity_type_other">
</mat-form-field>
<p>Number of Years For Which The Business Has Been Running</p>
<mat-form-field style="width:100%">
<input matInput type="number" placeholder="Year" formControlName="business_years" autocomplete="off">
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput type="number" placeholder="Month" formControlName="business_month" autocomplete="off" (change)="ConvertMonthintoYearforBusiness($event.target.value,i,1)" >
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput [max]="maxDate" type="date" [matDatepicker]="picker" placeholder="Enter Date of Formation, If Available" placeholder="Enter Date of Formation, If Available" formControlName="business_date_object" (dateChange)="getDateObjects($event.target.value,i)">
</mat-form-field>
<ion-row>
<ion-col end>
<button *ngIf="addComp" ion-button float-right color="optblue" (click)="delete(2)">Add</button>
<button *ngIf="!addComp" float-right ion-button color="optblue" (click)="update(2)">Update</button>
</ion-col>
</ion-row>
<mat-option [value]="qu.qualification_id" *ngFor="let qu of qualificationList">{{qu.qualification_name}}</mat-option>
</mat-select>
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['qualification'].errors?.required || indi.controls['qualification'].touched">Qualification
is Required</mat-error>
</mat-form-field>
<div *ngIf="indi.get('qualification').value !== ''">
<mat-form-field style="width:100%" *ngIf="indi.get('qualification').value != '4' && indi.get('qualification').value != '6'">
<input matInput placeholder="Qualification Details" formControlName="course_name">
</mat-form-field>
</div>
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_person_met">Is Person Met</mat-checkbox><br />
<br />
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
<ion-row>
<ion-col end>
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="delete(1)">Add</button>
<button *ngIf="!addIndi" float-right ion-button color="optblue" (click)="update(1)">Update</button>
</ion-col>
</ion-row>
</div>
</div>
</div>
</div>
</mat-card-content>
</mat-card>
<!-- companies end -->
<!-- {{generalForm.controls.persons_with_relationships.length}} -->
<!-- Person Relationship Starts Here -->
<div *ngIf="generalForm.controls.persons_with_relationships.length > 1">
<mat-card formArrayName="persons_with_relationships" class="rbi">
<mat-card-header>
<mat-card-title style="font-size:16px;font-weight:bold"> Relationship Between Individuals</mat-card-title>
</mat-card-header>
<div *ngFor="let relation of generalForm.controls.persons_with_relationships['controls']; let i=index" [formGroupName]="i">
<!-- <span float-right ion-button large color="optblue" icon-left clear (click)="add()"><ion-icon name="md-add"></ion-icon></span>-->
</div>
</mat-card-content>
</mat-card>
<!--Individual Value Display Field-->
<mat-card *ngIf="customer_segment_abbr == 'SE-RI'">
<mat-card-title>
<h6>Number of Years for which rental income is being received</h6>
</mat-card-title>
<mat-form-field style="width: 100%;">
<input matInput placeholder="Year" formControlName="rental_income_rcv_in_years" autocomplete="off" OnlyNumber
type="text" required>
<mat-error style="font-size: 12px">Please Enter Correct Year</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%;">
<input matInput type="text" placeholder="Month" formControlName="rental_income_rcv_in_month" autocomplete="off"
OnlyNumber type="text" (change)="ConvertMonthintoYearforBusiness($event.target.value,'',2)">
</mat-form-field>
</mat-card>
<!--Company Value Display Field-->
<mat-card style="padding: 0px 10px !important;" *ngIf="customer_segment_abbr != 'SE-RI'">
<h6 padding> Company/Firm </h6>
<div formArrayName="company_value">
<ion-list>
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.company_value['controls']; let i=index">
<ion-item>
<!--<ion-label>{{i+1}}</ion-label>-->
<ion-label>
<h2 h2 style="font-size: 18px !important;">{{item.get('company_name').value | titlecase}}</h2>
<p style="font-size: 14px;"> <span *ngIf="item.get('business_entity_type').value != 1">{{item.get('business_entity_type_name').value}}</span><span
*ngIf="item.get('business_entity_type').value == 1">{{item.get('business_entity_type_other').value+"-Others"}}</span></p>
<p style="font-size: 14px;">
<ion-icon name="md-calendar"></ion-icon>&nbsp; <span *ngIf="item.get('business_years').value != '' && item.get('business_years').value != 0">{{item.get('business_years').value}}
Years</span> <span *ngIf="item.get('business_month').value != ''&& item.get('business_month').value != 0">{{item.get('business_month').value}}
Months</span>
</p>
</ion-label>
<!-- <ion-toggle item-end class="applicant_t" formControlName="is_company_applicant"></ion-toggle>
<button align="end" ion-button clear item-end small color="optblue" (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></button> -->
<!-- <span float-right ion-button small color="optblue" clear (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></span>-->
<button ion-button align="end" item-end small clear (click)="editCompanies(i)">
<ion-icon name="md-create"></ion-icon>
</button>
</ion-item>
<ion-item-options slide="right">
<ion-list>
<ion-row>
<ion-col color="primary">
<p style="font-size: 11px !important;text-align: center">Company Applicant</p>
<ion-checkbox color="dark" formControlName="is_company_applicant"></ion-checkbox>
</ion-col>
</ion-row>
</ion-list>
<button ion-button color="danger" (click)="removeList(i,2)">
<ion-icon name="trash"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
</div>
<!--Company Value add Field-->
<mat-card-content>
<ion-row>
<ion-col end>
<div class="btn1">
<button *ngIf="!h_companies" float-right ion-button large color="optblue" icon-left clear (click)="addRec(2)">
<ion-icon name="add"></ion-icon>
</button>
<button *ngIf="h_companies" float-right ion-button large color="optblue" icon-left clear (click)="addRec(2)">Close
&nbsp;&nbsp;<ion-icon name="md-close"></ion-icon></button>
</div>
</ion-col>
</ion-row>
<div *ngIf="h_companies">
<mat-card-header>
<mat-card-title> Add Company/Firm</mat-card-title>
</mat-card-header>
<div formArrayName="companies" #comp>
<div *ngFor="let cmp of generalForm.controls.companies['controls']; let i=index" [formGroupName]="i">
<mat-form-field style="width:100%">
<mat-label color="primary" stacked>Company / Firm</mat-label>
<input matInput type="text" formControlName="company_name" required>
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['company_name'].errors?.required || cmp.controls['company_name'].touched">Company
Name is Required</mat-error>
</mat-form-field>
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant">Is
Applicant</mat-checkbox><br />
<br />
<mat-form-field style="width:100%">
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type" required>
<mat-option>Select</mat-option>
<mat-option *ngFor="let business of businessEntityTypeList" [value]="business.business_entity_type_id">
{{business.business_entity_type_name}}
</mat-option>
</mat-select>
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['business_entity_type'].errors?.required || cmp.controls['business_entity_type'].touched">Business
Entity Required</mat-error>
</mat-form-field>
<mat-form-field style="width:100%" *ngIf="cmp.value.business_entity_type==1">
<input matInput type="text" placeholder="Please Specity Others" formControlName="business_entity_type_other">
</mat-form-field>
<p>Number of Years For Which The Business Has Been Running</p>
<mat-form-field style="width:100%">
<input matInput type="number" placeholder="Year" formControlName="business_years" autocomplete="off">
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput type="number" placeholder="Month" formControlName="business_month" autocomplete="off"
(change)="ConvertMonthintoYearforBusiness($event.target.value,i,1)">
</mat-form-field>
<mat-form-field style="width:100%">
<input matInput [max]="maxDate" type="date" [matDatepicker]="picker" placeholder="Enter Date of Formation, If Available"
placeholder="Enter Date of Formation, If Available" formControlName="business_date_object"
(dateChange)="getDateObjects($event.target.value,i)">
</mat-form-field>
<ion-row>
<ion-col end>
<button *ngIf="addComp" ion-button float-right color="optblue" (click)="delete(2)">Add</button>
<button *ngIf="!addComp" float-right ion-button color="optblue" (click)="update(2)">Update</button>
</ion-col>
</ion-row>
</div>
</div>
</div>
</mat-card-content>
</mat-card>
<!-- companies end -->
<!-- {{generalForm.controls.persons_with_relationships.length}} -->
<!-- Person Relationship Starts Here -->
<div *ngIf="generalForm.controls.persons_with_relationships.length > 1">
<mat-card formArrayName="persons_with_relationships" class="rbi">
<mat-card-header>
<mat-card-title style="font-size:16px;font-weight:bold"> Relationship Between Individuals</mat-card-title>
</mat-card-header>
<div *ngFor="let relation of generalForm.controls.persons_with_relationships['controls']; let i=index"
[formGroupName]="i">
<mat-card-content>
<h6>Applicant {{i+1}}</h6>
<h6>Applicant {{i+1}}</h6>
<mat-form-field style="width:100%">
<mat-select formControlName="applicant_name" placeholder="Applicant">
<mat-option>Select</mat-option>
<mat-option *ngFor="let name of fulldata" [value]="name.applicant_name">{{name.applicant_name | titlecase}}</mat-option>
<mat-option>Select</mat-option>
<mat-option *ngFor="let name of fulldata" [value]="name.applicant_name">{{name.applicant_name |
titlecase}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select formControlName="relationship" placeholder="Relation">
<mat-option>Select</mat-option>
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name + ' Of' | titlecase}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%" >
<mat-select placeholder="RelationTo" formControlName="relation_to">
<mat-select formControlName="relationship" placeholder="Relation">
<mat-option>Select</mat-option>
<mat-option [value]="rel.pd_co_applicant_id" *ngFor="let rel of individualsList ">{{rel.applicant_name | titlecase}}</mat-option>
<mat-option value="0">Not Applicable</mat-option>
</mat-select>
</mat-form-field>
</mat-card-content>
</div>
</mat-card>
</div>
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
<div formArrayName="company_with_relationships">
<mat-card-header>
<mat-card-title style="font-size:16px;font-weight:bold"> Relationship of Individuals to Company / Firm</mat-card-title>
</mat-card-header>
<div *ngFor="let cmprel of generalForm.controls.company_with_relationships['controls']; let i=index" [formGroupName]="i">
<h6>Applicant {{i+1}}</h6>
<mat-form-field style="width:100%">
<mat-select formControlName="applicant_name" placeholder="Applicant Name">
<mat-option>Select</mat-option>
<mat-option *ngFor="let name of individualsListBothCase" [value]="name.pd_co_applicant_id">{{name.applicant_name | titlecase}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select formControlName="company_relationship" placeholder="Company Relation">
<mat-option>Select</mat-option>
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
{{comrelShip.name | titlecase}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select formControlName="relation_to_company" placeholder="Relation to">
<mat-option>Select</mat-option>
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">{{comp.company_name | titlecase}}</mat-option>
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name + '
Of' | titlecase}}</mat-option>
<mat-option value="0"> Not Applicable </mat-option>
</mat-select>
</mat-form-field>
<span float-right ion-button small color="optblue" clear (click)="removeList(i,'companyrel')"><ion-icon style="font-size: 24px" name="md-trash"></ion-icon></span>
</div>
<br/><br/>
<ion-row>
<ion-col end>
<button mat-raised-button style="background-color:#e00201 !important;color:white" (click)="initCompanyRelationShip('')">Add More Company Relation</button>
</ion-col>
</ion-row>
<mat-form-field style="width:100%">
<mat-select placeholder="RelationTo" formControlName="relation_to">
<mat-option>Select</mat-option>
<mat-option [value]="rel.pd_co_applicant_id" *ngFor="let rel of individualsList ">{{rel.applicant_name
| titlecase}}</mat-option>
<mat-option value="0"> Not Applicable </mat-option>
</mat-select>
</mat-form-field>
</mat-card-content>
</div>
</mat-card>
</div>
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
<div formArrayName="company_with_relationships">
<mat-card-header>
<mat-card-title style="font-size:16px;font-weight:bold"> Relationship of Individuals to Company / Firm</mat-card-title>
</mat-card-header>
<div *ngFor="let cmprel of generalForm.controls.company_with_relationships['controls']; let i=index"
[formGroupName]="i">
<h6>Applicant {{i+1}}</h6>
<mat-form-field style="width:100%">
<mat-select formControlName="applicant_name" placeholder="Applicant Name">
<mat-option>Select</mat-option>
<mat-option *ngFor="let name of individualsListBothCase" [value]="name.pd_co_applicant_id">{{name.applicant_name
| titlecase}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select formControlName="company_relationship" placeholder="Company Relation">
<mat-option>Select</mat-option>
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
{{comrelShip.name | titlecase}}
</mat-option>
<mat-option value="0"> Not Applicable </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select formControlName="relation_to_company" placeholder="Relation to">
<mat-option>Select</mat-option>
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">{{comp.company_name |
titlecase}}</mat-option>
<mat-option value="0"> Not Applicable </mat-option>
</mat-select>
</mat-form-field>
<span float-right ion-button small color="optblue" clear (click)="removeList(i,'companyrel')">
<ion-icon style="font-size: 24px" name="md-trash"></ion-icon>
</span>
</div>
<br /><br />
<ion-row>
<ion-col style="text-align: center;">
<button mat-raised-button style="background-color:#e00201 !important;color:white" (click)="initCompanyRelationShip('')">Add
More Company Relation</button>
</ion-col>
</ion-row>
</div>
</mat-card>
<mat-card>
<mat-form-field style="width:100%">
<textarea #remark focus="true" matInput placeholder="Remarks" formControlName="general_remark" name="general_remark"></textarea>
</mat-form-field>
</mat-card>
<ion-row>
</mat-form-field>
</mat-card>
<ion-row>
<!-- <ion-buttons >
<ion-button color="optblue" full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
<!-- </ion-buttons> -->
</ion-row>
</form>
<!-- </ion-buttons> -->
<!--Old Data
</ion-row>
</form>
<!--Old Data
<mat-card>
<div formArrayName="applicant_relation">
<div *ngFor="let relation of generalForm.controls.applicant_relation['controls']; let r = index;" [formGroupName]="r">
@ -420,7 +414,8 @@
</div>
</div>
</mat-card>-->
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitData(generalForm.value)"> Save</button>
</ion-footer>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitData(generalForm.value)"> Save</button>
</ion-footer>

View File

@ -76,6 +76,7 @@ export class PdQuestionLoansPage {
this.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails');
this.applicants = this.pdDetails.applicat_details
this.applicants = this.applicants.filter(appt => appt.applicant_type != 2);
this.productAbbr = this.pdDetails.product_abbr;
this.users = this.aws.getlocale();
this.pdid=this.pdDetails.pd_id;