employeement info : ps
This commit is contained in:
parent
05b64e4a5d
commit
1e03962271
@ -20,7 +20,7 @@
|
||||
<div fxFlex="100">
|
||||
<mat-card>
|
||||
|
||||
<mat-form-field style="width:17%">
|
||||
<mat-form-field style="width:22%">
|
||||
<!-- <input matInput> -->
|
||||
<mat-select placeholder="Name of Employer" formControlName="employer_name" required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -28,6 +28,11 @@
|
||||
cl.company_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 90%" *ngIf="employmentForm.controls['employer_name'].value != ''" required>
|
||||
<textarea matInput placeholder="Company Profile in brief" formControlName="employer_in_brief"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
<div>
|
||||
<label>Since how long working with this employer?</label>
|
||||
<br>
|
||||
@ -40,6 +45,17 @@
|
||||
<input matInput OnlyNumber type="text" autocomplete="off" placeholder="Month"
|
||||
formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 22%">
|
||||
<input matInput placeholder="Total Work Experience" formControlName="total_business_experience"
|
||||
OnlyNumber autocomplete="off">
|
||||
<mat-hint style="color: red;" *ngIf="checkWorkingExperiences();">
|
||||
Total working Experience is Lower
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 34%" *ngIf="workExperienceFlag">
|
||||
<input matInput placeholder="Previous Work Experience Details" formControlName="total_business_previous_experience">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
@ -49,8 +65,8 @@
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||
<mat-form-field fxFlex="50">
|
||||
<div fxLayout="row" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- <input matInput placeholder="Name of Person Met" formControlName="name_person_met" required> -->
|
||||
<mat-select placeholder="Name of Person Met" formControlName="name_person_met"
|
||||
required (selectionChange)="filtercompanyrelationship(employmentForm.controls['employer_name'].value,$event.value)">
|
||||
@ -60,7 +76,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex="50">
|
||||
<mat-form-field style="width: 45%">
|
||||
<input matInput placeholder="Designation of Person Met" formControlName="designation_person_met"
|
||||
required>
|
||||
<!-- <mat-select placeholder="Designation of Person Met" formControlName="designation_person_met" required>
|
||||
@ -80,24 +96,15 @@
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
||||
<mat-form-field fxFlex="50">
|
||||
<div fxLayout="row" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
||||
<mat-form-field style="width: 45%">
|
||||
<input matInput placeholder="What is the salary amount confirmed?"
|
||||
formControlName="confirm_salary_amount" (keypress)="keyPress($event)">
|
||||
formControlName="confirm_salary_amount" OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['confirm_salary_amount'].value != ''">{{"₹"}}
|
||||
{{employmentForm.controls['confirm_salary_amount'].value | numberToWords}}
|
||||
Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="25">
|
||||
<input matInput placeholder="Total Work Experience" formControlName="total_business_experience"
|
||||
OnlyNumber autocomplete="off">
|
||||
<mat-error *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">Higher</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- *ngIf="employmentForm.controls['how_long_year'].value > employmentForm.controls['total_business_experience'].value" -->
|
||||
<mat-form-field fxFlex="25" *ngIf="employmentForm.controls['total_business_experience'].value > employmentForm.controls['how_long_year'].value">
|
||||
<input matInput placeholder="Previous Work Experience Details" formControlName="total_business_previous_experience">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
|
||||
@ -123,51 +130,101 @@
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv"
|
||||
OnlyNumber type="number" min='1' max='31'>
|
||||
<div fxLayout="nowrap" style="padding-left: 2%; width: 100%">
|
||||
<p>Date of Salary</p>
|
||||
<mat-form-field style="width: 8%;">
|
||||
<mat-select placeholder="From" formControlName="from_date_the_salary_is_rcv" (selectionChange)="formDate($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let date of dateonly" [value]="date.date" [disabled]="date.isdisabled">
|
||||
{{date.date}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv"
|
||||
OnlyNumber type="number" min='1' max='31'>
|
||||
<mat-form-field style="width: 8%">
|
||||
<mat-select placeholder="To" formControlName="to_date_the_salary_is_rcv">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let date of todate" [value]="date.date" [disabled]="date.isdisabled">
|
||||
{{date.date}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <mat-form-field style="width: 33%">
|
||||
|
||||
<mat-select placeholder="From Date of Salary" formControlName="from_date_the_salary_is_rcv" (selectionChange)="formDate($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let date of dateonly" [value]="date.date" [disabled]="date.isdisabled">
|
||||
{{date.date}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%"> -->
|
||||
<!-- <input matInput placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv"
|
||||
OnlyNumber min="1" maxlength="3" pattern="^$|^([0-3]|[0-9]|[3][1])?" >
|
||||
<div *ngIf="employmentForm.controls['to_date_the_salary_is_rcv'].errors && (employmentForm.controls['to_date_the_salary_is_rcv'].dirty || employmentForm.controls['to_date_the_salary_is_rcv'].touched)">
|
||||
Date should be between 1 to 31
|
||||
</div> -->
|
||||
<!-- <mat-select placeholder="To Date of Salary" formControlName="to_date_the_salary_is_rcv">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let date of todate" [value]="date.date" [disabled]="date.isdisabled">
|
||||
{{date.date}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary"
|
||||
(keypress)="keyPress($event)" required>
|
||||
OnlyNumber type="text" autocomplete="off" required>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['gross_monthly_salary'].value != ''">{{"₹"}} {{employmentForm.controls['gross_monthly_salary'].value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:33%">
|
||||
<input matInput placeholder="Net Monthly Salary" formControlName="net_monthly_salary"
|
||||
(keypress)="keyPress($event)" required>
|
||||
OnlyNumber type="text" autocomplete="off" required>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['net_monthly_salary'].value != ''">{{"₹"}} {{employmentForm.controls['net_monthly_salary'].value | numberToWords}} Only</mat-hint>
|
||||
<!-- <input matInput placeholder="Net Take Home"
|
||||
formControlName="net_take_home"> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="Bonus or Incentive" formControlName="bonus_incentive"
|
||||
(keypress)="keyPress($event)" required>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['bonus_incentive'].value != ''">{{"₹"}} {{employmentForm.controls['bonus_incentive'].value | numberToWords}} Only</mat-hint>
|
||||
<input matInput placeholder="Amount paid in Cash"
|
||||
formControlName="amount_paid_in_cash" OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != ''">{{"₹"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%">
|
||||
<mat-select placeholder="Amount paid in Cash ?" formControlName="amount_paid_in_cash">
|
||||
<input matInput placeholder="Amount paid through Bank"
|
||||
formControlName="amount_paid_through_bank" OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['amount_paid_through_bank'].value != ''">{{"₹"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != '' && employmentForm.controls['amount_paid_in_cash'].value != 0">
|
||||
<mat-select placeholder="Is the Amount is Validated or Not" formControlName="check_validated">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="validated">Validated</mat-option>
|
||||
<mat-option value="not validated">Not Validated</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'validated'">
|
||||
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != '' && employmentForm.controls['amount_paid_in_cash'].value != 0 && employmentForm.controls['check_validated'].value == 'validated'">
|
||||
<input matInput placeholder="How was it Validated" formControlName="how_was_it_validated">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value == 'not validated'">
|
||||
<mat-form-field style="width: 33%;" *ngIf="employmentForm.controls['amount_paid_in_cash'].value != '' && employmentForm.controls['amount_paid_in_cash'].value != 0 && employmentForm.controls['check_validated'].value == 'not validated'">
|
||||
<input matInput placeholder="Why was it not Validated"
|
||||
formControlName="why_was_it_not_validated">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="Amount paid through Bank"
|
||||
formControlName="amount_paid_through_bank">
|
||||
<mat-select placeholder="Any Delays" formControlName="any_delays">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<!-- <input matInput placeholder="Any Delays"
|
||||
formControlName="any_delays"> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%">
|
||||
<input matInput placeholder="Bonus or Incentive" formControlName="bonus_incentive"
|
||||
OnlyNumber type="text" autocomplete="off" required>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="employmentForm.controls['bonus_incentive'].value != ''">{{"₹"}} {{employmentForm.controls['bonus_incentive'].value | numberToWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_incentive'].value != '' && employmentForm.controls['bonus_incentive'].value != '0' ">
|
||||
<mat-select placeholder="Bonus Frequency" formControlName="bonus_frequency">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -185,18 +242,11 @@
|
||||
<mat-option value="others">Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 33%" *ngIf="employmentForm.controls['bonus_type'].value == 'others'">
|
||||
<input matInput placeholder="Bonus Type Others" formControlName="bonus_type_other">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 33%">
|
||||
<mat-select placeholder="Any Delays" formControlName="any_delays">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<!-- <input matInput placeholder="Any Delays"
|
||||
formControlName="any_delays"> -->
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
@ -48,7 +48,9 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
public company_related_applicants_list: any[];
|
||||
public company_relationship_list: any[];
|
||||
public filtered_company_relationship_list: any[];
|
||||
|
||||
public dateonly: any = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}];
|
||||
public todate: any[] = this.dateonly;
|
||||
public workExperienceFlag: boolean = false;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService,
|
||||
@ -62,6 +64,7 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
|
||||
|
||||
}
|
||||
public viewerOptions: any = {
|
||||
navbar: false,
|
||||
@ -106,8 +109,12 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
if (value.status == 200) {
|
||||
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
|
||||
this.employmentForm.controls['employer_in_brief'].setValue(value.records.employer_in_brief);
|
||||
this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year);
|
||||
this.employmentForm.controls['how_long_month'].setValue(value.records.how_long_month);
|
||||
this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience);
|
||||
this.workExperienceFlag = (+value.records.total_business_previous_experience) < (+value.records.how_long_year) ? true : false;
|
||||
this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience);
|
||||
this.employmentForm.controls['was_met'].setValue(value.records.was_met);
|
||||
if (value.records.name_person_met) {
|
||||
this.employmentForm.controls['name_person_met'].setValue(value.records.name_person_met);
|
||||
@ -118,26 +125,27 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
|
||||
if (value.records.confirm_salary_amount) {
|
||||
this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount);
|
||||
// this.employmentForm.controls['salary_from_date'].setValue(value.records.salary_from_date);
|
||||
// this.employmentForm.controls['salary_to_date'].setValue(value.records.salary_to_date);
|
||||
this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience);
|
||||
this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience);
|
||||
}
|
||||
this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen);
|
||||
this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen);
|
||||
this.employmentForm.controls['from_date_the_salary_is_rcv'].setValue(value.records.from_date_the_salary_is_rcv);
|
||||
if(value.records.from_date_the_salary_is_rcv){
|
||||
this.formDate(value.records.from_date_the_salary_is_rcv);
|
||||
}
|
||||
this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue(value.records.to_date_the_salary_is_rcv);
|
||||
this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
|
||||
this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary);
|
||||
this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive);
|
||||
this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash);
|
||||
this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
|
||||
this.employmentForm.controls['check_validated'].setValue(value.records.check_validated);
|
||||
this.employmentForm.controls['how_was_it_validated'].setValue(value.records.how_was_it_validated);
|
||||
this.employmentForm.controls['why_was_it_not_validated'].setValue(value.records.why_was_it_not_validated);
|
||||
this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
|
||||
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
|
||||
this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive);
|
||||
this.employmentForm.controls['bonus_frequency'].setValue(value.records.bonus_frequency);
|
||||
this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type);
|
||||
this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other);
|
||||
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
|
||||
|
||||
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
|
||||
}
|
||||
})
|
||||
@ -163,30 +171,32 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
public initemploymentForm(): void {
|
||||
this.employmentForm = this.fb.group({
|
||||
employer_name: ['', Validators.compose([Validators.required])],
|
||||
employer_in_brief: ['', Validators.compose([Validators.required])],
|
||||
how_long_year: ['', Validators.compose([Validators.required])],
|
||||
how_long_month: [''],
|
||||
was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
name_person_met: [''],
|
||||
designation_person_met: [''],
|
||||
confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
confirm_salary_amount: [''],
|
||||
total_business_experience: [''],
|
||||
total_business_previous_experience: [''],
|
||||
attendance_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
sal_reg_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
from_date_the_salary_is_rcv: [''],
|
||||
to_date_the_salary_is_rcv: [''],
|
||||
was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
|
||||
name_person_met: [''],
|
||||
designation_person_met: [''],
|
||||
confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
|
||||
confirm_salary_amount: [''],
|
||||
attendance_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
|
||||
sal_reg_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
|
||||
from_date_the_salary_is_rcv: ['',Validators.compose([Validators.max(31), Validators.min(0)])],
|
||||
to_date_the_salary_is_rcv: ['',Validators.compose([Validators.max(31), Validators.min(0)])],
|
||||
gross_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||
net_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||
bonus_incentive: ['', Validators.compose([Validators.required])],
|
||||
amount_paid_in_cash: [''],
|
||||
amount_paid_through_bank: [''],
|
||||
check_validated:[''],
|
||||
how_was_it_validated: [''],
|
||||
why_was_it_not_validated: [''],
|
||||
amount_paid_through_bank: [''],
|
||||
any_delays: ['', Validators.compose([Validators.required])],
|
||||
bonus_incentive: ['', Validators.compose([Validators.required])],
|
||||
bonus_frequency: [''],
|
||||
bonus_type: [''],
|
||||
bonus_type_other: [''],
|
||||
any_delays: ['', Validators.compose([Validators.required])],
|
||||
// employment_details: this.fb.array([]),
|
||||
employment_remarks: [''],
|
||||
});
|
||||
@ -217,15 +227,112 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
submitDetails() {
|
||||
if(this.pd_cus_segment != 'SAL-CHQ'){
|
||||
if(this.employmentForm.controls.was_met.value == 'no'){
|
||||
|
||||
this.employmentForm.controls.name_person_met.setValue('');
|
||||
this.employmentForm.controls.name_person_met.clearValidators();
|
||||
this.employmentForm.controls.name_person_met.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.designation_person_met.setValue('');
|
||||
this.employmentForm.controls.designation_person_met.clearValidators();
|
||||
this.employmentForm.controls.designation_person_met.updateValueAndValidity();
|
||||
|
||||
}
|
||||
|
||||
if(this.employmentForm.controls.confirm_salary.value == 'no'){
|
||||
|
||||
this.employmentForm.controls.confirm_salary_amount.setValue('');
|
||||
this.employmentForm.controls.confirm_salary_amount.clearValidators();
|
||||
this.employmentForm.controls.confirm_salary_amount.updateValueAndValidity();
|
||||
}
|
||||
|
||||
}
|
||||
else if(this.pd_cus_segment == 'SAL-CHQ'){
|
||||
this.employmentForm.controls.was_met.clearValidators();
|
||||
this.employmentForm.controls.was_met.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.name_person_met.clearValidators();
|
||||
this.employmentForm.controls.name_person_met.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.designation_person_met.clearValidators();
|
||||
this.employmentForm.controls.designation_person_met.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.confirm_salary.clearValidators();
|
||||
this.employmentForm.controls.confirm_salary.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.confirm_salary.clearValidators();
|
||||
this.employmentForm.controls.confirm_salary.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.confirm_salary_amount.clearValidators();
|
||||
this.employmentForm.controls.confirm_salary_amount.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.attendance_seen.clearValidators();
|
||||
this.employmentForm.controls.attendance_seen.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.sal_reg_seen.clearValidators();
|
||||
this.employmentForm.controls.sal_reg_seen.updateValueAndValidity();
|
||||
}
|
||||
|
||||
if(this.employmentForm.controls.amount_paid_in_cash.value != 0 && this.employmentForm.controls.amount_paid_in_cash.value != '' ){
|
||||
|
||||
if(this.employmentForm.controls.check_validated.value == 'validated'){
|
||||
this.employmentForm.controls.why_was_it_not_validated.setValue('');
|
||||
}
|
||||
else if(this.employmentForm.controls.check_validated.value != 'validated'){
|
||||
this.employmentForm.controls.how_was_it_validated.setValue('');
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.employmentForm.controls.check_validated.setValue('')
|
||||
this.employmentForm.controls.how_was_it_validated.setValue('')
|
||||
this.employmentForm.controls.why_was_it_not_validated.setValue('')
|
||||
}
|
||||
|
||||
this.employmentForm.controls.check_validated.updateValueAndValidity();
|
||||
this.employmentForm.controls.how_was_it_validated.updateValueAndValidity();
|
||||
this.employmentForm.controls.why_was_it_not_validated.updateValueAndValidity();
|
||||
|
||||
if(this.employmentForm.controls.bonus_incentive.value == 0){
|
||||
this.employmentForm.controls.bonus_frequency.setValue('');
|
||||
this.employmentForm.controls.bonus_frequency.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.bonus_type.setValue('');
|
||||
this.employmentForm.controls.bonus_type.updateValueAndValidity();
|
||||
|
||||
this.employmentForm.controls.bonus_type_other.setValue('');
|
||||
this.employmentForm.controls.bonus_type_other.updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
if(this.employmentForm.controls.bonus_type.value == 'others'){
|
||||
this.employmentForm.controls.bonus_type_other.setValidators([Validators.required]);
|
||||
this.employmentForm.controls.bonus_type_other.updateValueAndValidity();
|
||||
}
|
||||
else if(this.employmentForm.controls.bonus_type.value != 'others'){
|
||||
this.employmentForm.controls.bonus_type_other.setValue('');
|
||||
this.employmentForm.controls.bonus_type_other.clearValidators();
|
||||
this.employmentForm.controls.bonus_type_other.updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!this.employmentForm.valid) {
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
}
|
||||
|
||||
if(+this.employmentForm.controls.total_business_experience.value < +this.employmentForm.controls.how_long_year.value){
|
||||
this.notifier.notify('warning', 'Total working Experience is Lower.!');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let records: any = {};
|
||||
records.pdid = this.pdid;
|
||||
records.formid = this.form_id;
|
||||
records.fk_createdby = this.pdid;
|
||||
records.employer_name = this.employmentForm.controls['employer_name'].value;
|
||||
records.employer_in_brief = this.employmentForm.controls['employer_in_brief'].value;
|
||||
records.how_long_year = this.employmentForm.controls['how_long_year'].value;
|
||||
records.how_long_month = this.employmentForm.controls['how_long_month'].value;
|
||||
records.was_met = this.employmentForm.controls['was_met'].value;
|
||||
@ -245,15 +352,20 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
records.to_date_the_salary_is_rcv = this.employmentForm.controls['to_date_the_salary_is_rcv'].value;
|
||||
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
|
||||
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
|
||||
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
|
||||
|
||||
records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value;
|
||||
records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value;
|
||||
records.check_validated = this.employmentForm.controls['check_validated'].value;
|
||||
records.how_was_it_validated = this.employmentForm.controls['how_was_it_validated'].value;
|
||||
records.why_was_it_not_validated = this.employmentForm.controls['why_was_it_not_validated'].value;
|
||||
records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value;
|
||||
|
||||
records.any_delays = this.employmentForm.controls['any_delays'].value;
|
||||
|
||||
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
|
||||
records.bonus_frequency = this.employmentForm.controls['bonus_frequency'].value;
|
||||
records.bonus_type = this.employmentForm.controls['bonus_type'].value;
|
||||
records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value;
|
||||
records.any_delays = this.employmentForm.controls['any_delays'].value;
|
||||
|
||||
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
@ -274,13 +386,47 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
/** On Key Press Event For Numbers */
|
||||
keyPress(event: any) {
|
||||
const pattern = /[0-9]/;
|
||||
checkWorkingExperiences(){
|
||||
|
||||
let inputChar = String.fromCharCode(event.charCode);
|
||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
event.preventDefault();
|
||||
if((+this.employmentForm.controls.total_business_experience.value ) < (+this.employmentForm.controls.how_long_year.value)){
|
||||
console.log(+this.employmentForm.controls.total_business_experience.value , +this.employmentForm.controls.how_long_year.value);
|
||||
this.workExperienceFlag = false;
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
this.workExperienceFlag = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// keyPress(event: any) {
|
||||
|
||||
// const pattern = /[0-9]/;
|
||||
|
||||
// let inputChar = String.fromCharCode(event.charCode);
|
||||
// if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
// event.preventDefault();
|
||||
// }
|
||||
// }
|
||||
|
||||
formDate(value){
|
||||
// console.log('to',this.todate)
|
||||
// console.log(value);
|
||||
// console.log('to length',this.todate.length);
|
||||
// console.log('index',value-1);
|
||||
// console.log('this.todate',this.todate[11]);
|
||||
// console.log('this.todate',this.todate[11].isdisabled);
|
||||
this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue('');
|
||||
this.todate = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}];
|
||||
var i ;
|
||||
|
||||
if(value != 0 && value != '')
|
||||
for(i=0;i<=value-1;i++){
|
||||
this.todate[i].isdisabled = true;
|
||||
if(value == 31){
|
||||
this.todate[30].isdisabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,15 +281,15 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
|
||||
if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == '' || nbhdChildCtrl.controls.did_not_know_the_business_operation.value == false){
|
||||
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]);
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
|
||||
// nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]);
|
||||
// nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_year'].setValidators([Validators.required]);
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_year'].updateValueAndValidity();
|
||||
}
|
||||
else if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == true){
|
||||
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].setValue('');
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators();
|
||||
// nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators();
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_year'].setValue('');
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_year'].clearValidators();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user