smart pd to full pd(employement information)

This commit is contained in:
gayathri1990 2021-05-24 15:30:49 +05:30
parent ac5cc701fe
commit 04b253a75f
4 changed files with 12 additions and 12 deletions

View File

@ -106,7 +106,7 @@
<mat-error *ngIf="employmentForm.controls['designation_person_met'].hasError('required')">
Required</mat-error>
</mat-form-field>
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3'" fxLayout="row wrap" fxFlex="100%">
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3' || fk_pd_type == '1'" fxLayout="row wrap" fxFlex="100%">
<mat-form-field style="width: 45%">
<mat-label>Photograph of “Photo ID card of the Employer/Manager"</mat-label>
<mat-select formControlName="photo_id_card">
@ -146,7 +146,7 @@
<!-- <mat-error *ngIf="employmentForm.controls['sal_amount_was_not_confirmed'].hasError('required')">why salary amount was not confirmed Required</mat-error> -->
</mat-form-field>
<div fxLayout="row" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes' && this.fk_pd_type != '2'">
<div fxLayout="row" fxLayoutAlign="start none" *ngIf="employmentForm.controls['confirm_salary'].value == 'yes' && this.fk_pd_type == '3'">
<mat-form-field style="width: 45%">
<input matInput placeholder="What is the salary amount confirmed?"
formControlName="confirm_salary_amount" OnlyNumber type="text" autocomplete="off">
@ -177,7 +177,7 @@
<mat-error *ngIf="employmentForm.controls['sal_reg_seen'].hasError('required')">Salary register seen Required</mat-error>
</mat-form-field>
</div>
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3' || fk_pd_type == '1'" [ngClass]="{'smartPd':fk_pd_type == '2'}">
<mat-form-field style="width: 45%">
<mat-select placeholder="Cash voucher" formControlName="cash_voucher"
>
@ -297,7 +297,7 @@
</mat-option>
</mat-select>
</mat-form-field> -->
<div *ngIf="fk_pd_type == '2'">
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '1'">
<mat-form-field style="width: 45%">
<mat-select placeholder="Has salary been paid regularly in last 3 months? " formControlName="sal_paid_regularly"
required>
@ -348,7 +348,7 @@
<mat-error *ngIf="employmentForm.controls.amount_paid_in_cash.hasError('max')">Given Value is More than Net Salary</mat-error>
<mat-error *ngIf="employmentForm.controls.amount_paid_in_cash.hasError('min')">Given Value is Less than Net Salary</mat-error>
</mat-form-field>
<span *ngIf="fk_pd_type != '2'">
<span *ngIf="fk_pd_type == '3'">
<mat-form-field style="width: 38%">
<mat-select placeholder="Is the Amount Validated or Not" formControlName="check_validated">
<mat-option>Select</mat-option>

View File

@ -11,7 +11,7 @@ import {
Validators,
FormArray, FormControl,
} from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import {
@ -200,11 +200,11 @@ export class EmploymentInfoComponent implements OnInit {
}
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
if (this.fk_pd_type == '2' || this.fk_pd_type == '3') {
if (this.fk_pd_type == '2' || this.fk_pd_type == '3'|| this.fk_pd_type == '1' ) {
let additional_value :any = {cash_voucher:value.records.cash_voucher,sal_certificate:value.records.sal_certificate,sal_slip:value.records.sal_slip,
doc_not_available:value.records.doc_not_available,doc_not_available_specify:value.records.doc_not_available_specify,other_doc:value.records.other_doc,
other_doc_name:value.records.other_doc_name,photo_id_card:value.records.photo_id_card,photo_id_others:value.records.photo_id_others,visiting_card:value.records.visiting_card}
if(this.fk_pd_type == '2') {
if(this.fk_pd_type == '2'||this.fk_pd_type == '1') {
additional_value.sal_paid_regularly =value.records.sal_paid_regularly
additional_value.reason_not_sal_pay = value.records.reason_not_sal_pay
additional_value.paid_amount = value.records.paid_amount
@ -315,7 +315,7 @@ export class EmploymentInfoComponent implements OnInit {
// employment_details: this.fb.array([]),
employment_remarks: [''],
});
if(this.fk_pd_type == '2' || this.fk_pd_type == '3') {
if(this.fk_pd_type == '2' || this.fk_pd_type == '3' || this.fk_pd_type == '1') {
this.employmentForm = this.fb.group({
...this.employmentForm.controls,
@ -333,7 +333,7 @@ export class EmploymentInfoComponent implements OnInit {
other_doc_name:['']
})
}
if(this.fk_pd_type == '2') {
if(this.fk_pd_type == '2'||this.fk_pd_type == '1') {
this.employmentForm = this.fb.group({
...this.employmentForm.controls,
sal_paid_regularly:[''],
@ -633,7 +633,7 @@ export class EmploymentInfoComponent implements OnInit {
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
if (this.fk_pd_type == '2' || this.fk_pd_type == '3') {
if (this.fk_pd_type == '2' || this.fk_pd_type == '3' || this.fk_pd_type == '1') {
records.cash_voucher = this.employmentForm.controls['cash_voucher'].value;
records.sal_certificate = this.employmentForm.controls['sal_certificate'].value;
records.sal_slip = this.employmentForm.controls['sal_slip'].value;
@ -646,7 +646,7 @@ export class EmploymentInfoComponent implements OnInit {
records.photo_id_others = this.employmentForm.controls['photo_id_others'].value;
records.visiting_card = this.employmentForm.controls['visiting_card'].value;
if (this.fk_pd_type == '2') {
if (this.fk_pd_type == '2' ||this.fk_pd_type == '1') {
records.sal_paid_regularly = this.employmentForm.controls['sal_paid_regularly'].value;
records.reason_not_sal_pay = this.employmentForm.controls['reason_not_sal_pay'].value;
records.paid_amount = this.employmentForm.controls['paid_amount'].value;