This commit is contained in:
sriram-at-840620226347 2020-01-20 11:25:57 +05:30
commit d330d9f7db
5 changed files with 36 additions and 6 deletions

View File

@ -1 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
{"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 = 726\n// module chunks = 0"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -130,7 +130,7 @@
<div *ngIf="pd_cus_segment!='SAL-CHQ'">
<div class="radio-margin">
<p>Was the Employer Met</p>
<mat-radio-group name="was_met" formControlName="was_met">
<mat-radio-group name="was_met" formControlName="was_met" (change)="setValidator($event.value,1)">
<!-- //(change)="checkotherDetails($event.value)" -->
<mat-radio-button value="yes">YES</mat-radio-button>
<mat-radio-button value="no">NO</mat-radio-button>
@ -142,7 +142,7 @@
<div *ngIf="employmentForm.controls.was_met.value == 'yes'">
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-form-field style="width: 100%">
<input matInput placeholder="Name of Person Met" formControlName="name_person_met" required>
<input matInput placeholder="Name of Person Met" formControlName="name_person_met" >
<!-- <mat-select placeholder="Name of Person Met" formControlName="name_person_met" required
(selectionChange)="filtercompanyrelationship(employmentForm.controls.employer_name.value,$event.value)">
<mat-option>Select</mat-option>
@ -150,6 +150,7 @@
{{person.applicant_name | titlecase}}
</mat-option>
</mat-select> -->
<mat-error *ngIf="employmentForm.controls['name_person_met'].hasError('required')">Name of Person Met Required</mat-error>
</mat-form-field>
</div>
@ -157,7 +158,7 @@
<mat-form-field style="width: 100%">
<!-- <input matInput placeholder="Designation of Person Met" formControlName="designation_person_met"
required> -->
<mat-select placeholder="Designation of Person Met" formControlName="designation_person_met" required>
<mat-select placeholder="Designation of Person Met" formControlName="designation_person_met">
<mat-option>Select</mat-option>
<mat-option *ngFor="let deslist of company_relationship_list" [value]="deslist.company_relationship_id">
{{deslist.name}}

View File

@ -626,6 +626,7 @@ inWords(val,flag:number){
if(this.employmentForm.controls['total_business_experience'] != null && this.employmentForm.controls['total_business_previous_experience'] != null){
this.checkWorkingExperiences();
}
this.setValidator(Emp.was_met,1)
if (Emp.name_person_met) {
this.employmentForm.controls['name_person_met'].setValue(Emp.name_person_met);
@ -879,5 +880,33 @@ inWords(val,flag:number){
}
})
}
setValidator(value, flag) {
console.log(value,flag)
let control_name:any = []
switch (flag) {
case 1:
control_name.push('name_person_met')
control_name.push('designation_person_met')
break;
default:
control_name = []
break;
}
if (control_name.length > 0) {
if (value == 'yes') {
control_name.forEach(val=>{
this.employmentForm.controls[val].setValidators(Validators.required)
this.employmentForm.controls[val].updateValueAndValidity()
})
}
else {
control_name.forEach(val=>{
this.employmentForm.controls[val].clearValidators()
this.employmentForm.controls[val].updateValueAndValidity()
})
}
// this.employmentForm.controls[control_name].updateValueAndValidity()
}
}
}