Commit 37b46bbd by Nakarin Luankla

UPDATE รายละเอียดของงาน ไม่สามารถimportข้อมูลเข้าได้

parent 581dec38
......@@ -122,7 +122,7 @@ export class EditDefineDocumentFormComponent {
saveAssessmentList() {
let body = this.assessmentList.filter(x => x.active == true)
let body = this.assessmentList
if (body.length > 0) {
this.evaluationAssessmentService.postList(body).subscribe({
next: response => {
......
......@@ -330,7 +330,7 @@
<div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md">
<div class="ti-modal-header bg-primary !rounded-none !rounded-t-sm">
<h5 class="text-xxl font-bold text-white">
นำเข้า Job Competency
นำเข้ารายละเอียดของงาน
</h5>
</div>
<div class="ti-modal-body max-h-full overflow-hidden ti-modal-content !rounded-t-none !rounded-b-sm">
......
......@@ -54,6 +54,7 @@ export class WorkDetailComponent {
this.page = Array.from({ length: Math.ceil(this.jobcodeFilter().length / this.pageSize) }, (_, i) => i + 1);
}
edit(item :JobCodeModel){
console.log("🚀 ~ WorkDetailComponent ~ edit ~ item:", item)
this.selectJob = new MyJobCodeModel({})
this.selectJob = new MyJobCodeModel(item)
}
......@@ -79,7 +80,7 @@ export class WorkDetailComponent {
this.selectJob.specialWorkPercent = this.toNumber(this.selectJob.specialWorkPercent)
this.selectJob.allPositionWorkPercent = this.toNumber(this.selectJob.allPositionWorkPercent)
this.selectJob.otherWorkPercent = this.toNumber(this.selectJob.otherWorkPercent)
console.log("🚀 ~ WorkDetailComponent ~ save ~ this.selectJob:", this.selectJob)
this.jobcodeService.post(this.selectJob).subscribe((response:any) => {
if (response.success) {
this.showAlert(response.message, 'success')
......@@ -123,7 +124,7 @@ export class WorkDetailComponent {
const formData = new FormData();
formData.append('file', this.selectedFile);
this.loading = true
this.fileService.uploadExcel(formData, 'MJOBCODE_COMPETENCY').subscribe({
this.fileService.uploadExcel(formData, 'MJOBCODE_DETAIL').subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
......
......@@ -10,6 +10,7 @@ import { MyPositionModel, PositionModel } from "./position.model"
export interface JobCodeModel {
jobcodeId: string
companyId: string
tdesc: string
edesc: string
jobcodeLevel: string
......@@ -53,6 +54,7 @@ export interface JobCodeModel {
export class MyJobCodeModel implements JobCodeModel {
jobcodeId: string
companyId: string
tdesc: string
edesc: string
jobcodeLevel: string
......@@ -94,6 +96,7 @@ export class MyJobCodeModel implements JobCodeModel {
otherAbilitiesText: string
constructor(data: Partial<JobCodeModel>) {
this.jobcodeId = data.jobcodeId || ""
this.companyId = data.companyId || ""
this.tdesc = data.tdesc || ""
this.edesc = data.edesc || ""
this.jobcodeLevel = data.jobcodeLevel || ""
......
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