employement form changes
This commit is contained in:
parent
0da1d24064
commit
2e837324b9
@ -16,7 +16,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||||
<mat-select placeholder="Was the employer met?"
|
<mat-select placeholder="Was the employer met?"
|
||||||
formControlName="was_met">
|
formControlName="was_met">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<input matInput placeholder="Designation of person met" formControlName="designation_person_met">
|
<input matInput placeholder="Designation of person met" formControlName="designation_person_met">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||||
<mat-select placeholder="Salary amount confirmed ?"
|
<mat-select placeholder="Salary amount confirmed ?"
|
||||||
formControlName="confirm_salary">
|
formControlName="confirm_salary">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
@ -41,14 +41,14 @@
|
|||||||
<mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
<mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
||||||
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount">
|
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||||
<mat-select placeholder="Attendance register seen ?"
|
<mat-select placeholder="Attendance register seen ?"
|
||||||
formControlName="attendance_seen">
|
formControlName="attendance_seen">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||||
<mat-select placeholder="Salary register seen ?"
|
<mat-select placeholder="Salary register seen ?"
|
||||||
formControlName="sal_reg_seen">
|
formControlName="sal_reg_seen">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
@ -67,8 +67,8 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Net Monthly Salary"
|
<input matInput placeholder="Net Monthly Salary"
|
||||||
formControlName="net_monthly_salary">
|
formControlName="net_monthly_salary">
|
||||||
<input matInput placeholder="Net Take Home"
|
<!-- <input matInput placeholder="Net Take Home"
|
||||||
formControlName="net_take_home">
|
formControlName="net_take_home"> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Bonus or Incentive"
|
<input matInput placeholder="Bonus or Incentive"
|
||||||
|
|||||||
@ -31,21 +31,24 @@ import {ActivatedRoute, Router} from '@angular/router';
|
|||||||
export class EmploymentInfoComponent implements OnInit {
|
export class EmploymentInfoComponent implements OnInit {
|
||||||
@Input() pdid: number;
|
@Input() pdid: number;
|
||||||
@Input() form_id: number;
|
@Input() form_id: number;
|
||||||
|
@Input() pd_all_details:any;
|
||||||
|
|
||||||
public employmentForm: FormGroup;
|
public employmentForm: FormGroup;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
|
public pd_cus_segment:string;
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private _pd: PdTrigerService) {
|
private _pd: PdTrigerService) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
|
||||||
}
|
}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||||
this.initemploymentForm();
|
this.initemploymentForm();
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = this.form_id;
|
params.pd_form_id = this.form_id;
|
||||||
this._pd.retriveForm(params).subscribe(value => {
|
this._pd.retriveForm(params).subscribe(value => {
|
||||||
console.log('value', value);
|
|
||||||
if (value.status == 200) {
|
if (value.status == 200) {
|
||||||
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
|
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
|
||||||
this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year);
|
this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year);
|
||||||
@ -76,13 +79,13 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
employer_name: ['', Validators.compose([Validators.required])],
|
employer_name: ['', Validators.compose([Validators.required])],
|
||||||
how_long_year: ['', Validators.compose([Validators.required])],
|
how_long_year: ['', Validators.compose([Validators.required])],
|
||||||
how_long_month: ['', Validators.compose([Validators.required])],
|
how_long_month: ['', Validators.compose([Validators.required])],
|
||||||
was_met: ['', Validators.compose([Validators.required])],
|
was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||||
name_person_met: [''],
|
name_person_met: [''],
|
||||||
designation_person_met: [''],
|
designation_person_met: [''],
|
||||||
confirm_salary: ['', Validators.compose([Validators.required])],
|
confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||||
confirm_salary_amount: [''],
|
confirm_salary_amount: [''],
|
||||||
attendance_seen: ['', Validators.compose([Validators.required])],
|
attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||||
sal_reg_seen: ['', Validators.compose([Validators.required])],
|
sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||||
gross_monthly_salary: ['', Validators.compose([Validators.required])],
|
gross_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||||
net_monthly_salary: ['', Validators.compose([Validators.required])],
|
net_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||||
bonus_incentive: ['', Validators.compose([Validators.required])],
|
bonus_incentive: ['', Validators.compose([Validators.required])],
|
||||||
|
|||||||
@ -422,7 +422,7 @@
|
|||||||
<app-stock [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-stock>
|
<app-stock [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-stock>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngSwitchCase="12">
|
<ng-container *ngSwitchCase="12">
|
||||||
<app-employment-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-employment-info>
|
<app-employment-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id" [pd_all_details]="pdFullDetails"></app-employment-info>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngSwitchCase="13">
|
<ng-container *ngSwitchCase="13">
|
||||||
<app-business-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-business-info>
|
<app-business-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-business-info>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user