std code changes in neighbour hood
This commit is contained in:
parent
e945a07cbf
commit
15caf265b1
@ -43,6 +43,7 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
fk_applicant_primary_id: [null],
|
fk_applicant_primary_id: [null],
|
||||||
applicant_name: [null, Validators.compose([Validators.required])],
|
applicant_name: [null, Validators.compose([Validators.required])],
|
||||||
mobile_no: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
|
mobile_no: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
|
||||||
|
stdcode: [null, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
|
||||||
landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
|
landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
|
||||||
company_name: [null],
|
company_name: [null],
|
||||||
applicant_type: [1],
|
applicant_type: [1],
|
||||||
@ -54,7 +55,6 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
loadApplicantFormData() {
|
loadApplicantFormData() {
|
||||||
let stdcodesearch = this.mainApplicantData[0].landline.search("-");
|
let stdcodesearch = this.mainApplicantData[0].landline.search("-");
|
||||||
let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch);
|
let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch);
|
||||||
console.log(stdcode);
|
|
||||||
let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8);
|
let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8);
|
||||||
this._EditApplicantForm = this._fb.group({
|
this._EditApplicantForm = this._fb.group({
|
||||||
fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id],
|
fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id],
|
||||||
|
|||||||
@ -57,11 +57,15 @@
|
|||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
<input matInput placeholder="Name" formControlName="reference_name" type="text">
|
<input matInput placeholder="Name" formControlName="reference_name" type="text">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 24%">
|
||||||
<input matInput placeholder="Mobile Number" formControlName="mobile" type="text" (keypress)="keyPress($event)">
|
<input matInput 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: 28%">
|
<mat-form-field style="width: 10%">
|
||||||
|
<input matInput placeholder="STD" formControlName="std_code" type="text" (keypress)="keyPress($event)">
|
||||||
|
<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 style="width: 20%">
|
||||||
<input matInput placeholder="Landline Number" formControlName="landline" type="text" (keypress)="keyPress($event)">
|
<input matInput placeholder="Landline Number" formControlName="landline" type="text" (keypress)="keyPress($event)">
|
||||||
<mat-error *ngIf="reference['controls'].landline.hasError('maxlength') || reference['controls'].landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
|
<mat-error *ngIf="reference['controls'].landline.hasError('maxlength') || reference['controls'].landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -77,7 +81,7 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%" *ngIf="reference.controls.relationship_with.value==5">
|
<mat-form-field style="width: 30%" *ngIf="reference.controls.relationship_with.value==5">
|
||||||
<input matInput placeholder="Others" formControlName="others" type="text">
|
<input matInput placeholder="Others" formControlName="others" type="text">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p #period_paragraph>Period of Relationship</p>
|
<p #period_paragraph>Period of Relationship</p>
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
form_id:number;
|
form_id:number;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
check_type:any=[{'id':0,'type_name':'Neighbourhood'},{'id':1,'type_name':'Reference Check'}]
|
check_type:any=[{'id':0,'type_name':'Neighbourhood'},{'id':1,'type_name':'Reference Check'}]
|
||||||
default_reference_details: any= {'reference_name':'','mobile':'','landline':'','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':''};
|
default_reference_details: any= {'reference_name':'','mobile':'','landline':'-','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':''};
|
||||||
default_neighbourhood_details: any= {'neighbourhood_name':'','do_know':'','how_long_do_know':'','is_applicant_owner':''};
|
default_neighbourhood_details: any= {'neighbourhood_name':'','do_know':'','how_long_do_know':'','is_applicant_owner':''};
|
||||||
|
|
||||||
busineesRelationshipList:any=[];
|
busineesRelationshipList:any=[];
|
||||||
@ -128,10 +128,14 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
|
|
||||||
// create reference check form array
|
// create reference check form array
|
||||||
createReerenceCheck(elementValue:any){
|
createReerenceCheck(elementValue:any){
|
||||||
|
let stdcodesearch = elementValue.landline.search("-");
|
||||||
|
let stdcode = elementValue.landline.substr(0,stdcodesearch);
|
||||||
|
let landline = elementValue.landline.substr(+stdcodesearch + 1,8);
|
||||||
return this._fb.group({
|
return this._fb.group({
|
||||||
reference_name: [elementValue.reference_name, Validators.required],
|
reference_name: [elementValue.reference_name, Validators.required],
|
||||||
mobile: [elementValue.mobile,Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(10)])],
|
mobile: [elementValue.mobile,Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(10)])],
|
||||||
landline: [elementValue.landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
std_code: [stdcode,Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
|
||||||
|
landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
||||||
location:[elementValue.location,Validators.required],
|
location:[elementValue.location,Validators.required],
|
||||||
relationship_with:[elementValue.relationship_with,Validators.required],
|
relationship_with:[elementValue.relationship_with,Validators.required],
|
||||||
others: [elementValue.others],
|
others: [elementValue.others],
|
||||||
@ -217,7 +221,7 @@ export class NeighbourHoodComponent implements OnInit {
|
|||||||
referencecheck_list.push({
|
referencecheck_list.push({
|
||||||
"reference_name":element.reference_name,
|
"reference_name":element.reference_name,
|
||||||
"mobile":element.mobile,
|
"mobile":element.mobile,
|
||||||
"landline":element.landline,
|
"landline":element.std_code+'-'+element.landline,
|
||||||
"location":element.location,
|
"location":element.location,
|
||||||
"relationship_with":element.relationship_with,
|
"relationship_with":element.relationship_with,
|
||||||
"others":element.others,
|
"others":element.others,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user