Commit f4222918 by Nattana Chaiyamat

การประเมินสมรรถนะ

การจัดการสมรรถนะ
ตัวชี้วัดและหลักสูตร
parent 8fb28e71
...@@ -119,7 +119,7 @@ export class IndicatorsAndCurriculumComponent { ...@@ -119,7 +119,7 @@ export class IndicatorsAndCurriculumComponent {
this.dataLoading = true this.dataLoading = true
this.competencytopicService.getList().subscribe({ this.competencytopicService.getList().subscribe({
next: response => { next: response => {
this.dataList = response.map(x => ({ code: x.competencyTopicId, name: x.tdesc, type: x.competencyType.tdesc, file: x.competencyFiles || "" })) this.dataList = response.map(x => ({ code: x.competencyTopicId || "", name: x.tdesc || "", type: x.competencyType.tdesc || "", file: x.competencyFiles || "" }))
this.indicatorsCoursesList = response this.indicatorsCoursesList = response
this.dataLoading = false this.dataLoading = false
this.searchChange() this.searchChange()
...@@ -146,42 +146,9 @@ export class IndicatorsAndCurriculumComponent { ...@@ -146,42 +146,9 @@ export class IndicatorsAndCurriculumComponent {
dataListFilter() { dataListFilter() {
return this.dataList.filter(x => { return this.dataList.filter(x => {
const match = x.code.toLowerCase().includes(this.search.toLowerCase()) || x.name.toLowerCase().includes(this.search.toLowerCase()); return x.code.toLowerCase().includes(this.search.toLowerCase()) || x.name.toLowerCase().includes(this.search.toLowerCase()) || x.type.toLowerCase().includes(this.search.toLowerCase())
return match;
}); });
} }
showSuccess() {
this.toastr.success('บันทึกข้อมูลสำเร็จ', 'เเจ้งเตือน', {
timeOut: 3000,
positionClass: 'toast-top-right',
});
}
showSuccessEdit() {
this.toastr.success('เเก้ไขข้อมูลสำเร็จ', 'เเจ้งเตือน', {
timeOut: 3000,
positionClass: 'toast-top-right',
});
}
showSuccessDelete() {
this.toastr.success('ลบข้อมูลสำเร็จ', 'เเจ้งเตือน', {
timeOut: 3000,
positionClass: 'toast-top-right',
});
}
addUser() {
console.log('เพิ่มผู้ใช้งาน');
}
deleteUser() {
console.log('ลบผู้ใช้งาน');
}
editUser() {
console.log('แก้ไขผู้ใช้งาน');
}
} }
...@@ -157,7 +157,7 @@ export class SetApproversComponent { ...@@ -157,7 +157,7 @@ export class SetApproversComponent {
} }
searchChange() { searchChange() {
this.currentPage = 1 this.currentPage = 1
this.page = Array.from({ length: Math.ceil(this.groupapprove_listFilter().length / 10) }, (_, i) => i + 1); this.page = Array.from({ length: Math.ceil(this.groupapprove_listFilter().length / 10) }, (_, i) => i + 1)
} }
groupapprove_listFilter() { groupapprove_listFilter() {
return this.groupapprove_list.filter(x => return this.groupapprove_list.filter(x =>
......
...@@ -46,22 +46,18 @@ ...@@ -46,22 +46,18 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr <tr *ngFor="let item of subordinateFilter();let i = index">
*ngFor="let item of[ <td class="text-center" style="font-size: 12px; width: 150px;">
['10001', 'ธนพัต อาชาไชย', 'HRD training Officer', '', '', '', '70', 'c', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่ 1'], {{item.apsassessy.employeeId}}
['10002', 'พิชญาภา มหาเมธี', 'HRD training Officer', '', '', '', '-', '-', 'ยังไม่ประเมิน', '-'], </td>
['10003', 'นิรดา บุญเทพ', 'HRD training Officer', '', '', '', '76', '', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่3'], <td style="font-size: 12px; width: 175px;">
['10004', 'รัตน์ ธนากร', 'HRD training Officer', '', '', '', '79', '', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่ 1'], {{item.apsassessy.thFullName}}
['10005', 'ยศกร ศิริธาดา', 'HRD training Officer', '', '', '', '', '', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่ 2'], </td>
['10006', 'ธนิสรา นพรัตน์พร', 'HRD training Officer', '', '', '', '80', '', 'ประเมินเเล้ว', '-'], <td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
['10007', 'เมริสา สุขทิพย์', 'HRD training Officer', '', '', '', '', '', 'ประเมินเเล้ว', '-']];let i = index">
<td class="text-center" style="font-size: 12px; width: 150px;">{{item[0]}}</td>
<td style="font-size: 12px; width: 175px;">{{item[1]}}</td>
<td style="font-size: 12px;">{{item[2]}}</td>
<td class="flex justify-center"> <td class="flex justify-center">
<button type="button" class="ti-btn rounded-sm ti-btn-success" <button type="button" class="ti-btn rounded-sm ti-btn-success"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;" style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;"
(click)="returnPage('c')"> (click)="returnPage('evaluate')">
ประเมิน ประเมิน
</button> </button>
</td> </td>
...@@ -71,10 +67,10 @@ ...@@ -71,10 +67,10 @@
IDP IDP
</button> </button>
</td> </td>
<td class="text-center" style="font-size: 12px;">{{item[6]}}</td> <td class="text-center" style="font-size: 12px;">{{item.sumScore}}</td>
<td class="text-center" style="font-size: 12px;">{{item[7]}}</td> <td class="text-center" style="font-size: 12px;">{{item.gread}}</td>
<td class="text-center" style="font-size: 12px;">{{item[8]}}</td> <td class="text-center" style="font-size: 12px;">{{item.masfromStatusType.tdesc}}</td>
<td class="text-center" style="font-size: 12px;">{{item[9]}}</td> <td class="text-center" style="font-size: 12px;">{{item.apsapproveType.tdesc}}</td>
</tr> </tr>
</tbody> </tbody>
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { AppraisalSubordinateModel, MyAppraisalSubordinateModel } from 'src/app/shared/model/appraisal-subordinate.model';
import { AppraisalService } from 'src/app/shared/services/appraisal.service'; import { AppraisalService } from 'src/app/shared/services/appraisal.service';
@Component({ @Component({
...@@ -12,6 +13,9 @@ export class RoundOneComponent { ...@@ -12,6 +13,9 @@ export class RoundOneComponent {
@Output() sendPathTitle: EventEmitter<string[]> = new EventEmitter<string[]>(); @Output() sendPathTitle: EventEmitter<string[]> = new EventEmitter<string[]>();
@Output() sendPageEvalution: EventEmitter<string> = new EventEmitter<string>(); @Output() sendPageEvalution: EventEmitter<string> = new EventEmitter<string>();
@Output() sendEmployeeId: EventEmitter<string> = new EventEmitter<string>(); @Output() sendEmployeeId: EventEmitter<string> = new EventEmitter<string>();
subordinate: { loading: false, dataList: AppraisalSubordinateModel[] } = { loading: false, dataList: [] }
search = ""
constructor(private appraisalService: AppraisalService, constructor(private appraisalService: AppraisalService,
private cdr: ChangeDetectorRef) { private cdr: ChangeDetectorRef) {
} }
...@@ -21,14 +25,18 @@ export class RoundOneComponent { ...@@ -21,14 +25,18 @@ export class RoundOneComponent {
getBossList() { getBossList() {
this.appraisalService.getBossList().subscribe({ this.appraisalService.getBossList().subscribe({
next: response => { next: response => {
console.log(" 🐒 response:", response) this.subordinate.dataList = response.map(x => new MyAppraisalSubordinateModel(x))
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
this.cdr.detectChanges() this.cdr.detectChanges()
} }
}) })
} }
subordinateFilter() {
return this.subordinate.dataList.filter(x => {
return x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase())
})
}
returnPage(text: string) { returnPage(text: string) {
this.sendEmployeeId.emit() this.sendEmployeeId.emit()
this.sendPageEvalution.emit(text) this.sendPageEvalution.emit(text)
......
...@@ -5,7 +5,7 @@ import { environment } from 'src/environments/environment'; ...@@ -5,7 +5,7 @@ import { environment } from 'src/environments/environment';
import { AlertModel } from '../model/alert.model'; import { AlertModel } from '../model/alert.model';
import { AppraisalFormModel } from '../model/appraisal-form.model'; import { AppraisalFormModel } from '../model/appraisal-form.model';
import { AppraisalCompentencyModel, AppraisalCompentencyModel2 } from '../model/appraisal-competency.model'; import { AppraisalCompentencyModel, AppraisalCompentencyModel2 } from '../model/appraisal-competency.model';
import { AppraisalSubordinateModel } from '../model/appraisal-subordinate .model'; import { AppraisalSubordinateModel } from '../model/appraisal-subordinate.model';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
......
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