54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
|
|
import { Component, OnInit } from '@angular/core';
|
||
|
|
import { FormControl, FormGroup } from '@angular/forms';
|
||
|
|
import { HrEmployee } from '../../_models/HREmployee/hrEmployee';
|
||
|
|
import { SearchEmployee } from '../../_models/Employee/searchEmployee';
|
||
|
|
import { EmployeeServices } from '../../_services/employee/employee.service';
|
||
|
|
|
||
|
|
@Component({
|
||
|
|
selector: 'app-exception-item-emp',
|
||
|
|
templateUrl: './exception-item-emp.component.html',
|
||
|
|
styleUrls: ['./exception-item-emp.component.css']
|
||
|
|
})
|
||
|
|
export class ExceptionItemEmpComponent implements OnInit {
|
||
|
|
|
||
|
|
employeeForm: FormGroup;
|
||
|
|
// employeeSearchForm: FormGroup;
|
||
|
|
hrEmployeeProfile: HrEmployee;
|
||
|
|
selectedEmployee: SearchEmployee;
|
||
|
|
constructor(public employeeService: EmployeeServices) {
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
ngOnInit() {
|
||
|
|
this.employeeForm = new FormGroup(
|
||
|
|
{
|
||
|
|
dtpDateOfBirth: new FormControl(),
|
||
|
|
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public GetSelectedEmployee(childData) {
|
||
|
|
this.selectedEmployee = childData;
|
||
|
|
this.employeeService.getHREmployeeID(this.selectedEmployee.employeeID).subscribe(
|
||
|
|
(resp: any) => {
|
||
|
|
this.hrEmployeeProfile = resp;
|
||
|
|
|
||
|
|
},
|
||
|
|
(err: any) => {
|
||
|
|
},
|
||
|
|
() => {
|
||
|
|
|
||
|
|
}
|
||
|
|
);
|
||
|
|
}
|
||
|
|
searchEmployee() {
|
||
|
|
const data = {
|
||
|
|
employeeNo: this.employeeForm.value.employeeCode
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|
||
|
|
onSubmit() {
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|