Fairoj : Emp form validation issue fied

This commit is contained in:
venbatechnologies@gmail.com 2020-01-28 16:27:18 +05:30
parent 7e6a706a24
commit ba4ce6bb90
6 changed files with 12 additions and 4 deletions

View File

@ -1 +1 @@
{"version":3,"sources":["../../@angular/common/http (ignored)"],"names":[],"mappings":";;;;;AAAA,e","file":"0.js","sourcesContent":["/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// @angular/common/http (ignored)\n// module id = 728\n// module chunks = 0"],"sourceRoot":""}
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -305,6 +305,7 @@
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" type="number" required (keyup)="inWords($event.target.value,2)">
<mat-hint align="end" *ngIf="employmentForm.controls.gross_monthly_salary.value != '' && grossMthlySlryAmtInWords !=''">{{"&#8377;"}}
{{grossMthlySlryAmtInWords}} Only</mat-hint>
<mat-error *ngIf="employmentForm.controls.gross_monthly_salary.hasError('required')">Gross Monthly Salary is required</mat-error>
</mat-form-field>
</div>
<div fxLayout="column" fxLayoutAlign="start stretch">
@ -313,6 +314,7 @@
required (keyup)="inWords($event.target.value,3)" (change)="Validategrosssalary()" #grossSalaryFocus>
<mat-hint align="end" *ngIf="employmentForm.value.net_monthly_salary != '' && netMthlySlryAmtInWords!=''">{{"&#8377;"}} {{netMthlySlryAmtInWords}} Only</mat-hint>
<mat-error *ngIf="employmentForm.controls.net_monthly_salary.hasError('max')">Net Month Salary is greater than Gross monthly Salary</mat-error>
<mat-error *ngIf="employmentForm.controls.net_monthly_salary.hasError('required')">Net Month Salary is required</mat-error>
</mat-form-field>
</div>
@ -367,6 +369,7 @@
required (keyup)="inWords($event.target.value,4)">
<mat-hint align="end" *ngIf="employmentForm.controls.bonus_incentive.value != '' && bonusIncentiveAmtInWords !='' ">{{"&#8377;"}}
{{bonusIncentiveAmtInWords}} Only</mat-hint>
<mat-error *ngIf="employmentForm.controls.bonus_incentive.hasError('required')">Bonus or Incentive is required</mat-error>
</mat-form-field>
</div>

View File

@ -39,4 +39,7 @@ page-pd-question-emp-info {
.radio-margin{
margin-bottom: 18px;
}
.mat-radio-button{
margin: 1px 8px 1px 6px;
}
}

View File

@ -344,7 +344,9 @@ this.pd_value_params={pd_id:this.pdDetails.pd_id,form_id:this.FormId.form_id,com
}
if (!this.employmentForm.valid) {
this.toast.pdTriggerappmessage('Form Invalid Try Again.!');
this.employmentForm.markAsTouched()
this.employmentForm.markAsDirty
this.toast.pdTriggerappmessage("Please Fill all the Fields marked with '*'");
return;
}