Commit 7fd7a2f9 by Nattana Chaiyamat

การประเมินจัดการประสิทธิภาพ

ทะเบียนกำหนดชื่อ
หัวข้อการประเมิน
parent 7ec12de4
...@@ -374,7 +374,7 @@ ...@@ -374,7 +374,7 @@
</table> </table>
</div> </div>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -510,7 +510,7 @@ ...@@ -510,7 +510,7 @@
</table> </table>
</div> </div>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -645,7 +645,7 @@ ...@@ -645,7 +645,7 @@
</table> </table>
</div> </div>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
......
...@@ -584,7 +584,7 @@ ...@@ -584,7 +584,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -712,7 +712,7 @@ ...@@ -712,7 +712,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -839,7 +839,7 @@ ...@@ -839,7 +839,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -967,7 +967,7 @@ ...@@ -967,7 +967,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -1095,7 +1095,7 @@ ...@@ -1095,7 +1095,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -1223,7 +1223,7 @@ ...@@ -1223,7 +1223,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
...@@ -1351,7 +1351,7 @@ ...@@ -1351,7 +1351,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
......
...@@ -88,7 +88,6 @@ import { EditDefineDocumentFormComponent } from '../competency-assessment/evalua ...@@ -88,7 +88,6 @@ import { EditDefineDocumentFormComponent } from '../competency-assessment/evalua
import { EvaluationCyclePerformanceComponent } from '../performance-management-evaluation/evaluation-cycle-performance/evaluation-cycle-performance.component'; import { EvaluationCyclePerformanceComponent } from '../performance-management-evaluation/evaluation-cycle-performance/evaluation-cycle-performance.component';
import { DocumentFormComponent } from '../performance-management-evaluation/evaluation-cycle-performance/document-form/document-form.component'; import { DocumentFormComponent } from '../performance-management-evaluation/evaluation-cycle-performance/document-form/document-form.component';
import { EditEvaluationFormComponent } from '../performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component'; import { EditEvaluationFormComponent } from '../performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component';
import { RoundOneComponent } from '../performance-evaluation/supervisor-evaluation/round-one/round-one.component';
import { SupervisorEvaluationComponent } from '../performance-evaluation/supervisor-evaluation/supervisor-evaluation.component'; import { SupervisorEvaluationComponent } from '../performance-evaluation/supervisor-evaluation/supervisor-evaluation.component';
import { EmployeeRegistrationComponent } from '../company-components/employee-registration/employee-registration.component'; import { EmployeeRegistrationComponent } from '../company-components/employee-registration/employee-registration.component';
import { SubEmployeeRegistrationComponent } from '../company-components/employee-registration/sub-employee-registration/sub-employee-registration.component'; import { SubEmployeeRegistrationComponent } from '../company-components/employee-registration/sub-employee-registration/sub-employee-registration.component';
...@@ -112,7 +111,7 @@ import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluati ...@@ -112,7 +111,7 @@ import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluati
import { CompanyRegistrationPageComponent } from '../company-components/company-registration/company-registration-page/company-registration-page.component'; import { CompanyRegistrationPageComponent } from '../company-components/company-registration/company-registration-page/company-registration-page.component';
import { IdpEvalutionComponent } from '../performance-evaluation/idp-evaluation/idp-evalution.component'; import { IdpEvalutionComponent } from '../performance-evaluation/idp-evaluation/idp-evalution.component';
import { PmsEvalutionComponent } from '../performance-evaluation/pms-evaluation/pms-evalution.component'; import { PmsEvalutionComponent } from '../performance-evaluation/pms-evaluation/pms-evalution.component';
import { CEvaluationComponent } from '../performance-evaluation/c-evaluation/c-evaluation.component'; import { EvaluationComponent } from '../performance-evaluation/evaluation/evaluation.component';
import { CompanyService } from 'src/app/shared/services/company.service'; import { CompanyService } from 'src/app/shared/services/company.service';
import { CompetencytypeService } from 'src/app/shared/services/competencytype.service'; import { CompetencytypeService } from 'src/app/shared/services/competencytype.service';
import { CompetencytopicService } from 'src/app/shared/services/competencytopic.service'; import { CompetencytopicService } from 'src/app/shared/services/competencytopic.service';
...@@ -247,7 +246,6 @@ export class CustomDateAdapter extends NativeDateAdapter { ...@@ -247,7 +246,6 @@ export class CustomDateAdapter extends NativeDateAdapter {
EvaluationCyclePerformanceComponent, EvaluationCyclePerformanceComponent,
DocumentFormComponent, DocumentFormComponent,
EditEvaluationFormComponent, EditEvaluationFormComponent,
RoundOneComponent,
SupervisorEvaluationComponent, SupervisorEvaluationComponent,
EmployeeRegistrationComponent, EmployeeRegistrationComponent,
SubEmployeeRegistrationComponent, SubEmployeeRegistrationComponent,
...@@ -270,7 +268,7 @@ export class CustomDateAdapter extends NativeDateAdapter { ...@@ -270,7 +268,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
IdpEvalutionComponent, IdpEvalutionComponent,
CompanyRegistrationPageComponent, CompanyRegistrationPageComponent,
PmsEvalutionComponent, PmsEvalutionComponent,
CEvaluationComponent, EvaluationComponent,
ManageUserComponent, ManageUserComponent,
PmsGradeRegistrationComponent, PmsGradeRegistrationComponent,
PmsGradeManagementComponent, PmsGradeManagementComponent,
......
import { Component, EventEmitter, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';
import Swal from 'sweetalert2';
export interface DataModel {
code: string,
name: string,
bi: BiModel[],
}
export interface BiModel {
name: string,
tools: string[],
degree: string
}
export interface Data2Model {
score: string[],
condition: string[],
e: string,
a: string,
gap: string
}
@Component({
selector: 'app-c-evaluation',
templateUrl: './c-evaluation.component.html',
styleUrls: ['./c-evaluation.component.scss']
})
export class CEvaluationComponent implements OnInit {
@Output() sendPageEvalution: EventEmitter<string> = new EventEmitter<string>();
pathTitle = ['การประเมินผล', 'ประเมินตนเอง']
hoveredCode: string | null = null;
dataList: DataModel[] = [
{
code: "CC-01",
name: "จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)",
bi: [{
name: "สอนงานด้านความปลอดภัย และคุณภาพของบริษัทให้กับพนักงานในหน่วยงาน",
tools: ["O"],
degree: "4"
}, {
name: "ติดตามและปรับปรุงการทำงานด้านความปลอดภัยและคุณภาพของทีมงาน",
tools: ["O", "D"],
degree: "5"
}],
},
{
code: "CC-02",
name: "การทำงานเป็นทีมแบบ TAT (TAT Teamwork)",
bi: [{
name: "คิดวิเคราะห์เพื่อแก้ปัญหาด้านความปลอดภัยและคุณภาพในหน่วยงานที่รับผิดชอบ",
tools: ["O", "D"],
degree: "5"
}, {
name: "นำเสนอและจัดทำรายงานด้านความปลอดภัยและคุณภาพทั้งภาษาไทยและภาษาอังกฤษ",
tools: ["O"],
degree: "2"
},
{
name: "สอนงาน และพัฒนาทีมงานให้เกิดการทำงานเป็นทีม โดยยึดเป้าหมายเดียวกัน (TAT Goal) และคำนึงถึง ความต้องการของลูกค้าเป็นหลัก (Next Customer)",
tools: ["O"],
degree: "2"
},
{
name: "สนับสนุนทีมงานให้ดำเนินการตามเป้าหมายของทีม และสิ่งที่ตนเองได้รับมอบหมาย",
tools: ["O", "D"],
degree: "4"
},
{
name: "วิเคราะห์และแก้ไขปัญหาที่เกิดจากการทำงานเป็นทีม รวมถึงการควบคุมดูแลให้เป็นไปตามเป้าหมาย",
tools: ["O"],
degree: "5"
},
{
name: "สื่อสารเพื่อสร้างความเข้าใจ และรับฟังความคิดเห็น ของสมาชิกในทีม ชื่นชมทีมงานแต่ละคนที่เป็น ส่วนหนึ่งในความสำเร็จของทีมร่วมกัน",
tools: ["O", "D"],
degree: "5"
}],
}
]
dataList2: Data2Model[] = [{
score: ["หากได้คะแนน 90 - 100% ถือว่า Gap +1", "หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap", "หากได้คะแนน 60 - 79% ถือว่า Gap - 1", "หากได้คะแนน 40 - 59% ถือว่า Gap -", "หากได้คะแนน 0 - 39% ถือว่า Gap - 3"],
condition: ["1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1", "2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %", "3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"],
e: "4",
a: "3",
gap: "-1"
}]
@ViewChild('selfEvaluation1_2', { static: true }) selfEvaluation1_2!: TemplateRef<any>;
@ViewChild('selfEvaluation1_2Edit', { static: true }) selfEvaluation1_2Edit!: TemplateRef<any>;
currentTemplate: TemplateRef<any> = this.selfEvaluation1_2
ngOnInit(): void {
this.currentTemplate = this.selfEvaluation1_2
}
dataListFilter() {
return this.dataList
}
dataList2Filter() {
return this.dataList2
}
showTools(data: string[]) {
return data.join("/")
}
saveDraft() {
Swal.fire({
iconHtml: `
<div class="flex items-center justify-center rounded-full !h-80px !w-80px" style="background-color: #E8F8EE;">
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="39" height="39" fill="#D2D2D2"/>
<g id="Component">
<g id="alert cart">
<g id="mdi:file-export">
<circle cx="22.5" cy="19.5" r="33.5" fill="#E8F8EE"/>
<path d="M9.75 3.25C8.88805 3.25 8.0614 3.59241 7.4519 4.2019C6.84241 4.8114 6.5 5.63805 6.5 6.5V32.5C6.5 33.362 6.84241 34.1886 7.4519 34.7981C8.0614 35.4076 8.88805 35.75 9.75 35.75H29.25C30.112 35.75 30.9386 35.4076 31.5481 34.7981C32.1576 34.1886 32.5 33.362 32.5 32.5V13L22.75 3.25M21.125 5.6875L30.0625 14.625H21.125M14.5113 19.8575H26V31.3463L22.555 27.9013L17.9563 32.5L13.3575 27.9013L17.9563 23.3188"
fill="#1DBE5A"/>
</g>
</g>
</g>
</svg>
</div>
`,
title: 'บันทึกแบบร่าง',
text: 'คุณต้องการบันทึกแบบร่างของการประเมินนี้ใช่หรือไม่',
showCancelButton: true,
confirmButtonText: 'ยืนยันการบันทึก',
cancelButtonText: 'ย้อนกลับ',
customClass: {
title: '!swal2-title-mt-20px',
actions: '!swal2-actions-mt-20px',
icon: '!swal2-icon-no-border',
confirmButton: '!swal2-button-bg-green',
cancelButton: '!swal2-button-bg-gray',
},
}).then((result) => {
if (result.isConfirmed) {
Swal.fire({
title: 'บันทึกสำเร็จ!',
text: 'การประเมินของคุณถูกบันทึกแล้ว',
icon: 'success',
customClass: {
confirmButton: '!swal2-button-bg-green',
}
});
} else if (result.dismiss === Swal.DismissReason.cancel) {
Swal.fire({
title: 'ยกเลิก!',
text: 'การบันทึกถูกยกเลิก',
icon: 'error',
customClass: {
confirmButton: '!swal2-button-bg-danger',
}
});
}
});
}
returnPage() {
this.sendPageEvalution.emit("")
}
}
<app-page-header [pathTitle]="pathTitle"></app-page-header> <!-- <app-page-header [pathTitle]="pathTitle"></app-page-header>
<div class="bg-card-white"> <div class="bg-card-white">
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<ng-container *ngTemplateOutlet="cEvaluation"></ng-container> <ng-container *ngTemplateOutlet="selfEvaluationEdit"></ng-container>
</div> </div>
<ng-template #cEvaluation>
<div class="pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center"> <ng-template #selfEvaluationEdit>
<div class="flex"> <ng-container *ngIf="appraisalCompentency2.data">
<button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500" <div class="pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center">
(click)="returnPage()"> <div class="flex">
<i class="ti ti-chevron-left"></i> <button type="button"
ย้อนกลับ class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
</button> (click)="returnPath()">
<div class="font-size-18px font-weight-700 align-center text-primary pl-1rem"> <i class="ti ti-chevron-left"></i>
ประเมินผล ประจำปี 2024 ย้อนกลับ
</button>
<div class="font-size-18px font-weight-700 align-center text-primary pl-1rem">
ประเมินผลประจำปี {{currentDate.getFullYear()}}
</div>
</div> </div>
</div> </div>
</div> <div class="pb-2rem px-2rem">
<div class="pb-2rem px-2rem"> <div class="font-size-18px font-weight-700 text-primary">
<div class="font-size-18px font-weight-700 text-primary"> แบบประเมินสมรรถนะพนักงาน ประจำปี 2024
แบบประเมินสมรรถนะพนักงาน ประจำปี 2024
</div>
</div>
<div class="pb-2rem px-2rem">
<div class="p-2 grid grid-cols-6 gap-3">
<div class="grid-cols-1">
<div class="text-gray-400">เครื่องมือประเมิน</div>
<div class="text-gray-400">O = แบบสังเกต</div>
<div class="text-gray-400">P = แบบการปฏิบัติงาน</div>
<div class="text-gray-400">D = การบันทึก/เอกสาร</div>
<div class="text-gray-400">I = การสัมภาษณ์</div>
<div class="text-gray-400">T = แบบทดสอบ</div>
</div>
<div class="grid-cols-1">
<div class="text-gray-400">คำชี้แจง</div>
<div class="text-gray-400">- ใช้วิธีประเมินโดย ผู้บังคับบัญชา = 100 %</div>
</div> </div>
<div class="col-span-3 grid-cols-1"> </div>
<div class="text-gray-400">ระดับความสามารถ (Target Degree)</div> <div class="pb-2rem px-2rem">
<div class="text-gray-400">ระดับ 1 = ไม่มีความรู้พื้นฐานเลย ขาดทักษะในงาน</div> <div class="p-2 grid grid-cols-6 gap-3">
<div class="text-gray-400">ระดับ 2 = มีความรู้ในงานบ้างแต่ยังไม่สามารถ ประยุกต์ใช้ในงานได้</div> <div class="grid-cols-1">
<div class="text-gray-400">ระดับ 3 = นำความรู้มาประยุกต์ใช้ในงานได้ ปฏิบัติงานเองได้ด้วยตัวเอง <div class="text-gray-400">เครื่องมือประเมิน</div>
แก้ไขปัญหาหน้างานได้</div> <div class="text-gray-400">O = แบบสังเกต</div>
<div class="text-gray-400">ระดับ 4 = สอนผู้อื่นได้ มีความคล่องตัว เชื่อมโยง ความรู้ในงานได้</div> <div class="text-gray-400">P = แบบการปฏิบัติงาน</div>
<div class="text-gray-400">ระดับ 5 = มีความชำนาญ เชี่ยวชาญ เป็นที่ยอมรับ ในองค์กร</div> <div class="text-gray-400">D = การบันทึก/เอกสาร</div>
</div> <div class="text-gray-400">I = การสัมภาษณ์</div>
<!-- <div class="grid-cols-1"> <div class="text-gray-400">T = แบบทดสอบ</div>
<div class="text-gray-400 text-center">ระดับความคาดหวัง</div> </div>
<div class="text-gray-400 text-center">1</div> <div class="grid-cols-1">
<div class="text-gray-400 text-center">2</div> <div class="text-gray-400">คำชี้แจง</div>
<div class="text-gray-400 text-center">3</div> <div class="text-gray-400">- ใช้วิธีประเมินโดย ผู้บังคับบัญชา = 100 %</div>
<div class="text-gray-400 text-center">4</div> </div>
<div class="text-gray-400 text-center">5</div> <div class="col-span-3 grid-cols-1">
<div class="text-gray-400 text-center">6</div> <div class="text-gray-400">ระดับความสามารถ (Target Degree)</div>
<div class="text-gray-400 text-center">7</div> <div class="text-gray-400">ระดับ 1 = ไม่มีความรู้พื้นฐานเลย ขาดทักษะในงาน</div>
<div class="text-gray-400 text-center">8</div> <div class="text-gray-400">ระดับ 2 = มีความรู้ในงานบ้างแต่ยังไม่สามารถ ประยุกต์ใช้ในงานได้</div>
<div class="text-gray-400">ระดับ 3 = นำความรู้มาประยุกต์ใช้ในงานได้ ปฏิบัติงานเองได้ด้วยตัวเอง
แก้ไขปัญหาหน้างานได้</div>
<div class="text-gray-400">ระดับ 4 = สอนผู้อื่นได้ มีความคล่องตัว เชื่อมโยง ความรู้ในงานได้</div>
<div class="text-gray-400">ระดับ 5 = มีความชำนาญ เชี่ยวชาญ เป็นที่ยอมรับ ในองค์กร</div>
</div>
</div> </div>
<div class="grid-cols-1">
<div class="text-gray-400 text-center">สำหรับพนักงานระดับ</div>
<div class="text-gray-400 text-center">O1 - O2</div>
<div class="text-gray-400 text-center">O3 - O4</div>
<div class="text-gray-400 text-center">S1 - S2</div>
<div class="text-gray-400 text-center">S3 - S4</div>
<div class="text-gray-400 text-center">M1 - M2</div>
<div class="text-gray-400 text-center">M3 - M4</div>
<div class="text-gray-400 text-center">E1 - E2</div>
<div class="text-gray-400 text-center">E3 - E4</div>
</div> -->
</div> </div>
</div> <div class="pb-2rem px-2rem">
<div class="pb-2rem px-2rem"> <div class="overflow-auto rounded-top-0.65rem">
<div class="overflow-auto rounded-top-0.65rem"> <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover2">
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover2"> <thead class="height-50px">
<thead class="height-50px"> <tr class="font-size-12px">
<tr class="font-size-12px"> <ng-container
<ng-container *ngFor="let item of ['ลำดับที่','รหัสสมรรถนะ','ชื่อสมรรถนะ','Behavior Indicator (BI)','เครื่องมือประเมิน\n(ตัวย่อ)\n(O,P,D,I,T)']">
*ngFor="let item of ['ลำดับที่','รหัสสมรรถนะ','ชื่อสมรรถนะ','Behavior Indicator (BI)','เครื่องมือประเมิน\n(ตัวย่อ)\n(O,P,D,I,T)']"> <th scope="col" rowspan="2"
<th scope="col" rowspan="2" class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700 ">{{ item }}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0">
<i class="ti ti-dots-vertical fs-l"></i>
</div>
</th>
</ng-container>
<th scope="col" colspan="5"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center"> class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700 ">{{ item }}</span> ระดับความสามารถ (Target Degree)
<div class="absolute top-1/2 transform -translate-y-1/2 right-0">
<i class="ti ti-dots-vertical fs-l"></i>
</div>
</th> </th>
</ng-container> </tr>
<th scope="col" colspan="5" <tr class="font-size-12px">
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center"> <ng-container *ngFor="let item of [5,4,3,2,1]">
ระดับความสามารถ (Target Degree) <th scope="col"
</th> class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
</tr> {{item}}
<tr class="font-size-12px"> </th>
<ng-container *ngFor="let item of [5,4,3,2,1]"> </ng-container>
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary text-center"> </tr>
{{item}} </thead>
</th> <tbody *ngIf="appraisalCompentency2.loading">
</ng-container> <tr>
</tr> <td class="text-center" colspan="100%">
</thead> <div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1"
<tbody *ngIf="!dataListFilter().length"> role="status" aria-label="loading">
<tr class="hover:table-hover2-hover"> <span class="sr-only">Loading...</span>
<td class="text-center" colspan="100%"> </div>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody *ngIf="dataListFilter().length">
<ng-container *ngFor=" let data of dataListFilter();let i = index">
<tr *ngFor="let item of data.bi;let i2 = index;let f = first"
(mouseenter)="hoveredCode = data.code" (mouseleave)="hoveredCode = null"
[ngClass]="{ 'table-hover2': data.code === hoveredCode ,'border-none':!f }">
<td class="align-start text-center">
<ng-container *ngIf="f">
{{i+1}}
</ng-container>
</td>
<td class="align-start text-center">
<ng-container *ngIf="f">
{{data.code}}
</ng-container>
</td>
<td class="align-start !white-space-normal">
<ng-container *ngIf="f">
{{data.name}}
</ng-container>
</td>
<td class="align-start !white-space-normal">
{{item.name}}
</td>
<td class="align-center text-center">
{{showTools(item.tools)}}
</td> </td>
<td class="align-center text-center" </tr>
*ngFor="let value of ['5','4','3','2','1']; let i3=index"> </tbody>
<input type="radio" [name]="'radio'+i+''+i2" class="ti-form-radio cursor-pointer" <tbody *ngIf="!appraisalCompentency2.loading&&!appraisalCompentency2Filter().length">
[id]="'radio'+i+''+i2+''+i3" [value]="value" [(ngModel)]="item.degree"> <tr>
<td class="text-center" colspan="100%">
ไม่พบข้อมูล
</td> </td>
</tr> </tr>
</ng-container> </tbody>
</tbody> <tbody *ngIf="!appraisalCompentency2.loading&&appraisalCompentency2Filter().length">
</table> <ng-container *ngFor="let item2 of appraisalCompentency2Filter();let i = index">
<tr *ngFor="let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first"
(mouseenter)="hoveredCode = item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyCourseId"
(mouseleave)="hoveredCode = null"
[ngClass]="{ 'table-hover2': item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyCourseId === hoveredCode ,'border-none':!f }">
<td class="align-start text-center">
<ng-container *ngIf="f">
{{i+1}}
</ng-container>
</td>
<td class="align-start text-center">
<ng-container *ngIf="f">
{{item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</ng-container>
</td>
<td class="align-start !white-space-normal">
<ng-container *ngIf="f">
{{item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.tdesc}}
</ng-container>
</td>
<td class="align-start !white-space-normal">
{{bi.behavioralIndicators}}
</td>
<td class="align-center text-center">
{{bi.assessmentId}}
</td>
<td class="align-center text-center" *ngFor="let value of [5,4,3,2,1]; let i3=index">
<input type="radio" [name]="'radio'+i+''+i2" class="ti-form-radio cursor-pointer"
[id]="'radio'+i+''+i2+''+i3" [value]="value" [disabled]="!employee.evaluate"
[(ngModel)]="bi.competencyBehavioral.scoreTopicExpectation"
(ngModelChange)="calnumberCheck()">
</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
</div> </div>
</div>
<div class="pb-1rem px-2rem"> <div class="pb-1rem px-2rem">
<div class="py-2 grid grid-cols-11"> <div class="py-2 grid grid-cols-11">
<div class="col-span-8">รวมจำนวนเครื่องหมายแต่ละช่อง (1)</div> <div class="col-span-8">ระดับความสามารถ (Target Degree)</div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-1 text-center">14</div> <div class="col-span-1 text-center" *ngFor="let item of [5,4,3,2,1]">{{item}}</div>
<div class="col-span-1 text-center">6</div> </div>
<div class="col-span-1 text-center">0</div>
<div class="col-span-1 text-center">0</div>
<div class="col-span-1 text-center">0</div>
</div> </div>
</div> <div class="py-2 grid grid-cols-11">
<div class="py-2 grid grid-cols-11"> <div class="col-span-8">รวมจำนวนเครื่องหมายแต่ละช่อง (1)</div>
<div class="col-span-8">ตัวคูณคะแนนในแต่ละช่อง (2)</div> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-1 text-center">
<div class="col-span-1 text-center">1</div> {{appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].numberCheck5}}</div>
<div class="col-span-1 text-center">0.8</div> <div class="col-span-1 text-center">
<div class="col-span-1 text-center">0.6</div> {{appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].numberCheck4}}</div>
<div class="col-span-1 text-center">0.4</div> <div class="col-span-1 text-center">
<div class="col-span-1 text-center">0.2</div> {{appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].numberCheck3}}</div>
<div class="col-span-1 text-center">
{{appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].numberCheck2}}</div>
<div class="col-span-1 text-center">
{{appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].numberCheck1}}</div>
</div>
</div> </div>
</div> <div class="py-2 grid grid-cols-11">
<div class="py-2 grid grid-cols-11"> <div class="col-span-8">ตัวคูณคะแนนในแต่ละช่อง (2)</div>
<div class="col-span-8">ถ่วงน้ำหนักผลรวม 1X2</div> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-1 text-center">{{setting.data.settingScore5}}</div>
<div class="col-span-1 text-center">14</div> <div class="col-span-1 text-center">{{setting.data.settingScore4}}</div>
<div class="col-span-1 text-center">4.80</div> <div class="col-span-1 text-center">{{setting.data.settingScore3}}</div>
<div class="col-span-1 text-center">0.00</div> <div class="col-span-1 text-center">{{setting.data.settingScore2}}</div>
<div class="col-span-1 text-center">0.00</div> <div class="col-span-1 text-center">{{setting.data.settingScore1}}</div>
<div class="col-span-1 text-center">0.00</div> </div>
</div> </div>
</div> <div class="py-2 grid grid-cols-11">
<div class="py-2 grid grid-cols-11"> <div class="col-span-8">ถ่วงน้ำหนักผลรวม 1X2</div>
<div class="col-span-8">คะแนนรวมหลังถ่วงน้ำ</div> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-1 text-center" *ngFor="let item of [5,4,3,2,1]">{{calWeightScore(item)}}</div>
<div class="col-span-5 text-center">18.80</div> </div>
</div> </div>
</div> <div class="py-2 grid grid-cols-11">
<div class="py-2 grid grid-cols-11"> <div class="col-span-8">คะแนนรวมหลังถ่วงน้ำ</div>
<div class="col-span-8">คะแนนเฉลี่ยคิดเป็น</div> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-5 text-center">
<div class="col-span-5 text-center">94.00</div> {{appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].weightedTotal}}</div>
</div>
</div>
<div class="py-2 grid grid-cols-11">
<div class="col-span-8">คะแนนเฉลี่ยคิดเป็น</div>
<div class="col-span-3 grid grid-cols-5">
<div class="col-span-5 text-center">
{{showNumber(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].averageScore)}}
</div>
</div>
</div> </div>
</div> </div>
</div>
<div class="pb-2rem px-2rem"> <div class="pb-2rem px-2rem">
<div class="overflow-auto rounded-top-0.65rem"> <div class="overflow-auto rounded-top-0.65rem">
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover"> <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
<thead class="height-50px"> <thead class="height-50px">
<tr class="font-size-12px"> <tr class="font-size-12px">
<ng-container <ng-container
*ngFor="let item of ['เกณฑ์การให้คะแนนการประประเมิน Check Sheet E01','ความคาดหวัง (E)','ผลประเมิน (A)','สรุปผล Gap'];let f = first ;let l = last"> *ngFor="let item of ['เกณฑ์การให้คะแนนการประประเมิน Check Sheet E01','ผลประเมิน (A)','สรุปผล Gap'];let f = first ;let l = last">
<th scope="col" [attr.rowspan]="f?'1':'2'" [attr.colspan]="f?'2':'1'" <th scope="col" [attr.rowspan]="f?'1':'2'" [attr.colspan]="f?'2':'1'"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center"> class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700 ">{{ item }}</span> <span class="font-size-12px font-weight-700 ">{{ item }}</span>
<div *ngIf="!f&&!l" class="absolute top-1/2 transform -translate-y-1/2 right-0"> <div *ngIf="!f&&!l" class="absolute top-1/2 transform -translate-y-1/2 right-0">
<i class="ti ti-dots-vertical fs-l"></i> <i class="ti ti-dots-vertical fs-l"></i>
</div>
</th>
<th *ngIf="f" scope="col" rowspan="2"
class="relative bg-soft-secondary text-primary !text-center !p-0">
<div class="absolute top-1/2 transform -translate-y-1/2 right-0">
<i class="ti ti-dots-vertical fs-l"></i>
</div>
</th>
</ng-container>
</tr>
<tr class="font-size-12px">
<ng-container *ngFor="let item of ['เกณฑ์การให้คะแนน','เงื่อนไข']">
<th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
{{item}}
</th>
</ng-container>
</tr>
</thead>
<tbody *ngIf="checkSheet.length">
<tr *ngFor="let item of checkSheet;let i = index">
<td class="align-start" rowspan="2">
<div *ngFor="let item2 of item.score">
<span>{{item2}} </span><br>
</div> </div>
</th> </td>
<th *ngIf="f" scope="col" rowspan="2" <td class="align-start" rowspan="2">
class="relative bg-soft-secondary text-primary !text-center !p-0"> <div *ngFor="let item2 of item.condition">
<div class="absolute top-1/2 transform -translate-y-1/2 right-0"> <span>{{item2}} </span><br>
<i class="ti ti-dots-vertical fs-l"></i>
</div> </div>
</th> </td>
</ng-container> <td class="!p-0"></td>
</tr> <td class="align-start text-center">
<tr class="font-size-12px"> {{calAverage(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].averageScore)}}
<ng-container *ngFor="let item of ['เกณฑ์การให้คะแนน','เงื่อนไข']"> </td>
<th scope="col" <td class="align-start text-center">
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center"> {{calGap(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].averageScore)}}
{{item}} </td>
</th> </tr>
</ng-container> <tr>
</tr> <td class="align-start !white-space-normal" colspan="4">
</thead> หมายเหตุ<br>
<tbody *ngIf="dataList2Filter().length"> ผลการประเมินอาจมีการเปลี่ยนแปลงเงื่อนไขข้อ 1-3 เนื่องจากมีคะแนนต่ำกว่าเกณฑ์ในบางข้อ
<tr *ngFor="let item of dataList2Filter();let i = index"> </td>
<td class="align-start" rowspan="2"> </tr>
<div *ngFor="let item2 of item.score"> </tbody>
<span>{{item2}} </span><br> </table>
</div> </div>
</td>
<td class="align-start" rowspan="2">
<div *ngFor="let item2 of item.condition">
<span>{{item2}} </span><br>
</div>
</td>
<td class="!p-0"></td>
<td class="align-start text-center">
{{item.e}}
</td>
<td class="align-start text-center">
{{item.a}}
</td>
<td class="align-start text-center">
{{item.gap}}
</td>
</tr>
<tr>
<td class="align-start !white-space-normal" colspan="4">
หมายเหตุ<br>
ผลการประเมินอาจมีการเปลี่ยนแปลงเงื่อนไขข้อ 1-3 เนื่องจากมีคะแนนต่ำกว่าเกณฑ์ในบางข้อ
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> <div class="py-1rem px-2rem">
<div class="py-1rem px-2rem"> <div class="py-2 grid grid-cols-7 gap-3">
<div class="py-2 grid grid-cols-7 gap-3"> <div class="col-span-1">ผู้ถูกประเมิน</div>
<div class="col-span-1">ผู้ประเมิน1</div> <div class="col-span-1">
<div class="col-span-1">น.ส. พิมพร อูรณการ</div> {{appraisalCompentency2.data.apsassessy.thFullName}}</div>
<div class="col-span-1"> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage" class="ti-switch"> <input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
<label for="hs-basic-usage" class="sr-only">ยืนยันผล</label> checked:before:bg-green-200 dark:checked:before:bg-green-200 pointer-events-none "
[checked]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsassessyStatus=='2'">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div>
<div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[class.!bg-input-readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='0'||!employee.evaluate"
[readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='0'||!employee.evaluate"
[(ngModel)]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsassessyComment"></textarea>
<span class="pt-2">
วันที่ :
{{convertDate(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsassessyDate)}}
</span>
</div>
</div> </div>
<div class="col-span-2"> <div class="py-2 grid grid-cols-7 gap-3" *ngIf="appraisalCompentency2.data.apsapprove1.employeeId">
<textarea type="text" rows="2" class="ti-form-input mb-2"></textarea> <div class="col-span-1">
<span class="pt-2"> {{appraisalCompentency2.data.apsapprove2.employeeId?'ผู้ประเมิน1':'ผู้อนุมัติ'}}
วันที่ : </div>
</span> <div class="col-span-1">
{{appraisalCompentency2.data.apsapprove1.thFullName}}</div>
<div class="col-span-1">
<input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200 pointer-events-none"
[checked]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove1Status=='2'">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div>
<div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[class.!bg-input-readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='1'||!employee.evaluate"
[readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='1'||!employee.evaluate"
[(ngModel)]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove1Comment"></textarea>
<span class="pt-2">
วันที่ :
{{convertDate(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove1Date)}}
</span>
</div>
</div> </div>
</div> <div class="py-2 grid grid-cols-7 gap-3" *ngIf="appraisalCompentency2.data.apsapprove2.employeeId">
<div class="py-2 grid grid-cols-7 gap-3"> <div class="col-span-1">
<div class="col-span-1">ผู้ประเมิน2</div> {{appraisalCompentency2.data.apsapprove3.employeeId?'ผู้ประเมิน2':'ผู้อนุมัติ'}}
<div class="col-span-1">น.ส. นดี แป้นศรี</div> </div>
<div class="col-span-1"> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage" class="ti-switch"> {{appraisalCompentency2.data.apsapprove2.thFullName}}</div>
<label for="hs-basic-usage" class="sr-only">ตรวจสอบ</label> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200 pointer-events-none"
[checked]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove2Status=='2'">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div>
<div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[class.!bg-input-readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='2'||!employee.evaluate"
[readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='2'||!employee.evaluate"
[(ngModel)]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove2Comment"></textarea>
<span class="pt-2">
วันที่ :
{{convertDate(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove2Date)}}
</span>
</div>
</div> </div>
<div class="col-span-2"> <div class="py-2 grid grid-cols-7 gap-3" *ngIf="appraisalCompentency2.data.apsapprove3.employeeId">
<textarea type="text" rows="2" class="ti-form-input mb-2" value="ใส่ Comment ที่นี่"></textarea> <div class="col-span-1">
<span> {{appraisalCompentency2.data.apsapprove4.employeeId?'ผู้ประเมิน3':'ผู้อนุมัติ'}}
วันที่ : </div>
</span> <div class="col-span-1">
{{appraisalCompentency2.data.apsapprove3.thFullName}}</div>
<div class="col-span-1">
<input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200 pointer-events-none"
[checked]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove3Status=='2'">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div>
<div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[class.!bg-input-readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='3'||!employee.evaluate"
[readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='3'||!employee.evaluate"
[(ngModel)]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove3Comment"></textarea>
<span class="pt-2">
วันที่ :
{{convertDate(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove3Date)}}
</span>
</div>
</div> </div>
</div> <div class="py-2 grid grid-cols-7 gap-3" *ngIf="appraisalCompentency2.data.apsapprove4.employeeId">
<div class="py-2 grid grid-cols-7 gap-3"> <div class="col-span-1">
<div class="col-span-1">ผู้อนุมัติ</div> {{appraisalCompentency2.data.apsapprove5.employeeId?'ผู้ประเมิน4':'ผู้อนุมัติ'}}
<div class="col-span-1">น.ส.ศรีไพ คชา</div> </div>
<div class="col-span-1"> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage" class="ti-switch"> {{appraisalCompentency2.data.apsapprove4.thFullName}}</div>
<label for="hs-basic-usage" class="sr-only">อนุมัติ</label> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200 pointer-events-none"
[checked]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove4Status=='2'">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div>
<div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[class.!bg-input-readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='4'||!employee.evaluate"
[readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='4'||!employee.evaluate"
[(ngModel)]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove4Comment"></textarea>
<span class="pt-2">
วันที่ :
{{convertDate(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove4Date)}}
</span>
</div>
</div> </div>
<div class="col-span-2"> <div class="py-2 grid grid-cols-7 gap-3" *ngIf="appraisalCompentency2.data.apsapprove5.employeeId">
<textarea type="text" rows="2" class="ti-form-input mb-2" value="ใส่ Comment ที่นี่"></textarea> <div class="col-span-1">
<span> ผู้อนุมัติ
วันที่ : </div>
</span> <div class="col-span-1">
{{appraisalCompentency2.data.apsapprove5.thFullName}}</div>
<div class="col-span-1">
<input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200 pointer-events-none"
[checked]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove5Status=='2'">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div>
<div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[class.!bg-input-readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='5'||!employee.evaluate"
[readonly]="!appraisalCompentency2.data||appraisalCompentency2.data.currentStep!='5'||!employee.evaluate"
[(ngModel)]="appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove5Comment"></textarea>
<span class="pt-2">
วันที่ :
{{convertDate(appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove5Date)}}
</span>
</div>
</div> </div>
</div> </div>
</div>
<div class="flex justify-center mb-1rem pb-2rem"> <div class="flex justify-center mb-1rem pb-2rem" *ngIf="employee.evaluate">
<button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="saveDraft()"> <button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="saveDraft()">
บันทึกร่าง บันทึกร่าง
</button> </button>
<button type="submit" class="ti-btn ti-btn-success mx-2rem"> <button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="save()">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
</div> </div>
</ng-template> </ng-container>
</ng-template> -->
\ No newline at end of file
import { ChangeDetectorRef, Component, EventEmitter, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';
import { AppraisalCompentencyModel2 } from 'src/app/shared/model/appraisal-competency.model';
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
import { SettingAssessmentService } from 'src/app/shared/services/setting-assessment.service';
import Swal from 'sweetalert2';
@Component({
selector: 'app-evaluation',
templateUrl: './evaluation.component.html',
styleUrls: ['./evaluation.component.scss']
})
export class EvaluationComponent implements OnInit {
appraisalCompentency2: { loading: boolean, data?: AppraisalCompentencyModel2 } = { loading: false, data: undefined }
evaluationRoundId = ""
employeeId = ""
typeId = ""
constructor(private appraisalService: AppraisalService,
private employeeService: EmployeeService,
private cdr: ChangeDetectorRef,
private settingAssessmentService: SettingAssessmentService
) {
}
ngOnInit(): void {
// this.getEvaluatee()
// this.getAppraisalCompentencyList()
// this.getSettingList()
}
getAppraisalCompentencyForm(typeId: string) {
// this.appraisalCompentency2.loading = true
// const evaluationRoundId = this.appraisalCompentency.select?.masfromEvaluationRound.evaluationRoundId || "test1"
// if (evaluationRoundId || this.byBoss) {
// this.appraisalService.getFormCompentencyById(this.evaluationRoundId, employeeId, typeId).subscribe({
// next: response => {
// this.appraisalCompentency2.data = JSON.parse(JSON.stringify(response))
// if (this.appraisalCompentency2.data?.masfromEvaluationAssessment1lList[0]) {
// switch (this.appraisalCompentency2.data?.currentStep) {
// case ("0"): {
// this.appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsassessyDate = this.currentDate.toISOString().split('T')[0];
// this.employee.evaluate = this.employee.data.employeeId == this.appraisalCompentency2.data.apsassessy.employeeId
// break
// }
// case ("1"): {
// this.appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove1Date = this.currentDate.toISOString().split('T')[0];
// this.employee.evaluate = this.employee.data.employeeId == this.appraisalCompentency2.data.apsapprove1.employeeId
// break
// }
// case ("2"): {
// this.appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove2Date = this.currentDate.toISOString().split('T')[0];
// this.employee.evaluate = this.employee.data.employeeId == this.appraisalCompentency2.data.apsapprove2.employeeId
// break
// }
// case ("3"): {
// this.appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove3Date = this.currentDate.toISOString().split('T')[0];
// this.employee.evaluate = this.employee.data.employeeId == this.appraisalCompentency2.data.apsapprove3.employeeId
// break
// }
// case ("4"): {
// this.appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove4Date = this.currentDate.toISOString().split('T')[0];
// this.employee.evaluate = this.employee.data.employeeId == this.appraisalCompentency2.data.apsapprove4.employeeId
// break
// }
// case ("5"): {
// this.appraisalCompentency2.data.masfromEvaluationAssessment1lList[0].apsapprove5Date = this.currentDate.toISOString().split('T')[0];
// this.employee.evaluate = this.employee.data.employeeId == this.appraisalCompentency2.data.apsapprove5.employeeId
// break
// }
// default: { return }
// }
// }
// this.calnumberCheck()
// this.appraisalCompentency2.loading = false
// this.cdr.detectChanges()
// }, error: error => {
// this.appraisalCompentency2.loading = false
// this.cdr.detectChanges()
// }
// })
// }
}
}
...@@ -9,18 +9,8 @@ ...@@ -9,18 +9,8 @@
<div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem" *ngIf="!byBoss"> <div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem" *ngIf="!byBoss">
ประเมินผลประจำปี {{currentDate.getFullYear()}} ประเมินผลประจำปี {{currentDate.getFullYear()}}
</div> </div>
<div class="flex pt-2rem px-2rem" *ngIf="byBoss">
<button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
(click)="returnPageEvalution()">
<i class="ti ti-chevron-left"></i>
ย้อนกลับ
</button>
<div class="font-size-18px font-weight-700 align-center text-primary pl-1rem">
ประเมินผลประจำปี {{currentDate.getFullYear()}}
</div>
</div>
<div class="pt-0.75rem"> <div class="pt-0.75rem">
<div class="border-b border-gray-200 dark:border-white/10 px-2rem"> <div class=" px-2rem" [ngClass]="{'border-gray-200 border-b': appraisalCompentency.dataList.length}">
<nav class=" flex space-x-2 rtl:space-x-reverse"> <nav class=" flex space-x-2 rtl:space-x-reverse">
<a *ngFor="let item of appraisalCompentency.dataList; let i=index ; let f= first" <a *ngFor="let item of appraisalCompentency.dataList; let i=index ; let f= first"
class="border justify-center rounded-top-4px hs-tab-active:!bg-primary hs-tab-active:text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center hover:text-gray-900" class="border justify-center rounded-top-4px hs-tab-active:!bg-primary hs-tab-active:text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center hover:text-gray-900"
...@@ -31,7 +21,7 @@ ...@@ -31,7 +21,7 @@
</a> </a>
</nav> </nav>
</div> </div>
<div class="pt-50px"> <div class="pt-50px" *ngIf="appraisalCompentency.dataList.length">
<div *ngFor="let item of appraisalCompentency.dataList; let i=index" [id]="'underline-'+(i+1)" <div *ngFor="let item of appraisalCompentency.dataList; let i=index" [id]="'underline-'+(i+1)"
role="tabpanel"> role="tabpanel">
<div class="pb-2"> <div class="pb-2">
...@@ -127,9 +117,8 @@ ...@@ -127,9 +117,8 @@
{{masfromEvaluationAssessment1.masfromStatusType.tdesc}} {{masfromEvaluationAssessment1.masfromStatusType.tdesc}}
</td> </td>
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
<span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer" <span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer" (click)="getAppraisalCompentencyForm(masfromEvaluationAssessment1.competencyType.competencyTypeId);currentTemplate = selfEvaluationEdit ;
(click)="getAppraisalCompentencyForm(masfromEvaluationAssessment1.competencyType.competencyTypeId);currentTemplate = selfEvaluationEdit ; pathTitle = ['การประเมินผล', 'ประเมินตนเอง','ประเมินผล']">
pathTitle = byBoss?['การประเมินผล','ประเมินโดยหัวหน้า','ประเมินลูกน้อง', 'ประเมินผล']:['การประเมินผล', 'ประเมินตนเอง','ประเมินผล']">
ประเมิน ประเมิน
</span> </span>
</td> </td>
...@@ -217,7 +206,7 @@ ...@@ -217,7 +206,7 @@
<div class="flex"> <div class="flex">
<button type="button" <button type="button"
class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
(click)="currentTemplate = selfEvaluation ; pathTitle = byBoss?['การประเมินผล','ประเมินโดยหัวหน้า','ประเมินลูกน้อง']:['การประเมินผล', 'ประเมินตนเอง']"> (click)="returnPath()">
<i class="ti ti-chevron-left"></i> <i class="ti ti-chevron-left"></i>
ย้อนกลับ ย้อนกลับ
</button> </button>
......
...@@ -35,7 +35,6 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -35,7 +35,6 @@ export class SelfEvaluationComponent implements OnInit {
@ViewChild('selfEvaluation', { static: true }) selfEvaluation!: TemplateRef<any>; @ViewChild('selfEvaluation', { static: true }) selfEvaluation!: TemplateRef<any>;
@ViewChild('selfEvaluationEdit', { static: true }) selfEvaluationEdit!: TemplateRef<any>; @ViewChild('selfEvaluationEdit', { static: true }) selfEvaluationEdit!: TemplateRef<any>;
currentTemplate: TemplateRef<any> = this.selfEvaluation currentTemplate: TemplateRef<any> = this.selfEvaluation
appraisalCompentency: { loading: boolean, select?: AppraisalCompentencyModel, dataList: AppraisalCompentencyModel[] } = { loading: false, select: undefined, dataList: [] } appraisalCompentency: { loading: boolean, select?: AppraisalCompentencyModel, dataList: AppraisalCompentencyModel[] } = { loading: false, select: undefined, dataList: [] }
appraisalCompentency2: { loading: boolean, data?: AppraisalCompentencyModel2 } = { loading: false, data: undefined } appraisalCompentency2: { loading: boolean, data?: AppraisalCompentencyModel2 } = { loading: false, data: undefined }
appraisalPms: { loading: boolean, select: undefined, dataList: { check: boolean, data: undefined }[] } = { loading: false, select: undefined, dataList: [] } appraisalPms: { loading: boolean, select: undefined, dataList: { check: boolean, data: undefined }[] } = { loading: false, select: undefined, dataList: [] }
...@@ -55,9 +54,6 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -55,9 +54,6 @@ export class SelfEvaluationComponent implements OnInit {
this.getEvaluatee() this.getEvaluatee()
this.getAppraisalCompentencyList() this.getAppraisalCompentencyList()
this.getSettingList() this.getSettingList()
if (this.pathTitle.find(x => ['การประเมินผล', 'ประเมินโดยหัวหน้า'].includes(x))) {
this.returnPageTitle()
}
} }
returnPageTitle() { returnPageTitle() {
...@@ -86,6 +82,11 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -86,6 +82,11 @@ export class SelfEvaluationComponent implements OnInit {
this.employeeService.getWorkingById(this.employeeId).subscribe({ this.employeeService.getWorkingById(this.employeeId).subscribe({
next: response => { next: response => {
this.evaluatee.data = new MyEmployeeModel(response) this.evaluatee.data = new MyEmployeeModel(response)
if (this.byBoss) {
this.currentTemplate = this.selfEvaluationEdit
this.returnPageTitle()
this.getAppraisalCompentencyForm("02")
}
this.evaluatee.loading = false this.evaluatee.loading = false
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
...@@ -131,8 +132,9 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -131,8 +132,9 @@ export class SelfEvaluationComponent implements OnInit {
} }
getAppraisalCompentencyForm(typeId: string) { getAppraisalCompentencyForm(typeId: string) {
this.appraisalCompentency2.loading = true this.appraisalCompentency2.loading = true
if (this.appraisalCompentency.select) { const evaluationRoundId = this.appraisalCompentency.select?.masfromEvaluationRound.evaluationRoundId || "test1"
this.appraisalService.getFormCompentencyById(this.appraisalCompentency.select.masfromEvaluationRound.evaluationRoundId, this.evaluatee.data.employeeId, typeId).subscribe({ if (evaluationRoundId || this.byBoss) {
this.appraisalService.getFormCompentencyById(evaluationRoundId, this.evaluatee.data.employeeId, typeId).subscribe({
next: response => { next: response => {
this.appraisalCompentency2.data = JSON.parse(JSON.stringify(response)) this.appraisalCompentency2.data = JSON.parse(JSON.stringify(response))
if (this.appraisalCompentency2.data?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentency2.data?.masfromEvaluationAssessment1lList[0]) {
...@@ -169,7 +171,6 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -169,7 +171,6 @@ export class SelfEvaluationComponent implements OnInit {
} }
default: { return } default: { return }
} }
console.log(" 🐒 this.employee.evaluate:", this.employee.evaluate)
} }
this.calnumberCheck() this.calnumberCheck()
this.appraisalCompentency2.loading = false this.appraisalCompentency2.loading = false
...@@ -577,4 +578,13 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -577,4 +578,13 @@ export class SelfEvaluationComponent implements OnInit {
return "1"; return "1";
} }
} }
returnPath() {
if (this.byBoss) {
this.returnPageEvalution()
} else {
this.currentTemplate = this.selfEvaluation;
this.pathTitle = ['การประเมินผล', 'ประเมินตนเอง']
}
}
} }
\ No newline at end of file
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({
selector: 'app-round-one',
templateUrl: './round-one.component.html',
styleUrls: ['./round-one.component.scss']
})
export class RoundOneComponent {
}
...@@ -6,14 +6,28 @@ ...@@ -6,14 +6,28 @@
<div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem"> <div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem">
ประเมินผลประจำปี {{currentDate.getFullYear()}} ประเมินผลประจำปี {{currentDate.getFullYear()}}
</div> </div>
<div class="pt-50px px-2rem pb-2rem"> <div class="pt-0.75rem">
<div class="header-title-type p-0"> <div class=" px-2rem" [ngClass]="{'border-gray-200 border-b': subordinate.dataListRound.length}">
<nav class=" flex space-x-2 rtl:space-x-reverse">
<a *ngFor="let item of subordinate.dataListRound; let i=index ; let f= first"
class="border justify-center rounded-top-4px hs-tab-active:!bg-primary hs-tab-active:text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center hover:text-gray-900"
[class.active]="f" href="javascript:void(0);" id="card-type-item-1"
[attr.data-hs-tab]="'#underline-'+(i+1)" aria-controls="underline-1"
(click)="selectDataListRound(item)">
รอบการประเมินที่ {{i+1}}/{{subordinate.dataListRound.length}}
</a>
</nav>
</div>
</div>
<div class="pt-50px pb-2rem" *ngIf="subordinate.dataListRound.length">
<div class="header-title-type p-0 px-2rem">
<div class="flex justify-end"> <div class="flex justify-end">
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" style="height: 40px;"> placeholder="Search by No. or Name" style="height: 40px;" [(ngModel)]="search"
(ngModelChange)="searchChange()">
<div <div
class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"> class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
<i class="ri-search-line text-gray"></i> <i class="ri-search-line text-gray"></i>
...@@ -33,62 +47,144 @@ ...@@ -33,62 +47,144 @@
ประเมินสมรรถนะ ประเมินสมรรถนะ
</div> </div>
</div> </div>
<div class="overflow-auto table-bordered rounded-t-md"> <div class=" px-2rem">
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1"> <div class="overflow-auto table-bordered rounded-t-md">
<div class="overflow-auto shadow-md"> <div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover"> <div class="overflow-auto shadow-md">
<thead> <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
<tr> <thead>
<ng-container <tr>
*ngFor="let item of ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','ผลประเมิน','เกรด','สถานะ','สถานะผู้ประเมิน']; let f = first; let l = last; let i = index"> <ng-container
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" *ngFor="let item of ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','PMS','ผลประเมิน','เกรด','สถานะ','สถานะผู้ประเมิน']; let f = first; let l = last; let i = index">
[class.!text-center]="f||l||'ประเมิน'||'เเผนพัฒนา'||'PMS'"> <th scope="col"
<span class="text-sm">{{ item }}</span> class="relative px-10px py-10px bg-soft-secondary text-primary"
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" [class.!text-center]="f||l||'ประเมิน'||'เเผนพัฒนา'||'PMS'">
*ngIf="!l&&!f&&!i"> <span class="text-sm">{{ item }}</span>
<svg class="head-table-icon" xmlns="http://www.w3.org/2000/svg" <div class="absolute top-1/2 transform -translate-y-1/2 right-0"
width="50" height="16" fill="currentColor" viewBox="0 0 16 16"> *ngIf="!l&&!f&&!i">
<path <svg class="head-table-icon" xmlns="http://www.w3.org/2000/svg"
d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"> width="50" height="16" fill="currentColor" viewBox="0 0 16 16">
</path> <path
</svg> d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z">
</path>
</svg>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody *ngIf="subordinate.loading">
<tr>
<td class="text-center" colspan="100%">
<div *ngFor="let item of [1,2,3]"
class="ti-spinner w-8 h-8 text-secondary mx-1" role="status"
aria-label="loading">
<span class="sr-only">Loading...</span>
</div> </div>
</th> </td>
</ng-container> </tr>
</tr> </tbody>
</thead> <tbody *ngIf="!subordinate.loading&&!subordinateFilter().length">
<tbody> <tr>
<tr *ngFor="let item of subordinateFilter();let i = index"> <td class="text-center" colspan="100%">
<td class="text-center" style="font-size: 12px; width: 150px;"> ไม่พบข้อมูล
{{item.apsassessy.employeeId}} </td>
</td> </tr>
<td style="font-size: 12px; width: 175px;"> </tbody>
{{item.apsassessy.thFullName}} <tbody *ngIf="!subordinate.loading&&subordinateFilter().length">
</td> <tr *ngFor="let item of subordinateFilter();let i = index">
<td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td> <td class="text-center" style="font-size: 12px; width: 150px;">
<td class="text-center"> {{item.apsassessy.employeeId}}
<button type="button" class="ti-btn rounded-sm ti-btn-soft-success" </td>
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;" <td style="font-size: 12px; width: 175px;">
(click)="selectSubordinate(item);pageEvalution='evaluation'"> {{item.apsassessy.thFullName}}
ประเมิน </td>
</button> <td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
</td> <td class="text-center">
<td class="text-center"> <div class="flex">
<button type="button" class="ti-btn rounded-sm ti-btn-soft-dark" <button type="button" class="ti-btn rounded-sm ti-btn-soft-success"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"> style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
IDP (click)="selectSubordinate(item);pageEvalution='evaluation'">
</button> PC
</td> </button>
<td class="text-center" style="font-size: 12px;">{{item.sumScore}}</td> <button type="button" class="ti-btn rounded-sm ti-btn-soft-secondary"
<td class="text-center" style="font-size: 12px;">{{item.gread}}</td> style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
<td class="text-center" style="font-size: 12px;">{{item.masfromStatusType.tdesc}} (click)="selectSubordinate(item);pageEvalution='evaluation'">
</td> MC
<td class="text-center" style="font-size: 12px;">{{item.apsapproveType.tdesc}}</td> </button>
</tr> <button type="button" class="ti-btn rounded-sm ti-btn-soft-danger"
</tbody> style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
</table> (click)="selectSubordinate(item);pageEvalution='evaluation'">
CC
</button>
</div>
</td>
<td class="text-center">
<button type="button" class="ti-btn rounded-sm ti-btn-soft-dark"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;">
IDP
</button>
</td>
<td class="text-center">
<button type="button" class="ti-btn rounded-sm ti-btn-soft-success"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(click)="selectSubordinate(item);pageEvalution='evaluation'">
ประเมิน
</button>
</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>
</table>
</div>
</div> </div>
</div> </div>
<nav class="pagination-style-3 my-5" *ngIf="page.length">
<ul class="ti-pagination">
<li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);"
(click)="currentPage = (currentPage-1 || 1)">
<i class="ri-arrow-left-s-line align-middle rtl:rotate-180"></i>
</a>
</li>
<li *ngFor="let item of page;let f = first;let l = last">
<ng-container *ngIf="item==3&&currentPage!=1&&currentPage!=2&&currentPage!=3">
<a aria-label="anchor" class="page-link" href="javascript:void(0);"><i
class="ri-more-line"></i>
</a>
</ng-container>
<ng-container *ngIf="(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)">
<a class="page-link" href="javascript:void(0);" [class.active]="item==currentPage"
(click)="currentPage=item">{{item}}
</a>
</ng-container>
<ng-container
*ngIf="item==page.length-2&&currentPage!=page.length&&currentPage!=page.length-1&&currentPage!=page.length-2">
<a aria-label="anchor" class="page-link" href="javascript:void(0);"><i
class="ri-more-line"></i>
</a>
</ng-container>
</li>
<li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);"
(click)="currentPage = (currentPage > page.length-1 ? currentPage: currentPage+1 )">
<i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i>
</a>
</li>
</ul>
<ul class="nav-tabs mt-3">
<span>Show {{((currentPage-1) * 10)+1}} to {{subordinateFilter().length<10
?subordinateFilter().length: (currentPage==page.length ? ((currentPage * 10) -
((currentPage * 10) - subordinateFilter().length) ) :(currentPage * 10) ) }} of
{{subordinateFilter().length}} items</span>
</ul>
</nav>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -11,8 +11,10 @@ export class SupervisorEvaluationComponent { ...@@ -11,8 +11,10 @@ export class SupervisorEvaluationComponent {
pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า'] pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']
pageEvalution = '' pageEvalution = ''
currentDate = new Date() currentDate = new Date()
subordinate: { loading: false, select: AppraisalSubordinateModel, dataList: AppraisalSubordinateModel[] } = { loading: false, select: new MyAppraisalSubordinateModel(), dataList: [] } subordinate: { loading: false, select: AppraisalSubordinateModel, dataList: AppraisalSubordinateModel[], dataListRound: AppraisalSubordinateModel[][] } = { loading: false, select: new MyAppraisalSubordinateModel(), dataListRound: [], dataList: [] }
search = "" search = ""
currentPage = 1
page = Array.from({ length: 1 }, (_, i) => i + 1);
constructor(private appraisalService: AppraisalService, constructor(private appraisalService: AppraisalService,
private cdr: ChangeDetectorRef) { private cdr: ChangeDetectorRef) {
} }
...@@ -22,7 +24,9 @@ export class SupervisorEvaluationComponent { ...@@ -22,7 +24,9 @@ export class SupervisorEvaluationComponent {
getBossList() { getBossList() {
this.appraisalService.getBossList().subscribe({ this.appraisalService.getBossList().subscribe({
next: response => { next: response => {
this.subordinate.dataList = response.map(x => new MyAppraisalSubordinateModel(x)) this.subordinate.dataListRound = [response.map(x => new MyAppraisalSubordinateModel(x))]
this.subordinate.dataList = this.subordinate.dataListRound.map(x => x.map(y => new MyAppraisalSubordinateModel(y)))?.[0] || []
this.searchChange()
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
this.cdr.detectChanges() this.cdr.detectChanges()
...@@ -34,8 +38,17 @@ export class SupervisorEvaluationComponent { ...@@ -34,8 +38,17 @@ export class SupervisorEvaluationComponent {
return x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase()) return x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase())
}) })
} }
searchChange() {
this.currentPage = 1
this.page = Array.from({ length: Math.ceil(this.subordinateFilter().length / 10) }, (_, i) => i + 1);
}
selectSubordinate(data: AppraisalSubordinateModel) { selectSubordinate(data: AppraisalSubordinateModel) {
this.subordinate.select = new MyAppraisalSubordinateModel(data) this.subordinate.select = new MyAppraisalSubordinateModel(data)
this.cdr.detectChanges() this.cdr.detectChanges()
} }
selectDataListRound(data: AppraisalSubordinateModel[]) {
this.subordinate.dataList = data.map(x => new MyAppraisalSubordinateModel(x))
this.searchChange()
this.cdr.detectChanges()
}
} }
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</table> </table>
</div> </div>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
......
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="modal.page.length"> <nav class="pagination-style-3 my-5" *ngIf="modal.page.length">
<ul class="ti-pagination"> <ul class="ti-pagination">
<li> <li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" <a aria-label="anchor" class="page-link" href="javascript:void(0);"
......
...@@ -159,7 +159,7 @@ export class AssessmentTopicsComponent { ...@@ -159,7 +159,7 @@ export class AssessmentTopicsComponent {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.pmstopic.loading = true this.pmstopic.loading = true
this.fileService.uploadExcel(formData, '').subscribe({ this.fileService.uploadExcel(formData, 'PMS_TOPIC').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -178,7 +178,7 @@ export class AssessmentTopicsComponent { ...@@ -178,7 +178,7 @@ export class AssessmentTopicsComponent {
} }
downloadFile() { downloadFile() {
const fileName = '.xlsx' const fileName = 'IMPORT_PMS_TOPIC.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
......
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