Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
5c20c6c4eb
@ -9,7 +9,7 @@ import { PdTrigerService } from './../../../../../../pd-service/pd-triger.servic
|
|||||||
styleUrls: ['./other-applicant-details.component.scss']
|
styleUrls: ['./other-applicant-details.component.scss']
|
||||||
})
|
})
|
||||||
export class OtherApplicantDetailsComponent implements OnInit {
|
export class OtherApplicantDetailsComponent implements OnInit {
|
||||||
pageTitle: string ="Add Individual Details";
|
pageTitle: string ="Add Name of Person(s) Met and Individual Loan Applicant(s) ";
|
||||||
public _OtherForm: FormGroup;
|
public _OtherForm: FormGroup;
|
||||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:''};
|
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:''};
|
||||||
titleList: any=[];
|
titleList: any=[];
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<!-- individuals details start-->
|
<!-- individuals details start-->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Individuals</mat-card-title>
|
<mat-card-title>Name of Person(s) Met and Individual Loan Applicant(s) </mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-table [dataSource]="individualsSource" *ngIf="_generalForm.controls.individuals['controls'].length>0" formArrayName="individuals">
|
<mat-table [dataSource]="individualsSource" *ngIf="_generalForm.controls.individuals['controls'].length>0" formArrayName="individuals">
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions align="end">
|
<mat-card-actions align="end">
|
||||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreIndividuals()"
|
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreIndividuals()"
|
||||||
matTooltip="Add More Individual" matTooltipPosition="left" color="primary">
|
matTooltip="Add More Person(s) Met/Applicant(s) " matTooltipPosition="left" color="primary">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<!-- Person Relationship Starts Here -->
|
<!-- Person Relationship Starts Here -->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title> Personal Relationships </mat-card-title>
|
<mat-card-title> Personal Relationship </mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-table [dataSource]="relationSource" *ngIf="_generalForm.controls.persons_with_relationships['controls'].length>0" formArrayName="persons_with_relationships">
|
<mat-table [dataSource]="relationSource" *ngIf="_generalForm.controls.persons_with_relationships['controls'].length>0" formArrayName="persons_with_relationships">
|
||||||
@ -96,8 +96,7 @@
|
|||||||
<ng-container matColumnDef="relation">
|
<ng-container matColumnDef="relation">
|
||||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||||
|
<mat-select placeholder="Relation" formControlName="relationship" style="width: 75%;" (selectionChange)="updatePersonalRelation(i)">
|
||||||
<mat-select placeholder="Relation" formControlName="relationship" style="width: 75%;">
|
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name + ' of' | titlecase}}</mat-option>
|
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name + ' of' | titlecase}}</mat-option>
|
||||||
<mat-option value="0" > Not Applicable </mat-option>
|
<mat-option value="0" > Not Applicable </mat-option>
|
||||||
@ -107,9 +106,8 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="relation_to">
|
<ng-container matColumnDef="relation_to">
|
||||||
<mat-header-cell *matHeaderCellDef> Relationship To </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Relationship To </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.persons_with_relationships.value[i].relationship==0 ? 'hidden':'visible'">
|
||||||
|
<mat-select placeholder="Applicant" formControlName="relation_to" style="width: 75%;" [disabled]="_generalForm.controls.persons_with_relationships.value[i].relationship==0">
|
||||||
<mat-select placeholder="Applicant" formControlName="relation_to" style="width: 75%;">
|
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let appc of individualsList" [value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
<mat-option *ngFor="let appc of individualsList" [value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
||||||
<mat-option value="0" > Not Applicable </mat-option>
|
<mat-option value="0" > Not Applicable </mat-option>
|
||||||
@ -143,7 +141,7 @@
|
|||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||||
|
|
||||||
<mat-select placeholder="Applicant" formControlName="applicant_name" style="width: 75%;">
|
<mat-select placeholder="Applicant" formControlName="applicant_name" style="width: 75%;">
|
||||||
<mat-option *ngFor="let appc of individualsList" [value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
<mat-option *ngFor="let bothC of individualsListBothCase" [value]="bothC.pd_co_applicant_id">{{bothC.applicant_name | titlecase}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
@ -151,7 +149,7 @@
|
|||||||
<ng-container matColumnDef="company_relationship">
|
<ng-container matColumnDef="company_relationship">
|
||||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||||
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;">
|
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;" (selectionChange)="updateCompanyRelation(i)">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||||
{{comrelShip.name + ' of' | titlecase}}
|
{{comrelShip.name + ' of' | titlecase}}
|
||||||
@ -165,7 +163,7 @@
|
|||||||
<mat-header-cell *matHeaderCellDef> Company </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Company </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||||
|
|
||||||
<mat-select placeholder="Company / Firm" formControlName="relation_to_company" style="width: 75%;">
|
<mat-select placeholder="Company / Firm" formControlName="relation_to_company" style="width: 75%;" [style.visibility]="_generalForm.controls.company_with_relationships.value[i].company_relationship==0 ? 'hidden':'visible'">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">
|
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">
|
||||||
{{comp.company_name}}
|
{{comp.company_name}}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
companyRelationShipList:any=[];
|
companyRelationShipList:any=[];
|
||||||
errorMessage:any;
|
errorMessage:any;
|
||||||
individualsList: any=[];
|
individualsList: any=[];
|
||||||
|
individualsListBothCase: any=[];
|
||||||
companyList: any=[];
|
companyList: any=[];
|
||||||
|
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||||
this.individualsSource.data =control.controls;
|
this.individualsSource.data =control.controls;
|
||||||
this.individualsList = control.value.filter(element =>element.is_applicant===true);
|
this.individualsList = control.value.filter(element =>element.is_applicant===true);
|
||||||
|
this.individualsListBothCase = control.value.filter(element =>element.is_applicant===true || element.is_person_met===true);
|
||||||
});
|
});
|
||||||
// update company details
|
// update company details
|
||||||
this._generalForm.controls['companies'].valueChanges.subscribe(val=>{
|
this._generalForm.controls['companies'].valueChanges.subscribe(val=>{
|
||||||
@ -426,6 +428,19 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
control.removeAt(findex);
|
control.removeAt(findex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update personal relation
|
||||||
|
updatePersonalRelation(indexVal) {
|
||||||
|
let control: any = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||||
|
control.controls[indexVal].value.relationship==0 ? control.controls[indexVal].controls['relation_to'].setValue('') : control.controls[indexVal].controls['relation_to'].setValue(control.controls[indexVal].value.relation_to);
|
||||||
|
|
||||||
|
}
|
||||||
|
// update company relation
|
||||||
|
updateCompanyRelation(indexVal) {
|
||||||
|
let control:any = <FormArray>this._generalForm.controls['company_with_relationships'];
|
||||||
|
control.controls[indexVal].value.company_relationship==0 ? control.controls[indexVal].controls['relation_to_company'].setValue('') : control.controls[indexVal].controls['relation_to_company'].setValue(control.controls[indexVal].value.relation_to_company);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// submit form details
|
// submit form details
|
||||||
submitGeneralForm(formData:any) {
|
submitGeneralForm(formData:any) {
|
||||||
if (this._generalForm.invalid) {
|
if (this._generalForm.invalid) {
|
||||||
@ -438,7 +453,6 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
// this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
|
// this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
|
||||||
// }
|
// }
|
||||||
else{
|
else{
|
||||||
console.log('else',this._generalForm.value);
|
|
||||||
let saveRecords:any = {}
|
let saveRecords:any = {}
|
||||||
saveRecords.pdid=formData.pdid;
|
saveRecords.pdid=formData.pdid;
|
||||||
saveRecords.formid=formData.formid;
|
saveRecords.formid=formData.formid;
|
||||||
|
|||||||
@ -114,6 +114,7 @@ export class DialogEntityEditListTatComponent implements OnInit {
|
|||||||
tatListEditForm: FormGroup;
|
tatListEditForm: FormGroup;
|
||||||
tatEditAddForm: FormGroup;
|
tatEditAddForm: FormGroup;
|
||||||
submitted: Boolean = false;
|
submitted: Boolean = false;
|
||||||
|
listShow: Boolean = false;
|
||||||
/**
|
/**
|
||||||
* Notifier service
|
* Notifier service
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user