Changes : ps
This commit is contained in:
parent
dd72bec247
commit
46f7cba39f
@ -113,10 +113,10 @@
|
|||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<label>How long has business been operated from this premise?</label>
|
<label>How long has business been operated from this premise?</label>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years">
|
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years" (keypress)="keyPress($event)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear($event.target.value)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
|
|||||||
@ -507,4 +507,13 @@ export class AddressComponent implements OnInit {
|
|||||||
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/** On Key Press Event For Numbers */
|
||||||
|
keyPress(event: any) {
|
||||||
|
const pattern = /[0-9]/;
|
||||||
|
|
||||||
|
let inputChar = String.fromCharCode(event.charCode);
|
||||||
|
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -95,16 +95,13 @@
|
|||||||
</mat-panel-title>
|
</mat-panel-title>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Applicant Name"
|
<mat-select placeholder="Applicant Name" formControlName="applicant_name" required (selectionChange)="selectedBorrower($event.value,i)">
|
||||||
formControlName="applicant_name" required>
|
|
||||||
|
|
||||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="itemrow.get('applicant_name').value == 0">
|
<!-- <mat-form-field *ngIf="itemrow.get('applicant_name').value == 0"> -->
|
||||||
<input matInput placeholder="Specify Other Applicant"
|
<mat-form-field *ngIf="this.OtherFlag[i]">
|
||||||
formControlName="other_applicant" autocomplete="off">
|
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<!-- <mat-form-field>
|
<!-- <mat-form-field>
|
||||||
@ -121,13 +118,13 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 3">
|
<mat-form-field *ngIf="itemrow.get('bank_name').value == 3">
|
||||||
<input matInput placeholder="Specify Other Bank Name"
|
<input matInput placeholder="Specify Bank Name"
|
||||||
formControlName="other_bank" autocomplete="off">
|
formControlName="other_bank" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select (selectionChange)="selectedAccTypeChanges($event)" placeholder="Account Type" formControlName="account_type" required >
|
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)" placeholder="Account Type" formControlName="account_type" required >
|
||||||
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
|
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!--<mat-select placeholder="Account Type"
|
<!--<mat-select placeholder="Account Type"
|
||||||
@ -140,7 +137,16 @@
|
|||||||
</mat-select>-->
|
</mat-select>-->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="salaryField">
|
<mat-form-field *ngIf="pd_cus_segment!='SAL'">
|
||||||
|
<mat-select placeholder="Is this the main business account"
|
||||||
|
formControlName="is_main" required>
|
||||||
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
|
<mat-option value="No">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
|
<mat-form-field style="width: 35%;" *ngIf="salaryField">
|
||||||
<mat-select placeholder="Salary Credited in this account"
|
<mat-select placeholder="Salary Credited in this account"
|
||||||
formControlName="salary" required>
|
formControlName="salary" required>
|
||||||
<mat-option value="Yes">Yes</mat-option>
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
@ -149,30 +155,25 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="itemrow.get('account_type').value != 2">
|
<mat-form-field style="width: 35%;" *ngIf="this.limitCaseFlag[i]"> <!-- *ngIf="itemrow.get('account_type').value != 2"> -->
|
||||||
<input matInput placeholder="Limit in case of OD / CC account"
|
<input matInput autocomplete="off" placeholder="Limit in case of OD / CC account"
|
||||||
formControlName="limit" (keypress)="keyPress($event)" required autocomplete="off">
|
formControlName="limit" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)">
|
||||||
</mat-form-field>
|
<mat-hint align="start" style="font-size:70%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||||
<mat-form-field *ngIf="pd_cus_segment!='SAL'">
|
|
||||||
<mat-select placeholder="Is this the main business account"
|
|
||||||
formControlName="is_main" required>
|
|
||||||
<mat-option value="Yes">Yes</mat-option>
|
|
||||||
<mat-option value="No">No</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
<!-- <mat-form-field>
|
<!-- <mat-form-field>
|
||||||
<input matInput placeholder="Approximate Vintage"
|
<input matInput placeholder="Approximate Vintage"
|
||||||
formControlName="vintage" required>
|
formControlName="vintage" required>
|
||||||
</mat-form-field> -->
|
</mat-form-field>-->
|
||||||
<div>
|
<div>
|
||||||
<label>Number of Years / Months since account was started</label>
|
<label>Number of Years / Months since account was started</label>
|
||||||
<br>
|
<br>
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="number" placeholder="Year(s)" formControlName="vintage_year" required min='0' (keypress)="keyPress($event)" autocomplete="off">
|
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="vintage_year" required (keypress)="keyPress($event)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="number" placeholder="Month(s)" formControlName="vintage_month" required min='0' max='11'(keypress)="keyPress($event)" autocomplete="off">
|
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="vintage_month" required (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -38,6 +38,10 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
m_accountType= [];
|
m_accountType= [];
|
||||||
m_btLenderList = [];
|
m_btLenderList = [];
|
||||||
salaryField : boolean;
|
salaryField : boolean;
|
||||||
|
OtherFlag : any = [];
|
||||||
|
limitCaseFlag : any = [];
|
||||||
|
amtInwords : any = [];
|
||||||
|
emiAmtInwords : any = [];
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -99,7 +103,12 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
if (result.length == 0) {
|
if (result.length == 0) {
|
||||||
control.push(this.createBankarray());
|
control.push(this.createBankarray());
|
||||||
} else {
|
} else {
|
||||||
result.forEach(datas => {
|
result.forEach((datas,index) => {
|
||||||
|
this.amtInwords[index] = this._pd.convertNumberToWords(datas.limit);
|
||||||
|
this. selectedBorrower(datas.applicant_name,index);
|
||||||
|
this.selectedAccTypeChanges(datas.account_type,index)
|
||||||
|
|
||||||
|
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||||
control.push(this.createBankarray());
|
control.push(this.createBankarray());
|
||||||
});
|
});
|
||||||
this.bankingForm.controls.itemRows.setValue(result);
|
this.bankingForm.controls.itemRows.setValue(result);
|
||||||
@ -210,31 +219,58 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedAccTypeChanges(event: any){
|
selectedBorrower(e,i){
|
||||||
// console.log('First Time',event);
|
if(e == 0){
|
||||||
// console.log('First Time Value',event.value);
|
this.OtherFlag[i] = true;
|
||||||
if(event.value == 2) {
|
}
|
||||||
|
else{
|
||||||
|
this.OtherFlag[i] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedAccTypeChanges(event: any,i){
|
||||||
|
|
||||||
|
if(event == 2 || event == 1) {
|
||||||
|
this.limitCaseFlag[i] = false;
|
||||||
|
|
||||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
// console.log('Inside If Condition');
|
|
||||||
// console.log(control);
|
|
||||||
// console.log(control.controls);
|
|
||||||
|
|
||||||
control.controls[0].get('limit').clearValidators();
|
control.controls[0].get('limit').clearValidators();
|
||||||
control.controls[0].get('limit').updateValueAndValidity();
|
control.controls[0].get('limit').updateValueAndValidity();
|
||||||
|
|
||||||
//this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
|
|
||||||
// this.bankingForm.controls['itemRows'].
|
|
||||||
// this.bankingForm.controls.get('limit').clearValidators();
|
|
||||||
// this.bankingForm.controls.itemRows['controls'].get('limit').updateValueAndValidity();
|
|
||||||
// const control = <FormArray>this.bankingForm.controls['itemRows'];
|
|
||||||
// console.log(control.controls['limit'].value);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//alert('sd');
|
this.limitCaseFlag[i] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/** To Convert Month into Year */
|
||||||
|
ConvertMonthintoYear(itemrow,e){
|
||||||
|
//console.log(itemrow);
|
||||||
|
|
||||||
|
let year = itemrow.controls.vintage_year.value;
|
||||||
|
|
||||||
|
let converted_month : number = e%12;
|
||||||
|
let converted_year : number = e/12;
|
||||||
|
|
||||||
|
itemrow.controls.vintage_year.setValue(+year + +Math.floor(converted_year));
|
||||||
|
itemrow.controls.vintage_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Amount InWords */
|
||||||
|
inWords(e,i,flag){
|
||||||
|
switch(flag){
|
||||||
|
case 1 :
|
||||||
|
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||||
|
break;
|
||||||
|
case 2 :
|
||||||
|
this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** On Key Press Event For Numbers */
|
/** On Key Press Event For Numbers */
|
||||||
keyPress(event: any) {
|
keyPress(event: any) {
|
||||||
|
|||||||
@ -56,16 +56,15 @@
|
|||||||
<mat-card-content formArrayName="referencecheck_list" *ngIf="_neighbourhoodForm.controls.check_type.value==1">
|
<mat-card-content formArrayName="referencecheck_list" *ngIf="_neighbourhoodForm.controls.check_type.value==1">
|
||||||
<mat-card *ngFor="let reference of _neighbourhoodForm.controls.referencecheck_list['controls']; let r = index;" [formGroupName]="r">
|
<mat-card *ngFor="let reference of _neighbourhoodForm.controls.referencecheck_list['controls']; let r = index;" [formGroupName]="r">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 25%">
|
||||||
<input matInput autocomplete="off" placeholder="Name" formControlName="reference_name" type="text">
|
<input matInput autocomplete="off" placeholder="Name" formControlName="reference_name" type="text">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 24%">
|
<mat-form-field style="width: 24%">
|
||||||
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile" type="text" (keypress)="keyPress($event)">
|
<input matInput autocomplete="off" placeholder="Mobile Number" formControlName="mobile" type="text" (keypress)="keyPress($event)">
|
||||||
<mat-error *ngIf="reference['controls'].mobile.hasError('maxlength') || reference['controls'].mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
<mat-error *ngIf="reference['controls'].mobile.hasError('maxlength') || reference['controls'].mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 12%">
|
<mat-form-field style="width: 12%">
|
||||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="std_code" type="text" (keypress)="keyPress($event)">
|
<input matInput autocomplete="off" placeholder=" STD " formControlName="std_code" type="text" (keypress)="keyPress($event)">
|
||||||
<span matPrefix>+91</span>
|
<span matPrefix>+91</span>
|
||||||
<mat-error *ngIf="reference['controls'].std_code.hasError('maxlength') || reference['controls'].std_code.hasError('minlength')">Enter Valid STD Code. </mat-error>
|
<mat-error *ngIf="reference['controls'].std_code.hasError('maxlength') || reference['controls'].std_code.hasError('minlength')">Enter Valid STD Code. </mat-error>
|
||||||
</mat-form-field> <span>-</span>
|
</mat-form-field> <span>-</span>
|
||||||
@ -86,14 +85,14 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 30%" *ngIf="reference.controls.relationship_with.value==5">
|
<mat-form-field style="width: 30%" *ngIf="reference.controls.relationship_with.value==5">
|
||||||
<input matInput autocomplete="off" placeholder="Others" formControlName="others" type="text">
|
<input matInput autocomplete="off" placeholder="Specify Business Relation" formControlName="others" type="text">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p #period_paragraph>Period of Relationship</p>
|
<p #period_paragraph>Period of Relationship</p>
|
||||||
<mat-form-field style="width: 12%">
|
<mat-form-field style="width: 12%">
|
||||||
<input matInput autocomplete="off" placeholder="Year" formControlName="year_relation_applicant" type="text" (keypress)="keyPress($event)">
|
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="year_relation_applicant" (keypress)="keyPress($event)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 12%">
|
<mat-form-field style="width: 12%">
|
||||||
<input matInput autocomplete="off" placeholder="Month" formControlName="months_relation_applicant" type="text" (keypress)="keyPress($event)">
|
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="months_relation_applicant" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(reference,$event.target.value)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
<input matInput autocomplete="off" [placeholder]="reference.controls.relationship_with.value ==4 ? 'Rent Amount' : 'Volume of Business'" formControlName="business_volume_amount" type="text" (keypress)="keyPress($event)" (keyup)="inWords($event,r)">
|
<input matInput autocomplete="off" [placeholder]="reference.controls.relationship_with.value ==4 ? 'Rent Amount' : 'Volume of Business'" formControlName="business_volume_amount" type="text" (keypress)="keyPress($event)" (keyup)="inWords($event,r)">
|
||||||
@ -107,8 +106,11 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 30%" *ngIf="reference.controls.business_volume_unit.value==8">
|
||||||
|
<input matInput autocomplete="off" placeholder="Specify Unit" formControlName="others_unit" type="text">
|
||||||
|
</mat-form-field>
|
||||||
<span style="width:100%">
|
<span style="width:100%">
|
||||||
<mat-form-field style="width: 45%">
|
<mat-form-field style="width: 55%">
|
||||||
<mat-select placeholder=" Final remarks of PD officer on Reference Check done" formControlName="reference_final_remarks">
|
<mat-select placeholder=" Final remarks of PD officer on Reference Check done" formControlName="reference_final_remarks">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let remark of finalRemarksList" [value]="remark.id">
|
<mat-option *ngFor="let remark of finalRemarksList" [value]="remark.id">
|
||||||
@ -116,7 +118,7 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 25%" *ngIf="reference.controls.reference_final_remarks.value != '' ">
|
<mat-form-field style="width: 30%" *ngIf="reference.controls.reference_final_remarks.value != '' ">
|
||||||
<input matInput autocomplete="off" placeholder="Specify Remarks" formControlName="specify_final_remark" type="text">
|
<input matInput autocomplete="off" placeholder="Specify Remarks" formControlName="specify_final_remark" type="text">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
@ -148,6 +148,7 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
months_relation_applicant:[elementValue.months_relation_applicant,Validators.required],
|
months_relation_applicant:[elementValue.months_relation_applicant,Validators.required],
|
||||||
business_volume_amount:[elementValue.business_volume_amount,Validators.required],
|
business_volume_amount:[elementValue.business_volume_amount,Validators.required],
|
||||||
business_volume_unit:[elementValue.business_volume_unit, Validators.required],
|
business_volume_unit:[elementValue.business_volume_unit, Validators.required],
|
||||||
|
others_unit : [elementValue.others_unit],
|
||||||
reference_final_remarks:[elementValue.reference_final_remarks],
|
reference_final_remarks:[elementValue.reference_final_remarks],
|
||||||
specify_final_remark : [elementValue.specify_final_remark],
|
specify_final_remark : [elementValue.specify_final_remark],
|
||||||
// positive_remark:[elementValue.positive_remark],
|
// positive_remark:[elementValue.positive_remark],
|
||||||
@ -239,6 +240,7 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
"months_relation_applicant":element.months_relation_applicant,
|
"months_relation_applicant":element.months_relation_applicant,
|
||||||
"business_volume_amount":element.business_volume_amount,
|
"business_volume_amount":element.business_volume_amount,
|
||||||
"business_volume_unit":element.business_volume_unit,
|
"business_volume_unit":element.business_volume_unit,
|
||||||
|
"others_unit":element.others_unit,
|
||||||
"reference_final_remarks":element.reference_final_remarks,
|
"reference_final_remarks":element.reference_final_remarks,
|
||||||
"specify_final_remark":element.specify_final_remark
|
"specify_final_remark":element.specify_final_remark
|
||||||
// "positive_remark":element.positive_remark,
|
// "positive_remark":element.positive_remark,
|
||||||
@ -283,6 +285,20 @@ validateAllFormFields(formGroup: any) {
|
|||||||
this.validateAllFormFields(control);
|
this.validateAllFormFields(control);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** To Convert Month into Year */
|
||||||
|
ConvertMonthintoYear(itemrow,e){
|
||||||
|
console.log(itemrow);
|
||||||
|
console.log(e);
|
||||||
|
let year = itemrow.controls.year_relation_applicant.value;
|
||||||
|
|
||||||
|
let converted_month : number = e%12;
|
||||||
|
let converted_year : number = e/12;
|
||||||
|
|
||||||
|
itemrow.controls.year_relation_applicant.setValue(+year + +Math.floor(converted_year));
|
||||||
|
itemrow.controls.months_relation_applicant.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Amount InWords */
|
/** Amount InWords */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user