Commit f4222918 by Nattana Chaiyamat

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

การจัดการสมรรถนะ
ตัวชี้วัดและหลักสูตร
parent 8fb28e71
......@@ -119,7 +119,7 @@ export class IndicatorsAndCurriculumComponent {
this.dataLoading = true
this.competencytopicService.getList().subscribe({
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.dataLoading = false
this.searchChange()
......@@ -146,42 +146,9 @@ export class IndicatorsAndCurriculumComponent {
dataListFilter() {
return this.dataList.filter(x => {
const match = x.code.toLowerCase().includes(this.search.toLowerCase()) || x.name.toLowerCase().includes(this.search.toLowerCase());
return match;
return x.code.toLowerCase().includes(this.search.toLowerCase()) || x.name.toLowerCase().includes(this.search.toLowerCase()) || x.type.toLowerCase().includes(this.search.toLowerCase())
});
}
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 {
}
searchChange() {
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() {
return this.groupapprove_list.filter(x =>
......
......@@ -46,22 +46,18 @@
</tr>
</thead>
<tbody>
<tr
*ngFor="let item of[
['10001', 'ธนพัต อาชาไชย', 'HRD training Officer', '', '', '', '70', 'c', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่ 1'],
['10002', 'พิชญาภา มหาเมธี', 'HRD training Officer', '', '', '', '-', '-', 'ยังไม่ประเมิน', '-'],
['10003', 'นิรดา บุญเทพ', 'HRD training Officer', '', '', '', '76', '', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่3'],
['10004', 'รัตน์ ธนากร', 'HRD training Officer', '', '', '', '79', '', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่ 1'],
['10005', 'ยศกร ศิริธาดา', 'HRD training Officer', '', '', '', '', '', 'ประเมินเเล้ว', 'ผู้อนุมัติลำดับที่ 2'],
['10006', 'ธนิสรา นพรัตน์พร', 'HRD training Officer', '', '', '', '80', '', 'ประเมินเเล้ว', '-'],
['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>
<tr *ngFor="let item of subordinateFilter();let i = index">
<td class="text-center" style="font-size: 12px; width: 150px;">
{{item.apsassessy.employeeId}}
</td>
<td style="font-size: 12px; width: 175px;">
{{item.apsassessy.thFullName}}
</td>
<td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
<td class="flex justify-center">
<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;"
(click)="returnPage('c')">
(click)="returnPage('evaluate')">
ประเมิน
</button>
</td>
......@@ -71,10 +67,10 @@
IDP
</button>
</td>
<td class="text-center" style="font-size: 12px;">{{item[6]}}</td>
<td class="text-center" style="font-size: 12px;">{{item[7]}}</td>
<td class="text-center" style="font-size: 12px;">{{item[8]}}</td>
<td class="text-center" style="font-size: 12px;">{{item[9]}}</td>
<td class="text-center" style="font-size: 12px;">{{item.sumScore}}</td>
<td class="text-center" style="font-size: 12px;">{{item.gread}}</td>
<td class="text-center" style="font-size: 12px;">{{item.masfromStatusType.tdesc}}</td>
<td class="text-center" style="font-size: 12px;">{{item.apsapproveType.tdesc}}</td>
</tr>
</tbody>
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
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';
@Component({
......@@ -12,6 +13,9 @@ export class RoundOneComponent {
@Output() sendPathTitle: EventEmitter<string[]> = new EventEmitter<string[]>();
@Output() sendPageEvalution: 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,
private cdr: ChangeDetectorRef) {
}
......@@ -21,14 +25,18 @@ export class RoundOneComponent {
getBossList() {
this.appraisalService.getBossList().subscribe({
next: response => {
console.log(" 🐒 response:", response)
this.subordinate.dataList = response.map(x => new MyAppraisalSubordinateModel(x))
this.cdr.detectChanges()
}, error: error => {
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) {
this.sendEmployeeId.emit()
this.sendPageEvalution.emit(text)
......
......@@ -5,7 +5,7 @@ import { environment } from 'src/environments/environment';
import { AlertModel } from '../model/alert.model';
import { AppraisalFormModel } from '../model/appraisal-form.model';
import { AppraisalCompentencyModel, AppraisalCompentencyModel2 } from '../model/appraisal-competency.model';
import { AppraisalSubordinateModel } from '../model/appraisal-subordinate .model';
import { AppraisalSubordinateModel } from '../model/appraisal-subordinate.model';
@Injectable({
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