Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
a648c684a6
@ -9,27 +9,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Address Type" formControlName="address_type">
|
||||
<mat-option value="Office">Office</mat-option>
|
||||
<mat-option value="Clinic">Clinic</mat-option>
|
||||
<mat-option value="Factory">Factory</mat-option>
|
||||
<mat-option value="Warehouse">Warehouse</mat-option>
|
||||
<mat-option value="Shop">Shop</mat-option>
|
||||
<mat-option value="ResidencecumOffice">Residence cum Office</mat-option>
|
||||
<mat-option value="Residence">Residence</mat-option>
|
||||
<mat-option value="Other">Other (PD officer to fill)</mat-option>
|
||||
<mat-option value="{{m_addressType.address_type_id}}"
|
||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
<mat-select placeholder="Locality" formControlName="locality">
|
||||
<mat-option value="CommercialOffice">Commercial (Office type) Area
|
||||
</mat-option>
|
||||
<mat-option value="CommercialShop">Commercial (shop type) Area</mat-option>
|
||||
<mat-option value="Industrial">Industrial Area</mat-option>
|
||||
<mat-option value="Residential">Residential Area</mat-option>
|
||||
<mat-option value="Mix">Mix use (Comment mandatory)</mat-option>
|
||||
<mat-option value="Rural">Rural (Village) area</mat-option>
|
||||
<mat-option value="Others">Others (Please specify)</mat-option>
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="addressForm.controls.locality.value == 'Others'">
|
||||
@ -72,8 +63,9 @@
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Do you know"
|
||||
formControlName="do_you_know">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="{{m_neighbourStatus}}"
|
||||
*ngFor="let m_neighbourStatus of neighbourStatusData">{{m_neighbourStatus}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -83,9 +75,10 @@
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Is the applicant owner"
|
||||
formControlName="is_owner">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="dont_know">Dont Know</mat-option>
|
||||
|
||||
<mat-option value="{{m_applicantOwner}}"
|
||||
*ngFor="let m_applicantOwner of applicantOwnerData">{{m_applicantOwner}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button type="button" matTooltip="Add More Neighbour Details" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i==0"
|
||||
|
||||
@ -34,6 +34,11 @@ export class AddressComponent implements OnInit {
|
||||
locationdata: any = [];
|
||||
commentData: any = [];
|
||||
customerData: any = [];
|
||||
addressData:any = [];
|
||||
localityData:any = [];
|
||||
neighbourStatusData:any=["Yes","No"];
|
||||
applicantOwnerData:any=["Yes","No","Dont Know"];
|
||||
|
||||
public currentLoanForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
public addressForm: FormGroup;
|
||||
@ -53,9 +58,11 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
}
|
||||
ngOnInit() {
|
||||
this.getLocation();
|
||||
this.getComment();
|
||||
this.getCustomer();
|
||||
this.getMasterDetails('PDLOCATIONAPPROACH',1);
|
||||
this.getMasterDetails('COMMENTSONLOCALITY',2);
|
||||
this.getMasterDetails('CUSTOMERBEHAVIOUR',3);
|
||||
this.getMasterDetails('LOCALITY',4);
|
||||
this.getMasterDetails('ADDRESSTYPE',5);
|
||||
this.initAddressForm();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
@ -85,7 +92,6 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
this.addressForm.controls.neighbourhood.setValue(result);
|
||||
}
|
||||
console.log('result', result);
|
||||
} else {
|
||||
control.push(this.createNeighbour());
|
||||
}
|
||||
@ -118,36 +124,24 @@ export class AddressComponent implements OnInit {
|
||||
is_owner: ['', Validators.compose([Validators.required])],
|
||||
});
|
||||
}
|
||||
getLocation() {
|
||||
let master_name = 'PDLOCATIONAPPROACH';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
getMasterDetails(table:string,type:number){
|
||||
this._pd.getAllMasterDatas(table).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
if (type==1 && val.isactive == 1) {
|
||||
this.locationdata.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
getComment() {
|
||||
let master_name = 'COMMENTSONLOCALITY';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
else if(type==2 && val.isactive == 1){
|
||||
this.commentData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
getCustomer() {
|
||||
let master_name = 'CUSTOMERBEHAVIOUR';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
else if(type==3 && val.isactive == 1){
|
||||
this.customerData.push(val);
|
||||
}
|
||||
else if(type==4 && val.isactive == 1){
|
||||
this.localityData.push(val);
|
||||
}
|
||||
else if(type==5 && val.isactive == 1){
|
||||
this.addressData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@ -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.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==2){
|
||||
this.earningStatus=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==3){
|
||||
this.qualifications=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
// get earning master details
|
||||
|
||||
// submit forms details
|
||||
submitPersonalForm(formData:any) {
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
<!--<pre> {{ m_group | json}}</pre>-->
|
||||
|
||||
<h2 mat-dialog-title>{{pageTitle}}</h2>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="80"> <span mat-dialog-title>{{pageTitle}}</span> </div>
|
||||
<div fxFlex="20"><button mat-raised-button mat-icon-button mat-dialog-close class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"><mat-icon>close</mat-icon></button></div>
|
||||
</div>
|
||||
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<mat-card style="width: 580px; padding: 6px;">
|
||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()" novalidate>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="50">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
||||
<div fxFlex="100">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Category" formControlName="fk_question_category">
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||
@ -39,14 +43,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div formArrayName="answers" fxFill>
|
||||
@ -64,20 +66,21 @@
|
||||
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>-->
|
||||
<div fxFlex="20">
|
||||
</div>-->
|
||||
<div fxFlex="20" style="text-align:right;">
|
||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
@ -85,5 +88,5 @@
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
|
||||
</mat-dialog-actions>
|
||||
@ -1,12 +1,15 @@
|
||||
<h2 mat-dialog-title>{{pageTitle}}</h2>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="80"> <span mat-dialog-title>{{pageTitle}}</span> </div>
|
||||
<div fxFlex="20"><button mat-raised-button mat-icon-button mat-dialog-close class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"><mat-icon>close</mat-icon></button></div>
|
||||
</div>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<mat-card style="width: 580px; padding: 6px;">
|
||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
||||
<!--<div class="form-group">-->
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="50">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
||||
<div fxFlex="100" >
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Category" formControlName="fk_question_category">
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||
@ -37,15 +40,13 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<!--<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value === 1 ? true : false"
|
||||
@ -64,25 +65,23 @@
|
||||
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="30">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Group" formControlName="fk_question_group_id">
|
||||
<!----<div fxFlex="30">
|
||||
<mat-form-field style="margin-top: 7%;">
|
||||
<mat-select placeholder="Group" formControlName="fk_question_group_id">
|
||||
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="20">
|
||||
</div>-->
|
||||
<div fxFlex="20" style="text-align:right;">
|
||||
<mat-checkbox *ngIf="answ.get('question_answer_id').value != null" formControlName="isactive" [ngModel]="answ.get('isactive').value == 1 ? true : answ.get('isactive').value == 0 ? false : null"
|
||||
(ngModelChange)="answ.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<button *ngIf="answ.get('question_answer_id').value == null" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button *ngIf="answ.get('question_answer_id').value == null" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
||||
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button> -->
|
||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
||||
</div>
|
||||
@ -94,6 +93,9 @@
|
||||
</li>
|
||||
</ul>-->
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
||||
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
@ -103,6 +105,6 @@
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
</mat-dialog-actions>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user