Commit f9078521 by Nattana Chaiyamat

ทะเบียนพนักงาน

parent 10d7dbbf
......@@ -116,7 +116,7 @@ export class SubEmployeeRegistrationComponent {
})
}
downloadFile() {
const fileName = 'IMPORT_MPOSITION.xlsx'
const fileName = '.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({
next: response => {
const url = window.URL.createObjectURL(response);
......@@ -304,6 +304,7 @@ export class SubEmployeeRegistrationComponent {
break;
}
}
this.employee.loading = true
this.employeeService[type](body).subscribe({
next: response => {
if (response.success) {
......@@ -311,9 +312,13 @@ export class SubEmployeeRegistrationComponent {
this.getEmployeeList()
} else {
this.showAlert(response.message, 'error')
this.employee.loading = false
this.cdr.detectChanges()
}
}, error: error => {
this.showAlert(error.message, 'error')
this.employee.loading = false
this.cdr.detectChanges()
}
})
}
......@@ -385,4 +390,23 @@ export class SubEmployeeRegistrationComponent {
this.isDataListChecked = Boolean(this.numDataListChecked)
}
checkEmployeeModel() {
let disable = false
if (!this.employee.select.employeeId ||
!this.employee.select.fname ||
!this.employee.select.lname ||
!this.employee.select.empGroup.groupId ||
!this.employee.select.firstHireDate ||
!this.employee.select.bu1.bu1id ||
!this.employee.select.position.positionId ||
!this.employee.select.jobCode.jobcodeId ||
!this.employee.select.branch.branchId ||
!this.employee.select.empType.codeId ||
!this.employee.select.personalLevel.plId
) {
disable = true
}
return disable
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment