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