personal details master changes
This commit is contained in:
parent
3717ee0f8d
commit
b9952b5d4c
@ -30,16 +30,16 @@
|
|||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
|
|
||||||
<mat-select placeholder="Educational Qualification" formControlName="qualification_ans" required>
|
<mat-select placeholder="Educational Qualification" formControlName="qualification_ans" required>
|
||||||
<mat-option *ngFor="let education of qualifications" [value]="education" >
|
<mat-option *ngFor="let education of qualifications" [value]="education.qualification_id" >
|
||||||
{{education}}
|
{{education.qualification_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Earning Status" formControlName="earning_ans" required>
|
<mat-select placeholder="Earning Status" formControlName="earning_ans" required>
|
||||||
<mat-option *ngFor="let earning of earningStatus" [value]="earning" >
|
<mat-option *ngFor="let earning of earningStatus" [value]="earning.earning_member_status_id" >
|
||||||
{{earning}}
|
{{earning.earning_member_status}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -83,8 +83,8 @@
|
|||||||
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
||||||
|
|
||||||
<mat-select placeholder="Educational Qualification" formControlName="qualification_ans" required>
|
<mat-select placeholder="Educational Qualification" formControlName="qualification_ans" required>
|
||||||
<mat-option *ngFor="let education of qualifications" [value]="education" >
|
<mat-option *ngFor="let education of qualifications" [value]="education.qualification_id" >
|
||||||
{{education}}
|
{{education.qualification_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
@ -92,8 +92,8 @@
|
|||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
||||||
<mat-select placeholder="Earning Status" formControlName="earning_ans" required>
|
<mat-select placeholder="Earning Status" formControlName="earning_ans" required>
|
||||||
<mat-option *ngFor="let earning of earningStatus" [value]="earning" >
|
<mat-option *ngFor="let earning of earningStatus" [value]="earning.earning_member_status_id" >
|
||||||
{{earning}}
|
{{earning.earning_member_status}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -11,9 +11,12 @@ import { Key } from 'protractor';
|
|||||||
})
|
})
|
||||||
export class PersonalInfoComponent implements OnInit {
|
export class PersonalInfoComponent implements OnInit {
|
||||||
|
|
||||||
qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"];
|
//qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"];
|
||||||
earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"];
|
//earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"];
|
||||||
|
earningStatus:any=[];
|
||||||
|
qualifications:any=[];
|
||||||
relationShipList:any=[];
|
relationShipList:any=[];
|
||||||
|
|
||||||
@Input() pdid : string;
|
@Input() pdid : string;
|
||||||
@Input() pd_all_details:any;
|
@Input() pd_all_details:any;
|
||||||
form_id:number;
|
form_id:number;
|
||||||
@ -39,7 +42,9 @@ export class PersonalInfoComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loadPDDetails(this.pdid,this.form_id);
|
this.loadPDDetails(this.pdid,this.form_id);
|
||||||
this.getRelationMaster();
|
this.getMasterDetails('RELATIONSHIPS',1);
|
||||||
|
this.getMasterDetails('EARNINGMEMBERSSTATUS',2);
|
||||||
|
this.getMasterDetails('EDUQUALIFICATION',3);
|
||||||
this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||||
// console.log(this.mainApplicantDetails)
|
// console.log(this.mainApplicantDetails)
|
||||||
this.coApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 0);
|
this.coApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 0);
|
||||||
@ -194,16 +199,26 @@ this.loadDataStatus = true;
|
|||||||
get pdCoapplicant() {return this._personalForm.get('coItem') as FormArray;}
|
get pdCoapplicant() {return this._personalForm.get('coItem') as FormArray;}
|
||||||
|
|
||||||
// get relation master details
|
// get relation master details
|
||||||
getRelationMaster(){
|
getMasterDetails(table:string,type:number){
|
||||||
let relation ="RELATIONSHIPS";
|
//let relation ="RELATIONSHIPS";
|
||||||
this._pd.getAllMasterDatas(relation).subscribe(
|
this._pd.getAllMasterDatas(table).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.relationShipList=data.records;
|
if(type==1){
|
||||||
|
this.relationShipList=data.records;
|
||||||
|
}
|
||||||
|
else if(type==2){
|
||||||
|
this.earningStatus=data.records;
|
||||||
|
}
|
||||||
|
else if(type==3){
|
||||||
|
this.qualifications=data.records;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
}
|
}
|
||||||
|
// get earning master details
|
||||||
|
|
||||||
// submit forms details
|
// submit forms details
|
||||||
submitPersonalForm(formData:any) {
|
submitPersonalForm(formData:any) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user