general : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-03 18:00:21 +05:30
parent 8e2e82d3ac
commit 596937a1dd
2 changed files with 22 additions and 4 deletions

View File

@ -58,7 +58,7 @@
<!-- companies start --> <!-- companies start -->
<mat-card> <mat-card>
<mat-card-header> <mat-card-header>
<mat-card-title>Companies</mat-card-title> <mat-card-title>Company/Firm</mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<div fxLayout="row wrap" formArrayName="companies"> <div fxLayout="row wrap" formArrayName="companies">
@ -90,7 +90,7 @@
<div *ngFor="let mulRel of relation.get('multiple_relation').controls; let m = index" [formGroupName]="m"> <div *ngFor="let mulRel of relation.get('multiple_relation').controls; let m = index" [formGroupName]="m">
<div fxLayout="row nowrap"> <div fxLayout="row nowrap">
<mat-form-field style="width: 40%"> <mat-form-field style="width: 40%">
<mat-select placeholder="Relation to" formControlName="applicant_relation_to"> <mat-select placeholder="Relation to" formControlName="applicant_relation_to" (selectionChange)="selectedApplicant($event,relation.controls.applicant_name.value)">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let rel of individualsList" [value]="rel.individuals_order_id" [disabled]="relation.controls.applicant_name.value == rel.applicant_name"> <mat-option *ngFor="let rel of individualsList" [value]="rel.individuals_order_id" [disabled]="relation.controls.applicant_name.value == rel.applicant_name">
{{rel.applicant_name | titlecase}} {{rel.applicant_name | titlecase}}
@ -98,6 +98,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 20%"> <mat-form-field style="width: 20%">
<!--[placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' "-->
<mat-select placeholder="Relation" formControlName="relationship"> <mat-select placeholder="Relation" formControlName="relationship">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let relShip of relationShipList" [value]="relShip.relationship_id"> <mat-option *ngFor="let relShip of relationShipList" [value]="relShip.relationship_id">
@ -117,7 +118,7 @@
</div> </div>
</div> </div>
<p>Company Relationship</p> <p>Company/Firm Relationship</p>
<div formArrayName="multiple_company_relation"> <div formArrayName="multiple_company_relation">
<div fxLayout="row nowrap" *ngFor="let comRel of relation.get('multiple_company_relation').controls; let c = index" [formGroupName]="c"> <div fxLayout="row nowrap" *ngFor="let comRel of relation.get('multiple_company_relation').controls; let c = index" [formGroupName]="c">
<mat-form-field style="width: 40%"> <mat-form-field style="width: 40%">

View File

@ -338,7 +338,24 @@ export class GeneralInfoComponent implements OnInit {
}); });
} }
} }
selectedApplicant(e,applicant_name){
console.log(e);
console.log(e.value);
console.log(e.viewValue);
console.log(applicant_name);
}
// selectedfrequency(e,i){
// switch(+e){
// case 1: this.placeholderName[i] = 'Weekly Instalment Amount'; break;
// case 2: this.placeholderName[i] = 'Daily Instalment Amount'; break;
// case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
// case 4: this.placeholderName[i] = 'Hourly Instalment Amount'; break;
// case 5: this.placeholderName[i] = 'EMI Amount'; break;
// case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
// case 7: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
// default : this.placeholderName[i] = ''; break;
// }
// }
// validate all form group and form array fields // validate all form group and form array fields
validateAllFormFields(formGroup: any) { validateAllFormFields(formGroup: any) {