Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
ca68f04bef
@ -205,19 +205,26 @@
|
|||||||
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-checkbox formControlName="emi" [ngModel]="sup.get('emi').value === '1' ? true : false" (ngModelChange)="sup.get('emi').value = $event ? '1' : '0'">Is there a loan?</mat-checkbox>
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
|
<mat-select placeholder="Is there a loan?"
|
||||||
|
formControlName="emi">
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<!--<mat-checkbox formControlName="emi" [ngModel]="sup.get('emi').value === '1' ? true : false" (ngModelChange)="sup.get('emi').value = $event ? '1' : '0'">Is there a loan?</mat-checkbox>-->
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="EMI Paid" formControlName="emi_paid">
|
<input matInput placeholder="EMI Paid" formControlName="emi_paid">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Elapsed Tenure in months" formControlName="elapsed_tenure">
|
<input matInput placeholder="Elapsed Tenure in months" formControlName="elapsed_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Balance Tenure in months" formControlName="balance_tenure">
|
<input matInput placeholder="Balance Tenure in months" formControlName="balance_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -253,7 +260,7 @@
|
|||||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Asset Details" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Asset Details" matTooltipPosition="above"
|
||||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
<!---- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>-->
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>-->
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -4,9 +4,18 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Name of Employer" formControlName="employer_name">
|
<input matInput placeholder="Name of Employer" formControlName="employer_name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<div>
|
||||||
|
<label>Since how long working with this employer?</label>
|
||||||
|
<br>
|
||||||
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Since how long working with this employer?" formControlName="how_long">
|
<input matInput type="number" placeholder="Year" formControlName="how_long_year">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput type="number" placeholder="Month" formControlName="how_long_month">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Was the employer met?"
|
<mat-select placeholder="Was the employer met?"
|
||||||
formControlName="was_met">
|
formControlName="was_met">
|
||||||
@ -14,9 +23,14 @@
|
|||||||
<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 *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||||
<input matInput placeholder="Name and designation of person met" formControlName="name_designation">
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Name of person met" formControlName="name_person_met">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Designation of person met" formControlName="designation_person_met">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Salary amount confirmed ?"
|
<mat-select placeholder="Salary amount confirmed ?"
|
||||||
formControlName="confirm_salary">
|
formControlName="confirm_salary">
|
||||||
@ -47,10 +61,12 @@
|
|||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Gross" formControlName="gross">
|
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="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>
|
||||||
|
|||||||
@ -48,10 +48,14 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
console.log('value', 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'].setValue(value.records.how_long);
|
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['was_met'].setValue(value.records.was_met);
|
this.employmentForm.controls['was_met'].setValue(value.records.was_met);
|
||||||
if (value.records.name_designation) {
|
if (value.records.name_person_met) {
|
||||||
this.employmentForm.controls['name_designation'].setValue(value.records.name_designation);
|
this.employmentForm.controls['name_person_met'].setValue(value.records.name_person_met);
|
||||||
|
}
|
||||||
|
if (value.records.designation_person_met) {
|
||||||
|
this.employmentForm.controls['designation_person_met'].setValue(value.records.designation_person_met);
|
||||||
}
|
}
|
||||||
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
|
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
|
||||||
if (value.records.confirm_salary_amount) {
|
if (value.records.confirm_salary_amount) {
|
||||||
@ -59,8 +63,8 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen);
|
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['sal_reg_seen'].setValue(value.records.sal_reg_seen);
|
||||||
this.employmentForm.controls['gross'].setValue(value.records.gross);
|
this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
|
||||||
this.employmentForm.controls['net_take_home'].setValue(value.records.net_take_home);
|
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['bonus_incentive'].setValue(value.records.bonus_incentive);
|
||||||
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
|
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
|
||||||
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
|
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
|
||||||
@ -70,15 +74,17 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
public initemploymentForm(): void {
|
public initemploymentForm(): void {
|
||||||
this.employmentForm = this.fb.group({
|
this.employmentForm = this.fb.group({
|
||||||
employer_name: ['', Validators.compose([Validators.required])],
|
employer_name: ['', Validators.compose([Validators.required])],
|
||||||
how_long: ['', Validators.compose([Validators.required])],
|
how_long_year: ['', Validators.compose([Validators.required])],
|
||||||
|
how_long_month: ['', Validators.compose([Validators.required])],
|
||||||
was_met: ['', Validators.compose([Validators.required])],
|
was_met: ['', Validators.compose([Validators.required])],
|
||||||
name_designation: [''],
|
name_person_met: [''],
|
||||||
|
designation_person_met: [''],
|
||||||
confirm_salary: ['', Validators.compose([Validators.required])],
|
confirm_salary: ['', Validators.compose([Validators.required])],
|
||||||
confirm_salary_amount: [''],
|
confirm_salary_amount: [''],
|
||||||
attendance_seen: ['', Validators.compose([Validators.required])],
|
attendance_seen: ['', Validators.compose([Validators.required])],
|
||||||
sal_reg_seen: ['', Validators.compose([Validators.required])],
|
sal_reg_seen: ['', Validators.compose([Validators.required])],
|
||||||
gross: ['', Validators.compose([Validators.required])],
|
gross_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||||
net_take_home: ['', Validators.compose([Validators.required])],
|
net_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||||
bonus_incentive: ['', Validators.compose([Validators.required])],
|
bonus_incentive: ['', Validators.compose([Validators.required])],
|
||||||
any_delays: ['', Validators.compose([Validators.required])],
|
any_delays: ['', Validators.compose([Validators.required])],
|
||||||
employment_remarks: ['', Validators.compose([Validators.required])],
|
employment_remarks: ['', Validators.compose([Validators.required])],
|
||||||
@ -93,10 +99,12 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
records.formid = this.form_id;
|
records.formid = this.form_id;
|
||||||
records.fk_createdby = this.pdid;
|
records.fk_createdby = this.pdid;
|
||||||
records.employer_name = this.employmentForm.controls['employer_name'].value;
|
records.employer_name = this.employmentForm.controls['employer_name'].value;
|
||||||
records.how_long = this.employmentForm.controls['how_long'].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;
|
records.was_met = this.employmentForm.controls['was_met'].value;
|
||||||
if (this.employmentForm.controls['was_met'].value == 'yes') {
|
if (this.employmentForm.controls['was_met'].value == 'yes') {
|
||||||
records.name_designation = this.employmentForm.controls['name_designation'].value;
|
records.name_person_met = this.employmentForm.controls['name_person_met'].value;
|
||||||
|
records.designation_person_met = this.employmentForm.controls['designation_person_met'].value;
|
||||||
}
|
}
|
||||||
records.confirm_salary = this.employmentForm.controls['confirm_salary'].value;
|
records.confirm_salary = this.employmentForm.controls['confirm_salary'].value;
|
||||||
if (this.employmentForm.controls['confirm_salary'].value == 'yes') {
|
if (this.employmentForm.controls['confirm_salary'].value == 'yes') {
|
||||||
@ -104,8 +112,8 @@ export class EmploymentInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
|
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
|
||||||
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
|
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
|
||||||
records.gross = this.employmentForm.controls['gross'].value;
|
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
|
||||||
records.net_take_home = this.employmentForm.controls['net_take_home'].value;
|
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
|
||||||
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
|
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
|
||||||
records.any_delays = this.employmentForm.controls['any_delays'].value;
|
records.any_delays = this.employmentForm.controls['any_delays'].value;
|
||||||
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
|
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user