merge : kms

This commit is contained in:
gandhimathi 2019-01-03 17:54:04 +05:30
parent fe21a22285
commit 3482a11115
6 changed files with 23 additions and 15 deletions

View File

@ -109,7 +109,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 32%">
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off"> <input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off">
<mat-hint align="end" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error> <mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>

View File

@ -473,7 +473,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
} }
/** On Key Press Event For Mobile Number */ /** On Key Press Event For Mobile Number */
keyPress(event: any) { keyPress(event: any) {
const pattern = /[0-9/ /./-]/; // const pattern = /[0-9/ /./-]/;
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode); let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) { if (event.keyCode != 8 && !pattern.test(inputChar)) {

View File

@ -37,10 +37,8 @@
<input matInput placeholder="Lender Contact Person" formControlName="pd_contact_person" type="text" required> <input matInput placeholder="Lender Contact Person" formControlName="pd_contact_person" type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 32%">
<input matInput placeholder="Lender Contact Number" formControlName="pd_contact_mobileno" type="text" required> <input matInput placeholder="Lender Contact Number" formControlName="pd_contact_mobileno" type="text" required (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter Valid Mobile Number. </mat-error> <mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 32%"> <mat-form-field style="width: 32%">
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)"> <mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
@ -90,7 +88,7 @@
<mat-form-field style="width: 24%"> <mat-form-field style="width: 24%">
<!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> --> <!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> -->
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off"> <input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off">
<mat-hint align="end" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> --> <!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error> <mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>

View File

@ -259,7 +259,8 @@ export class EditPdMasterComponent implements OnInit {
} }
/** On Key Press Event For Mobile Number */ /** On Key Press Event For Mobile Number */
keyPress(event: any) { keyPress(event: any) {
const pattern = /[0-9/ /./-]/; //const pattern = /[0-9/ /./-]/;
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode); let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) { if (event.keyCode != 8 && !pattern.test(inputChar)) {

View File

@ -92,13 +92,12 @@
<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">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let rel of individualsList" [value]="rel.individuals_order_id"> <mat-option *ngFor="let rel of individualsList" [value]="rel.individuals_order_id" [disabled]="relation.controls.applicant_name.value == rel.applicant_name">
<!-- [disabled]="relation.controls.applicant_name.value == rel" -->
{{rel.applicant_name | titlecase}} {{rel.applicant_name | titlecase}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 30%"> <mat-form-field style="width: 20%">
<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">
@ -106,6 +105,9 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:20%" *ngIf="mulRel.get('relationship').value == 0">
<input matInput autocomplete="off" placeholder="Specify Relation" formControlName="other_relationship">
</mat-form-field>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More Personal Relationship" matTooltipPosition="above" color="primary" (click)="addMoreRelation(r,m)" *ngIf="m==0"><mat-icon>add</mat-icon></button> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More Personal Relationship" matTooltipPosition="above" color="primary" (click)="addMoreRelation(r,m)" *ngIf="m==0"><mat-icon>add</mat-icon></button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRelation(r,m)" *ngIf="m>0" <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRelation(r,m)" *ngIf="m>0"
matTooltip="Remove Personal Relationship" matTooltipPosition="above"> matTooltip="Remove Personal Relationship" matTooltipPosition="above">
@ -125,8 +127,8 @@
{{comp.company_name | titlecase}} {{comp.company_name | titlecase}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 30%"> <mat-form-field style="width: 20%">
<mat-select placeholder="Relation" formControlName="company_relationship"> <mat-select placeholder="Relation" formControlName="company_relationship">
<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">
@ -134,6 +136,9 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:20%" *ngIf="comRel.get('company_relationship').value == 6">
<input matInput autocomplete="off" placeholder="Specify Relation" formControlName="company_other_relationship">
</mat-form-field>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More Company Relationship" matTooltipPosition="above" color="primary" (click)="addMoreCompanyRelation(r,c)" *ngIf="c==0"><mat-icon>add</mat-icon></button> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More Company Relationship" matTooltipPosition="above" color="primary" (click)="addMoreCompanyRelation(r,c)" *ngIf="c==0"><mat-icon>add</mat-icon></button>
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeCompanyRelation(r,c)" *ngIf="c>0" <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeCompanyRelation(r,c)" *ngIf="c>0"
matTooltip="Remove Company Relationship" matTooltipPosition="above"> matTooltip="Remove Company Relationship" matTooltipPosition="above">

View File

@ -72,6 +72,7 @@ export class GeneralInfoComponent implements OnInit {
if (data.status == 200) { if (data.status == 200) {
if(type==1){ if(type==1){
this.relationShipList=data.records.filter(item => item.isactive == 1); this.relationShipList=data.records.filter(item => item.isactive == 1);
this.relationShipList.push({'relationship_id':"0",'name':'Others'});
} }
if(type==2){ if(type==2){
this.companyRelationShipList=data.records.filter(item => item.isactive == 1); this.companyRelationShipList=data.records.filter(item => item.isactive == 1);
@ -234,6 +235,7 @@ export class GeneralInfoComponent implements OnInit {
return this._fb.group({ return this._fb.group({
applicant_relation_to: [elementValue.applicant_relation_to], applicant_relation_to: [elementValue.applicant_relation_to],
relationship: [elementValue.relationship], relationship: [elementValue.relationship],
other_relationship:[elementValue.other_relationship]
}); });
} }
@ -241,7 +243,7 @@ export class GeneralInfoComponent implements OnInit {
addMoreRelation(rindex,mindex) { addMoreRelation(rindex,mindex) {
let control: any = this._generalForm.get('applicant_relation') as FormArray; let control: any = this._generalForm.get('applicant_relation') as FormArray;
control = control.controls[rindex].get('multiple_relation') as FormArray; control = control.controls[rindex].get('multiple_relation') as FormArray;
let setValues: any = {applicant_relation_to :'',relationship:''} let setValues: any = {applicant_relation_to :'',relationship:'',other_relationship:''}
control.push(this.createMultipleRelation(setValues)) control.push(this.createMultipleRelation(setValues))
} }
@ -257,13 +259,14 @@ export class GeneralInfoComponent implements OnInit {
return this._fb.group({ return this._fb.group({
company_name: [elementValue.company_name,Validators.required], company_name: [elementValue.company_name,Validators.required],
company_relationship: [elementValue.company_relationship], company_relationship: [elementValue.company_relationship],
company_other_relationship:[elementValue.company_other_relationship]
}); });
} }
// add more company relation // add more company relation
addMoreCompanyRelation(rindex,cindex) { addMoreCompanyRelation(rindex,cindex) {
let control: any = this._generalForm.get('applicant_relation') as FormArray; let control: any = this._generalForm.get('applicant_relation') as FormArray;
control = control.controls[rindex].get('multiple_company_relation') as FormArray; control = control.controls[rindex].get('multiple_company_relation') as FormArray;
let setValues: any = {company_name :'',company_relationship:''} let setValues: any = {company_name :'',company_relationship:'',company_other_relationship:''}
control.push(this.createMultipleCompanyRelation(setValues)) control.push(this.createMultipleCompanyRelation(setValues))
} }
@ -289,7 +292,7 @@ export class GeneralInfoComponent implements OnInit {
element.individuals_order_id = individualsControl.controls.length+1; element.individuals_order_id = individualsControl.controls.length+1;
individualsControl.push(this.createIndividulas(element)); individualsControl.push(this.createIndividulas(element));
let relationControl = <FormArray>this._generalForm.controls['applicant_relation']; let relationControl = <FormArray>this._generalForm.controls['applicant_relation'];
let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'applicant_relation_to':'','relation':'','company_name':'','company_relation':'','individuals_order_id':element.individuals_order_id}; let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'applicant_relation_to':'','relation':'','other_relation':'','company_name':'','company_relation':'','company_other_relation':'','individuals_order_id':element.individuals_order_id};
relationControl.push(this.createApplicantRelation(applicant_details)); relationControl.push(this.createApplicantRelation(applicant_details));
let mulRelationControl = <FormArray> relationControl.controls[relationControl.controls.length-1].get('multiple_relation'); let mulRelationControl = <FormArray> relationControl.controls[relationControl.controls.length-1].get('multiple_relation');
mulRelationControl.push(this.createMultipleRelation(applicant_details)) mulRelationControl.push(this.createMultipleRelation(applicant_details))