Commit 157df7d3 by Nattana Chaiyamat

แก้หน้าประเมิน

parent 1e2750f6
......@@ -43,6 +43,8 @@ import { DayTypeRegistryComponent } from '../company-components/day-type-registr
import { TimeAttendanceComponent } from '../performance-management-evaluation/time-attendance/time-attendance.component';
import { RolePermissionConfigComponent } from '../company-components/account-settings/role-permission-config/role-permission-config.component';
import { PmsFormEmployeeComponent } from '../performance-evaluation/pms-form-employee/pms-form-employee.component';
import { EmployeeSelfServiceComponent } from '../employee-self-service/employee-self-service.component';
import { MySkillXModuleComponent } from '../my-skill-x-module/my-skill-x-module.component';
......@@ -94,7 +96,9 @@ const routes: Routes = [
{ path: "self-evaluation", title: 'ประเมินตนเอง', component: SelfEvaluationComponent },
{ path: "day-type-registry", title: 'ประเมินตนเอง', component: DayTypeRegistryComponent },
{ path: "time-attendance", title: 'ทะเบียนการประเมินเวลาทำงาน', component: TimeAttendanceComponent },
{ path: "role-permission-config", title: 'กำหนดสิทธิการเข้าใช้งาน', component: RolePermissionConfigComponent }
{ path: "role-permission-config", title: 'กำหนดสิทธิการเข้าใช้งาน', component: RolePermissionConfigComponent },
{ path: "employee-self-service", title: 'employee-self-service', component: EmployeeSelfServiceComponent },
{ path: "my-skill-x-module", title: 'my-skill-x-module', component: MySkillXModuleComponent }
]
}
];
......
......@@ -176,6 +176,8 @@ import { PmsKpiComponent } from '../performance-evaluation/pms-form-employee/pms
import { PmsIdpComponent } from '../performance-evaluation/pms-form-employee/pms-idp/pms-idp.component';
import { PmsSummaryComponent } from '../performance-evaluation/pms-form-employee/pms-summary/pms-summary.component';
import { BarRatingModule } from 'ngx-bar-rating';
import { EmployeeSelfServiceComponent } from '../employee-self-service/employee-self-service.component';
import { MySkillXModuleComponent } from '../my-skill-x-module/my-skill-x-module.component';
export const MY_DATE_FORMATS = {
parse: {
......@@ -309,7 +311,9 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsCompetencyComponent,
PmsKpiComponent,
PmsIdpComponent,
PmsSummaryComponent
PmsSummaryComponent,
EmployeeSelfServiceComponent,
MySkillXModuleComponent
],
imports: [
CommonModule,
......
import { Component, EventEmitter, Input, Output } from '@angular/core';
@Component({
selector: 'app-employee-self-service',
templateUrl: './employee-self-service.component.html',
styleUrls: ['./employee-self-service.component.scss']
})
export class EmployeeSelfServiceComponent {}
import { Component, EventEmitter, Input, Output } from '@angular/core';
@Component({
selector: 'app-my-skill-x-module',
templateUrl: './my-skill-x-module.component.html',
styleUrls: ['./my-skill-x-module.component.scss']
})
export class MySkillXModuleComponent {}
......@@ -3,7 +3,7 @@
<div class="flex flex-col">
<div class="flex flex-row py-2 gap-2 sticky" style="top:0;z-index:2;background: white;">
<ng-container *ngFor="let appraisalCompentency of appraisalCompentencyList ;let i=index">
<button type="button" class="flex justify-center !items-center border bg-white p-2 text-center"
<button type="button" class="flex justify-center !items-center border bg-white p-2 text-center font-semibold"
style="border-radius:20px;width: 100px"
(click)="getAppraisalCompentencyForm(i);currentPart=appraisalCompentency.comType"
[ngClass]="{'!bg-primary text-white':currentPart==appraisalCompentency.comType}">
......@@ -28,7 +28,8 @@
</div>
<div class="flex flex-col gap-2 relative" style="overflow-y: auto;min-height: calc(100vh - 480px);">
<ng-container *ngFor="let item2 of appraisalCompentencyFilter();let i = index;let f= first">
<button type="button" [attr.id]="'menu-' + i" class="p-4 w-full bg-secondary text-white text-left"
<button type="button" [attr.id]="'menu-' + i"
class="p-4 w-full text-white text-left bg-gradient-to-r from-primary to-secondary font-semibold"
style="border-radius:20px"
(click)="scrollToMenu(i);
allBiOpen(!biOpen.get(item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId),item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId)">
......@@ -103,26 +104,29 @@
*ngFor="let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first">
<tr class="border-b border-gray-200">
<td class="py-2" style="vertical-align: top">{{bi.behavioralIndicators}}</td>
<td class="py-2 text-center" style="vertical-align: top">{{bi.assessmentId}}</td>
<td class="py-2 text-center text-indigo-600 font-semibold" style="vertical-align: top">
{{bi.assessmentId}}</td>
<td class="py-2 text-center" style="vertical-align: top">
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
<button type="button" class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white"
style="border-radius:10px"
(mouseenter)="biScore.set(bi.behavioralIndicators+bi.assessmentId,item)"
(mouseleave)="biScore.clear()"
(click)="bi.competencyBehavioral.scoreTopicExpectation=item;calnumberCheck()" [ngClass]="{'!border-secondary !text-secondary':bi.competencyBehavioral.scoreTopicExpectation>=item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>=item,
(click)="bi.competencyBehavioral.scoreTopicExpectation=item;calnumberCheck()" [ngClass]="{
'!border-secondary': bi.competencyBehavioral.scoreTopicExpectation>=item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>=item ,
'!text-indigo-600':bi.competencyBehavioral.scoreTopicExpectation>item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>item,
'!text-white !bg-secondary': bi.competencyBehavioral.scoreTopicExpectation==item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)==item ,
'pointer-events-none':!canEdit}">
{{item}}
</button>
</ng-container>
</div>
<div class="flex justify-center" style="height: 20px;white-space: nowrap; overflow: visible">
<span *ngIf="biScore.get(bi.behavioralIndicators+bi.assessmentId)" class="text-secondary">
<span *ngIf="biScore.get(bi.behavioralIndicators+bi.assessmentId)" class="text-indigo-600">
{{scoreDescriptions[(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)] }}
</span>
<span *ngIf="!biScore.get(bi.behavioralIndicators+bi.assessmentId)" class="text-secondary">
<span *ngIf="!biScore.get(bi.behavioralIndicators+bi.assessmentId)" class="text-indigo-600">
{{scoreDescriptions[bi.competencyBehavioral.scoreTopicExpectation] }}
</span>
</div>
......@@ -134,7 +138,8 @@
</ng-container>
</ng-container>
<button *ngIf="appraisalCompentencyFilter().length" [attr.id]="'menu-' + appraisalCompentencyFilter().length"
type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
type="button" class="p-4 w-full text-white text-left bg-gradient-to-r from-primary to-secondary font-semibold"
style=" border-radius:20px"
(click)="scrollToMenu(appraisalCompentencyFilter().length);allBiOpen(!biOpen.get('สรุป'),'สรุป')">
<span style="padding-left:50px">
สรุป
......@@ -147,7 +152,8 @@
<ng-container *ngIf="biOpen.get('สรุป')">
<div class="pb-1rem px-2rem">
<div class="py-2 grid grid-cols-11">
<div class="col-span-8">ระดับความสามารถ (Target Degree)</div>
<div class="col-span-8" style="font-size: 1rem;font-weight: 500; border-radius:20px">ระดับความสามารถ (Target
Degree)</div>
<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]">{{item}}</div>
</div>
......@@ -189,17 +195,19 @@
</div>
</div>
<div class="py-2 grid grid-cols-11">
<div class="col-span-8">คะแนนรวมหลังถ่วงน้ำหนัก</div>
<div class="col-span-8 font-semibold" style=" border-radius:20px">คะแนนรวมหลังถ่วงน้ำหนัก
</div>
<div class="col-span-3 grid grid-cols-5">
<div class="col-span-5 text-center">
<div class="col-span-5 text-center text-indigo-600 font-semibold">
{{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal)}}
</div>
</div>
</div>
<div class="py-2 grid grid-cols-11">
<div class="col-span-8">คะแนนเฉลี่ยคิดเป็น</div>
<div class="col-span-8 font-semibold" style=" border-radius:20px">คะแนนเฉลี่ยคิดเป็น
</div>
<div class="col-span-3 grid grid-cols-5">
<div class="col-span-5 text-center">
<div class="col-span-5 text-center text-indigo-600 font-semibold">
{{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}}
</div>
</div>
......@@ -239,10 +247,10 @@
<span>{{item2}} </span><br>
</div>
</td>
<td class="align-start text-center">
<td class="align-start text-center text-indigo-600 font-semibold">
{{calAverage(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}}
</td>
<td class="align-start text-center">
<td class="align-start text-center text-indigo-600 font-semibold">
{{calGap(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}}
</td>
</tr>
......
......@@ -8,7 +8,7 @@
<div class="font-size-18px font-weight-700 text-primary">
<div class="absolute " style="transform:translateY(-9px)">
<button type="button" *ngIf="evaluationForm=='sup'"
class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500 bg-white"
class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md hover:shadow-xl transition text-blue-500 bg-white"
(click)="returnPath()">
<i class="ti ti-chevron-left"></i>
ย้อนกลับ
......@@ -45,9 +45,23 @@
<div class="flex flex-col gap-2 w-1/4" [class.hidden]="menuClose.get('ข้อมูลรายละเอียด')">
<div class="flex flex-col gap-2" style="height:calc(100vh - 177px);overflow-y: auto;">
<div class="w-full" *ngIf="kpiScorePart.length > 0">
<div class="box m-0" style="border-radius:20px">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-body py-2">
<div class="flex flex-row gap-2"
<div class="flex flex-col items-center gap-3">
<img [src]="evaluationForm=='sup' ? './assets/img/users/woman2.png' : './assets/img/users/man.PNG'"
class="h-24 w-24 rounded-full ring-4 ring-primary object-cover" alt="profile-img" />
<ng-container *ngIf="kpiScorePart[kpiScorePart.length-1].score as grade">
<div class="flex gap-1">
<ng-container *ngFor="let s of [1,2,3,4,5]">
<i class="ti text-xl"
[ngClass]="s <= gradeStar(grade) ? 'ti-star-filled text-yellow-400' : 'ti-star text-gray-300'">
</i>
</ng-container>
</div>
<span class="text-sm font-semibold text-gray-700">GRADE: {{ grade }}</span>
</ng-container>
</div>
<!-- <div class="flex flex-row gap-2"
[ngStyle]="{'justify-content':kpiScorePart[kpiScorePart.length-1].score?'space-between':'center'}">
<div
[ngClass]="{'w-full': !kpiScorePart[kpiScorePart.length-1].score,'w-1/2':kpiScorePart[kpiScorePart.length-1].score}">
......@@ -68,12 +82,12 @@
kpiScorePart[kpiScorePart.length-1].score) : ''}}
</div>
</div>
</div>
</div> -->
</div>
</div>
</div>
<div class="w-full">
<div class="box m-0" style="border-radius:20px">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('ข้อมูลพนักงาน')">
<div class="flex justify-between">
<h5 class="box-title align-center">ข้อมูลพนักงาน</h5>
......@@ -91,49 +105,51 @@
<table class="ti-custom-table border-0 ellipsis-text">
<tbody>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">รหัสพนักงาน</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">รหัสพนักงาน
</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start">
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.employeeId}}
</td>
</tr>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">ชื่อ - สกุล</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">ชื่อ - สกุล
</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start">
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.thFullName}}
</td>
</tr>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">ตำเเหน่ง</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">ตำเเหน่ง</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.position.tdesc}}
</td>
</tr>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">ฝ่าย</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">ฝ่าย</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.bu1.tdesc}}
</td>
</tr>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">แผนก</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">แผนก</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.bu2.tdesc}}
</td>
</tr>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">ระดับ</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">ระดับ</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.pl.tdesc}}
</td>
</tr>
<tr class="!border-0">
<td class="font-medium !p-2 align-start">E-mail</td>
<td class="!p-2 align-start" style="font-size: 1rem;font-weight: 500;color:black;">E-mail</td>
<td class="!p-2 align-start">:</td>
<td class="font-medium !p-2 align-start !text-warp">
{{evaluatee.data.email}}
......@@ -145,7 +161,7 @@
</div>
</div>
<div class="w-full" *ngIf="currentTap=='แบบประเมินสมรรถนะ'">
<div class="box m-0" style="border-radius:20px">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ')">
<div class="flex justify-between">
<h5 class="box-title align-center">ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ</h5>
......@@ -180,7 +196,8 @@
คะแนนเฉลี่ย
</div>
<div class="flex-1 flex justify-center items-center">
<div class="w-3/4 border border-secondary text-center align-center"
<div
class="w-3/4 border border-secondary text-center align-center text-indigo-600 font-semibold"
style="border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;">
{{compentencyWeightScore}}
</div>
......@@ -189,7 +206,8 @@
ผล Gap
</div>
<div class="flex-1 flex justify-center items-center">
<div class="w-3/4 border border-secondary text-center align-center"
<div
class="w-3/4 border border-secondary text-center align-center text-indigo-600 font-semibold"
style="border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;">
{{compentencyGap}}
</div>
......@@ -201,7 +219,7 @@
</div>
</div>
<div class="w-full" *ngIf="currentTap=='ประเมินผลการปฏิบัติงาน'||currentTap=='สรุปคะแนนและข้อเสนอแนะ'">
<div class="box m-0" style="border-radius:20px">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('สรุปผลประเมิน')">
<div class="flex justify-between">
<h5 class="box-title align-center">สรุปผลประเมิน</h5>
......@@ -215,8 +233,8 @@
(click)="menuClose.set('สรุปผลประเมิน',true)"></i>
</div>
</div>
<div class="box-body py-2" [class.hidden]="menuClose.get('สรุปผลประเมิน')">
<div class='flex flex-row gap-2'>
<div class="box-body py-2 flex flex-col gap-6 " [class.hidden]="menuClose.get('สรุปผลประเมิน')">
<div class='flex-1 flex flex-row gap-2'>
<div class="flex-1 flex flex-col gap-2">
<ng-container *ngFor="let item of kpiScorePart; let i=index">
<ng-container *ngIf="i<4 && i< kpiScorePart.length-2">
......@@ -231,19 +249,6 @@
</div>
</ng-container>
</ng-container>
<ng-container *ngFor="let item of kpiScorePart; let i=index">
<ng-container *ngIf="i >= kpiScorePart.length-2">
<div class="flex flex-row">
<div class="flex-1 font-size-18px font-weight-700" style="align-content:center">
{{item.text}}
</div>
<div class="flex-1 border border-secondary text-center align-center"
style="border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;">
{{item.score}}
</div>
</div>
</ng-container>
</ng-container>
</div>
<div class="flex-1 flex flex-col gap-2">
<ng-container *ngFor="let item of kpiScorePart; let i=index">
......@@ -260,42 +265,30 @@
</ng-container>
</ng-container>
</div>
<!-- <div class="w-1/2 flex flex-row gap-2">
<ng-container *ngFor="let item of kpiScorePart; let i=index">
<ng-container *ngIf="true">
<div class="flex-1 flex flex-col gap-2">
<div class="flex-1 w-1/2">
{{item.text}}
</div>
<div class="flex-1 w-1/2 border border-secondary text-center align-center"
style="border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;">
{{item.score}}
</div>
</div>
</ng-container>
</ng-container>
</div>
<div class="w-1/2 flex flex-row gap-2">
<div class='flex-1 flex flex-row gap-2'>
<ng-container *ngFor="let item of kpiScorePart; let i=index">
<ng-container *ngIf="true">
<ng-container *ngIf="i >= kpiScorePart.length-2">
<div class="flex-1 flex flex-col gap-2">
<div class="flex-1 w-1/2">
<div class="flex flex-row">
<div class="flex-1 font-size-18px font-weight-700" style="align-content:center">
{{item.text}}
</div>
<div class="flex-1 w-1/2 border border-secondary text-center align-center"
<div
class="flex-1 border border-secondary text-center align-center text-indigo-600 font-semibold"
style="border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;">
{{item.score}}
</div>
</div>
</div>
</ng-container>
</ng-container>
</div> -->
</div>
</div>
</div>
</div>
<div class="w-full" *ngIf="compentency.data">
<div class="box m-0" style="border-radius:20px">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('สถานะการประเมิน')">
<div class="flex justify-between">
<h5 class="box-title align-center">สถานะการประเมิน</h5>
......@@ -330,7 +323,7 @@
<div class="ltr:ml-5 rtl:mr-5 rounded-sm ltr:mr-auto rtl:ml-auto my-auto w-full space-y-3">
<div class="sm:flex">
<h3 class="text-start my-auto text-gray-500 " style="line-height: 1.5">
<p class="font-medium ">
<p style="font-size: 1rem;font-weight: 500;color:black">
{{assessmentStatusText(compentency.data.currentStep,i,returnField(compentency.data,apsEmp+'.status'))}}
</p>
<p class="font-medium ">
......@@ -355,7 +348,7 @@
</div>
</div>
<div class="w-full" *ngIf="commentAllFilter().length">
<div class="box m-0" style="border-radius:20px">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('Timeline')">
<div class="flex justify-between">
<h5 class="box-title align-center">Timeline</h5>
......@@ -387,7 +380,7 @@
<div class="ltr:ml-5 rtl:mr-5 rounded-sm ltr:mr-auto rtl:ml-auto my-auto w-full space-y-3">
<div class="w-full">
<h3 class="text-start my-auto text-gray-500 " style="line-height: 1.5">
<p class="font-medium" style="white-space: nowrap;">
<p style="font-size: 1rem;font-weight: 500;color:black;white-space: nowrap;">
{{statusCompetencyText(item.statusType)}}
</p>
<p class="font-medium">
......@@ -425,7 +418,7 @@
style="padding: 1px;font-size:27px;height:33px" (click)="menuClose.set('ข้อมูลรายละเอียด',false)"></i>
</div>
</div>
<div class="box m-0" style="border-radius:20px;">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px;">
<div class="box-header">
<div class="flex flex-row gap-2">
<ng-container
......@@ -487,7 +480,8 @@
[evaluaterId]="evaluaterId" [evaluateeId]="evaluateeId" [canEdit]="canEdit"
[currentStep]="compentency.data.currentStep" [dateIso]="dateIso"
(kpiFormRemain)="kpiFormRemain=$event" (scorePart)="kpiScorePart=$event"
(kpiForm)="compentency.data.pms=$event" (scrollToMenuId)="scrollToMenu($event)"></app-pms-kpi>
(kpiForm)="compentency.data.pms=$event" (scrollToMenuId)="scrollToMenu($event)"
[compentencyFormRemain]="compentencyFormRemain"></app-pms-kpi>
</div>
<div class="min-height: calc(100vh - 406px);" [class.hidden]="currentTap!='แผนพัฒนาบุคคลากร'">
<app-pms-idp [currentTap]="currentTap" [canSave]="canSave" [appraisalIdp]="compentency.data.idp"
......
<div class="flex flex-col gap-2 pt-2" style="overflow-y: auto;min-height: calc(100vh - 422px)">
<div class="flex">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
(click)="menuClose.set('Compentency',!menuClose.get('Compentency'))">
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px" (click)="menuClose.set('Compentency',!menuClose.get('Compentency'))">
รายละเอียดประเมินสมรรถนะ (Compentency)
</button>
</div>
......@@ -50,8 +51,9 @@
</table>
</ng-container>
<div class="flex" *ngIf="appraisalPms">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
(click)="menuClose.set('PMS',!menuClose.get('PMS'))">
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px" (click)="menuClose.set('PMS',!menuClose.get('PMS'))">
รายละเอียดประเมินผลการปฏิบัติงาน (PMS)
</button>
</div>
......
......@@ -5,7 +5,8 @@
<div class="flex flex-col">
<div class="flex py-2 flex-row gap-2 sticky" style="top:0;z-index:2;background: white;">
<ng-container *ngFor="let item of partShow;let i=index">
<button type="button" class="flex justify-center !items-center border bg-white p-1 text-center"
<button type="button"
class="flex justify-center !items-center border bg-white p-1 text-center font-semibold"
(click)="scrollToMenu(currentTap == 'ประเมินผลการปฏิบัติงาน'?('menu-part-'+(i+1)):('menu-part-'+(i+8)));currentPart=item;toggleAllParts(true,item)"
style="border-radius:20px;width: 100px"
[ngClass]="{'!bg-primary text-white':currentPart==item}">
......@@ -59,7 +60,9 @@
<ng-template #part1>
<div class="flex flex-col gap-2" [attr.id]="'menu-part-1'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-1');toggleAllParts(!partOpen.get('PART 1'),'PART 1');">
PART&nbsp;1&nbsp;:&nbsp;ประเมินผลการปฏิบัติงานตามนโยบายบริษัท&nbsp;(Corporate KPI)
</button>
......@@ -164,11 +167,14 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white"
style="border-radius:5px"
(mouseenter)="partScore.set(item.groupAssessment1.pmsTopic.pmsTopicId,item2)"
(mouseleave)="partScore.clear()"
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{'!border-secondary !text-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2,
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{
'!border-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2 ,
'!text-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation>item2:item.scoreTopicExpectationBoss>item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>item2,
'!text-white !bg-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation==item2:item.scoreTopicExpectationBoss==item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)==item2,
'pointer-events-none':!canEdit}">
{{item2}}
</button>
......@@ -176,7 +182,7 @@
</div>
<div class="flex justify-center"
style="height: 20px;white-space: nowrap; overflow: visible">
<span class="text-secondary">
<span class="text-indigo-600">
{{getTargetDetailValue(item)}}
</span>
</div>
......@@ -190,32 +196,37 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScore(appraisalPms?.part1Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScore(appraisalPms?.part1Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigth(appraisalPms?.part1Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigth(appraisalPms?.part1Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScore(appraisalPms?.part1Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScore(appraisalPms?.part1Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScore(appraisalPms?.part1Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part1Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part1Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScore(appraisalPms?.part1Detail),calRawScore(appraisalPms?.part1Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScore(appraisalPms?.part1Detail),calRawScore(appraisalPms?.part1Detail))}}</span>
</div>
</div>
</td>
......@@ -230,7 +241,9 @@
<ng-template #part2>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-2'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-2');toggleAllParts(!partOpen.get('PART 2'),'PART 2')">
PART&nbsp;2&nbsp;:&nbsp;ประเมินผลการปฏิบัติงานประจำ&nbsp;(Department KPI)
</button>
......@@ -335,11 +348,14 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white"
style="border-radius:5px"
(mouseenter)="partScore.set(item.groupAssessment1.pmsTopic.pmsTopicId,item2)"
(mouseleave)="partScore.clear()"
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{'!border-secondary !text-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2,
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{
'!border-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2 ,
'!text-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation>item2:item.scoreTopicExpectationBoss>item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>item2,
'!text-white !bg-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation==item2:item.scoreTopicExpectationBoss==item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)==item2,
'pointer-events-none':!canEdit}">
{{item2}}
</button>
......@@ -347,7 +363,7 @@
</div>
<div class="flex justify-center"
style="height: 20px;white-space: nowrap; overflow: visible">
<span class="text-secondary">
<span class="text-indigo-600">
{{getTargetDetailValue(item)}}
</span>
</div>
......@@ -361,32 +377,37 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScore(appraisalPms?.part2Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScore(appraisalPms?.part2Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigth(appraisalPms?.part2Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigth(appraisalPms?.part2Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScore(appraisalPms?.part2Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScore(appraisalPms?.part2Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScore(appraisalPms?.part2Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part2Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part2Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScore(appraisalPms?.part2Detail),calRawScore(appraisalPms?.part2Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScore(appraisalPms?.part2Detail),calRawScore(appraisalPms?.part2Detail))}}</span>
</div>
</div>
</td>
......@@ -401,7 +422,9 @@
<ng-template #part3>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-3'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-3');toggleAllParts(!partOpen.get('PART 3'),'PART 3')">
PART&nbsp;3&nbsp;:&nbsp;ประเมินผลการปฏิบัติงานประจำ&nbsp;(Individual KPI)
</button>
......@@ -506,11 +529,14 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
class="h-12 w-12 p-0 shadow border text-soft-secondary bg-white"
style="border-radius:5px"
(mouseenter)="partScore.set(item.groupAssessment1.pmsTopic.pmsTopicId,item2)"
(mouseleave)="partScore.clear()"
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{'!border-secondary !text-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2,
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{
'!border-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2 ,
'!text-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation>item2:item.scoreTopicExpectationBoss>item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>item2,
'!text-white !bg-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation==item2:item.scoreTopicExpectationBoss==item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)==item2,
'pointer-events-none':!canEdit}">
{{item2}}
</button>
......@@ -518,7 +544,7 @@
</div>
<div class="flex justify-center"
style="height: 20px;white-space: nowrap; overflow: visible">
<span class="text-secondary">
<span class="text-indigo-600">
{{getTargetDetailValue(item)}}
</span>
</div>
......@@ -532,32 +558,37 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScore(appraisalPms?.part3Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScore(appraisalPms?.part3Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigth(appraisalPms?.part3Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigth(appraisalPms?.part3Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScore(appraisalPms?.part3Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScore(appraisalPms?.part3Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScore(appraisalPms?.part3Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part3Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part3Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScore(appraisalPms?.part3Detail),calRawScore(appraisalPms?.part3Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScore(appraisalPms?.part3Detail),calRawScore(appraisalPms?.part3Detail))}}</span>
</div>
</div>
</td>
......@@ -572,7 +603,9 @@
<ng-template #part4>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-4'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-4');toggleAllParts(!partOpen.get('PART 4'),'PART 4')">
PART&nbsp;4&nbsp;:&nbsp;ประเมินผลสมรรถนะที่สนับสนุนการปฏิบัติงาน&nbsp;(Competency)
</button>
......@@ -598,15 +631,17 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white pointer-events-none"
style="border-radius:5px"
[ngClass]="{'!border-secondary !text-secondary':calAverage(item.averageScore)>=item2 }">
class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white pointer-events-none"
style="border-radius:5px" [ngClass]="{
'!border-secondary': calAverage(item.averageScore)>=item2 ,
'!text-secondary': calAverage(item.averageScore)>item2,
'!text-white !bg-secondary':calAverage(item.averageScore)==item2}">
{{item2}}
</button>
</ng-container>
</div>
<div style="height: 20px;">
<span class="text-secondary">
<span class="text-indigo-600">
<ng-container>
{{item.averageScore}}
</ng-container>
......@@ -621,32 +656,37 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="3">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScorePart4(appraisalPms?.part4Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScorePart4(appraisalPms?.part4Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigthPart4(appraisalPms?.part4Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigthPart4(appraisalPms?.part4Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScorePart4(appraisalPms?.part4Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScorePart4(appraisalPms?.part4Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScorePart4(appraisalPms?.part4Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="3">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part4Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part4Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScorePart4(appraisalPms?.part4Detail),calRawScorePart4(appraisalPms?.part4Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScorePart4(appraisalPms?.part4Detail),calRawScorePart4(appraisalPms?.part4Detail))}}</span>
</div>
</div>
</td>
......@@ -661,7 +701,9 @@
<ng-template #part5>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-5'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-5');toggleAllParts(!partOpen.get('PART 5'),'PART 5')">
PART&nbsp;5&nbsp;:&nbsp;อัตราการเข้างาน&nbsp;(Time Attendance)
</button>
......@@ -745,10 +787,13 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white"
style="border-radius:5px" (mouseenter)="partScore.set(item.tdesc,item2)"
(mouseleave)="partScore.clear()"
(click)="setScorePart5(item,item2);allFormRemain()" [ngClass]="{'!border-secondary !text-secondary':(evaluaterId==evaluateeId?item.pmsWorkingTimScore>=item2:item.pmsWorkingTimScoreBoss>=item2)||(partScore.get(item.tdesc) ?? 0)>=item2,
(click)="setScorePart5(item,item2);allFormRemain()" [ngClass]="{
'!border-secondary': (evaluaterId==evaluateeId?item.pmsWorkingTimScore>=item2:item.pmsWorkingTimScoreBoss>=item2)||(partScore.get(item.tdesc) ?? 0)>=item2 ,
'!text-secondary': (evaluaterId==evaluateeId?item.pmsWorkingTimScore>item2:item.pmsWorkingTimScoreBoss>item2)||(partScore.get(item.tdesc) ?? 0)>item2,
'!text-white !bg-secondary': (evaluaterId==evaluateeId?item.pmsWorkingTimScore==item2:item.pmsWorkingTimScoreBoss==item2)||(partScore.get(item.tdesc) ?? 0)==item2,
'pointer-events-none':!canEdit}">
{{item2}}
</button>
......@@ -756,7 +801,7 @@
</div>
<div class="flex justify-center"
style="height: 20px;white-space: nowrap; overflow: visible">
<span class="text-secondary">
<span class="text-indigo-600">
{{getTargetDetailValuePart5(item)}}
</span>
</div>
......@@ -770,32 +815,38 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScorePart5(appraisalPms?.part5Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScorePart5(appraisalPms?.part5Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigthPart5(appraisalPms?.part5Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigthPart5(appraisalPms?.part5Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScorePart5(appraisalPms?.part5Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScorePart5(appraisalPms?.part5Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScorePart5(appraisalPms?.part5Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part5Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part5Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScorePart5(appraisalPms?.part5Detail),calRawScorePart5(appraisalPms?.part5Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScorePart5(appraisalPms?.part5Detail),calRawScorePart5(appraisalPms?.part5Detail))}}</span>
</div>
</div>
</td>
......@@ -810,7 +861,9 @@
<ng-template #part6>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-6'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-6');toggleAllParts(!partOpen.get('PART 6'),'PART 6')">
PART&nbsp;6&nbsp;:&nbsp;งานที่ได้รับมอบหมายเพิ่มเติม&nbsp;(Cross Functional Project Assignment)
</button>
......@@ -915,11 +968,14 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white"
style="border-radius:5px"
(mouseenter)="partScore.set(item.groupAssessment1.pmsTopic.pmsTopicId,item2)"
(mouseleave)="partScore.clear()"
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{'!border-secondary !text-secondary':(evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2,
(click)="setScore(item,item2);allFormRemain()" [ngClass]="{
'!border-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation>=item2:item.scoreTopicExpectationBoss>=item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>=item2,
'!text-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation>item2:item.scoreTopicExpectationBoss>item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)>item2,
'!text-white !bg-secondary': (evaluaterId==evaluateeId?item.scoreTopicExpectation==item2:item.scoreTopicExpectationBoss==item2)||(partScore.get(item.groupAssessment1.pmsTopic.pmsTopicId) ?? 0)==item2,
'pointer-events-none':!canEdit}">
{{item2}}
</button>
......@@ -927,7 +983,7 @@
</div>
<div class="flex justify-center"
style="height: 20px;white-space: nowrap; overflow: visible">
<span class="text-secondary">
<span class="text-indigo-600">
{{getTargetDetailValue(item)}}
</span>
</div>
......@@ -941,32 +997,38 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScore(appraisalPms?.part6Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScore(appraisalPms?.part6Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigth(appraisalPms?.part6Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigth(appraisalPms?.part6Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScore(appraisalPms?.part6Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScore(appraisalPms?.part6Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScore(appraisalPms?.part6Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part6Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part6Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScore(appraisalPms?.part6Detail),calRawScore(appraisalPms?.part6Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScore(appraisalPms?.part6Detail),calRawScore(appraisalPms?.part6Detail))}}</span>
</div>
</div>
</td>
......@@ -981,7 +1043,9 @@
<ng-template #part7>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-7'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-7');toggleAllParts(!partOpen.get('PART 7'),'PART 7')">
PART&nbsp;7&nbsp;:&nbsp;กิจกรรมพิเศษ&nbsp;(Special Activities)
</button>
......@@ -1086,7 +1150,7 @@
<div class="flex flex-row justify-center gap-2 mb-2">
<ng-container *ngFor="let item2 of [5,4,3,2,1];let f = first">
<button type="button"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
class="h-12 w-12 p-0 shadow border text-soft-secondary bg-white"
style="border-radius:5px"
(mouseenter)="partScore.set(item.groupAssessment1.pmsTopic.pmsTopicId,item2)"
(mouseleave)="partScore.clear()"
......@@ -1098,7 +1162,7 @@
</div>
<div class="flex justify-center"
style="height: 20px;white-space: nowrap; overflow: visible">
<span class="text-secondary">
<span class="text-indigo-600">
{{getTargetDetailValue(item)}}
</span>
</div>
......@@ -1112,32 +1176,38 @@
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบ&nbsp;:&nbsp;{{calRawScore(appraisalPms?.part7Detail)}}
<div class="flex-1 font-semibold">
คะแนนดิบ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calRawScore(appraisalPms?.part7Detail)}}</span>
</div>
<div class="flex-1">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;{{calWeigth(appraisalPms?.part7Detail)}}
<div class="flex-1 font-semibold">
คำนวนถ่วงน้ำหนัก&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calWeigth(appraisalPms?.part7Detail)}}</span>
</div>
<div class="flex-1">
คะแนนประเมินที่ได้&nbsp;:&nbsp;{{calExpectationScore(appraisalPms?.part7Detail)}}
<div class="flex-1 font-semibold">
คะแนนประเมินที่ได้&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calExpectationScore(appraisalPms?.part7Detail)}}</span>
</div>
</div>
</td>
<td class="align-start !white-space-normal text-center py-2">
<td class="align-start !white-space-normal text-center py-2 font-semibold text-indigo-600">
{{calExpectationTotalScore(appraisalPms?.part7Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-start !white-space-normal py-2" colspan="4">
<div class="flex flex-row gap-2">
<div class="flex-1">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;100
<div class="flex-1 font-semibold">
คะแนนดิบคิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">100</span>
</div>
<div class="flex-1">
ร้อยละของปัจจัย&nbsp;:&nbsp;{{appraisalPms?.part6Percentage}}
<div class="flex-1 font-semibold">
ร้อยละของปัจจัย&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{appraisalPms?.part6Percentage}}</span>
</div>
<div class="flex-1">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;{{calPercentage(calExpectationTotalScore(appraisalPms?.part7Detail),calRawScore(appraisalPms?.part7Detail))}}
<div class="flex-1 font-semibold">
คะแนนที่ได้คิดเป็นร้อยละ&nbsp;:&nbsp;<span
class="text-indigo-600 ">{{calPercentage(calExpectationTotalScore(appraisalPms?.part7Detail),calRawScore(appraisalPms?.part7Detail))}}</span>
</div>
</div>
</td>
......@@ -1152,7 +1222,9 @@
<ng-template #part8>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-8'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-8');toggleAllParts(!partOpen.get('PART 8'),'PART 8')">
PART&nbsp;8&nbsp;:&nbsp;สรุปผลการปฏิบัติงาน&nbsp;(Summary)
</button>
......@@ -1188,18 +1260,18 @@
</tr>
</ng-container>
<tr class="bg-table-soft-gray" style="height:35px">
<td class="align-start text-center">
<td class="align-start text-center font-semibold">
รวม
</td>
<td class="align-start text-center">
</td>
<td class="align-start text-center">
<td class="align-start text-center font-semibold text-indigo-600">
{{calFactors()}}
</td>
<td class="align-start text-center">
<td class="align-start text-center font-semibold text-indigo-600">
{{calScoreObtained()}}
</td>
<td class="align-start text-center">
<td class="align-start text-center font-semibold text-indigo-600">
{{calNetScore()}}
</td>
</tr>
......@@ -1211,7 +1283,9 @@
<ng-template #part9>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-9'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-9');toggleAllParts(!partOpen.get('PART 9'),'PART 9')">
PART&nbsp;9&nbsp;:&nbsp;พฤติกรรมบุคคลที่เป็นจุดแข็ง จุดอ่อน และการพัฒนา&nbsp;(EMPLOYEE STRENGTHS ,
WEAKNESSES AND PLAN TO IMPROVED)
......@@ -1293,7 +1367,9 @@
<ng-template #part10>
<div class=" flex flex-col gap-2" [attr.id]="'menu-part-10'">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px"
<button type="button"
class="p-4 w-full bg-gradient-to-r from-primary to-secondary text-white text-left font-semibold"
style="border-radius:20px"
(click)="scrollToMenu('menu-part-10');toggleAllParts(!partOpen.get('PART 10'),'PART 10')">
PART&nbsp;10&nbsp;:&nbsp;คำชมหรือรางวัลที่ได้รับ&nbsp;(Conversation, Feedback, Recognise : CFR)
</button>
......
......@@ -81,6 +81,7 @@ export class PmsKpiComponent {
partShow: string[] = []
partOpen: Map<string, boolean> = new Map<string, boolean>()
partScore: Map<string, number> = new Map<string, number>()
@Input() compentencyFormRemain = 0
@Input() evaluateeId = ""
@Input() evaluaterId = ""
@Input() appraisalPms?: Pms
......@@ -96,7 +97,6 @@ export class PmsKpiComponent {
@ViewChild('scrollContainer') scrollContainer!: ElementRef;
@Output() scrollToMenuId: EventEmitter<any> = new EventEmitter<any>();
remain = 0
constructor(private appraisalService: AppraisalService,
private pmsGroupGradeService: PmsGroupGradeService,
private employeeService: EmployeeService,
......@@ -517,9 +517,9 @@ export class PmsKpiComponent {
return 0
}
allFormRemain() {
this.remain = [this.part1Remain(), this.part2Remain(), this.part3Remain(), this.part5Remain(), this.part6Remain(), this.part7Remain()].filter(data => data != 0).length
const remain = [this.part1Remain(), this.part2Remain(), this.part3Remain(), this.compentencyFormRemain, this.part5Remain(), this.part6Remain(), this.part7Remain()].filter(data => data != 0).length
this.kpiForm.emit(this.appraisalPms)
this.kpiFormRemain.emit(this.remain)
this.kpiFormRemain.emit(remain)
}
remainList() {
......@@ -527,7 +527,7 @@ export class PmsKpiComponent {
this.part1Remain(),
this.part2Remain(),
this.part3Remain(),
this.remain,
this.compentencyFormRemain,
this.part5Remain(),
this.part6Remain(),
this.part7Remain()
......
......@@ -35,12 +35,6 @@
</div>
</div>
</div>
<!-- <div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
Help
</button>
</div> -->
</div>
</div>
<div class="w-full min-height-50px justify-between items-center py-2">
......@@ -55,8 +49,9 @@
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
<thead>
<tr>
<!-- ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','PMS','ผลประเมิน','เกรด' ,'สถานะผู้ประเมิน'] -->
<ng-container
*ngFor="let item of subordinate.select?.showPms?['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','PMS','ผลประเมิน','เกรด' ,'สถานะผู้ประเมิน']:
*ngFor="let item of subordinate.select?.showPms?['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','ผลประเมิน','เกรด' ,'สถานะผู้ประเมิน']:
['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','สถานะผู้ประเมิน']; let f = first; let l = last; let i = index">
<th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary"
......@@ -105,16 +100,22 @@
<td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center">
<div class="flex justify-center">
<button type="button" class="ti-btn rounded-sm "
<!-- <button type="button" class="ti-btn rounded-sm "
*ngFor="let type of item.typeList"
[class]="statusButtonClass(type.statusType)"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(click)="selectSubordinate(item,type.competencyTypeId,subordinate.select?.evaluationRoundId);pageEvalution=type.shortName">
{{type.shortName}}
</button> -->
<button type="button" class="ti-btn rounded-sm "
[class]="statusButtonClass(item.statusIdp.statusType)"
style="height: 30px; width: auto; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(click)="selectSubordinate(item,'',subordinate.select?.evaluationRoundId,item.statusIdp.statusType);pageEvalution='open'">
{{statusCompetencyText(item.statusIdp.statusType)}}
</button>
</div>
</td>
<td class="text-center">
<!-- <td class="text-center">
<div class="flex justify-center">
<button type="button" class="ti-btn rounded-sm"
[class]="statusButtonClass(item.statusIdp.statusType)"
......@@ -133,7 +134,7 @@
PMS
</button>
</div>
</td>
</td> -->
<td class="text-center" style="font-size: 12px;"
*ngIf="subordinate.select?.showPms">
{{item.sumScore}}</td>
......
......@@ -38,6 +38,21 @@ export class SupervisorEvaluationComponent {
return ""
}
}
statusCompetencyText = (status: string) => {
if (status === "no access") {
return "ยังไม่ถึงขั้นตอนดำเนินการ"
} else if (status === "pending") {
return "รอดำเนินการ"
} else if (status === "evaluating") {
return "อยู่ระหว่างดำเนินการ"
} else if (status === "completed") {
return "ดำเนินการเสร็จสิ้น"
} else if (status === "rejected") {
return "ส่งกลับ"
} else {
return ""
}
}
constructor(private appraisalService: AppraisalService,
private cdr: ChangeDetectorRef) {
}
......
......@@ -738,7 +738,22 @@
<i class="ti ti-clipboard-check text-lg"></i>
Task Manager
</a> -->
<a (click)="onSettingsClick()" class="ti-dropdown-item cursor-pointer">
<a *ngIf="!router.url.includes('/self-evaluation')" (click)="onNextPartClick('/self-evaluation')"
class="ti-dropdown-item cursor-pointer">
<i class="ti ti-settings text-lg"></i>
ประเมินตนเอง
</a>
<a *ngIf="!router.url.includes('/supervisor-evaluation')"
(click)="onNextPartClick('/supervisor-evaluation')" class="ti-dropdown-item cursor-pointer">
<i class="ti ti-settings text-lg"></i>
ประเมินโดยหัวหน้า
</a>
<a *ngIf="!router.url.includes('/employee-self-service')"
(click)="onNextPartClick('/employee-self-service')" class="ti-dropdown-item cursor-pointer">
<i class="ti ti-settings text-lg"></i>
employeeSelfServiceClick
</a>
<a (click)="onNextPartClick('/company-registration')" class="ti-dropdown-item cursor-pointer">
<i class="ti ti-settings text-lg"></i>
Settings
</a>
......
......@@ -5,6 +5,7 @@ import { AuthService } from '../../services/auth.service';
import { TokenService } from '../../services/token.service';
import { EmployeeService } from '../../services/employee.service';
import { EmployeeModel, MyEmployeeModel } from '../../model/employee.model';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-header',
......@@ -13,19 +14,21 @@ import { EmployeeModel, MyEmployeeModel } from '../../model/employee.model';
})
export class HeaderComponent {
employeeProfile :EmployeeModel = new MyEmployeeModel();
employeeProfile: EmployeeModel = new MyEmployeeModel();
constructor(public navServices: NavService,
private authService: AuthService,
public tokenService:TokenService,
public tokenService: TokenService,
private employeeService: EmployeeService,
private elementRef: ElementRef,
public router: Router,
private route: ActivatedRoute,
private navService: NavService) {
this.getEvaluatee();
}
getEvaluatee() {
this.employeeProfile = new MyEmployeeModel(JSON.parse(sessionStorage.getItem('employeeProfile') || '{}'));
if(this.employeeProfile?.employeeId == undefined || this.employeeProfile?.employeeId == null || this.employeeProfile?.employeeId == ''){
if (this.employeeProfile?.employeeId == undefined || this.employeeProfile?.employeeId == null || this.employeeProfile?.employeeId == '') {
this.employeeService.getWorking().subscribe({
next: response => {
sessionStorage.setItem('employeeProfile', JSON.stringify(response));
......@@ -142,4 +145,8 @@ export class HeaderComponent {
onSettingsClick() {
this.navService.toggleEvaluationMenu();
}
onNextPartClick(part: string) {
this.router.navigate([part]);
}
}
......@@ -89,19 +89,19 @@ export class NavService implements OnDestroy {
}
private MENUITEMS: Menu[] = [
{
title: 'ประเมินผล',
type: 'sub',
selected: false,
active: false,
path: '',
id: 'm1',
show: true,
children: [
{ id: 'm11', path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link', show: true },
{ id: 'm12', path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link', show: true },
],
},
// {
// title: 'ประเมินผล',
// type: 'sub',
// selected: false,
// active: false,
// path: '',
// id: 'm1',
// show: true,
// children: [
// { id: 'm11', path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link', show: true },
// { id: 'm12', path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link', show: true },
// ],
// },
{
title: 'จัดการข้อมูลองค์กร',
type: 'sub',
......@@ -188,22 +188,22 @@ export class NavService implements OnDestroy {
toggleEvaluationMenu() {
// const menuItem = this.MENUITEMS.find(item => item.id === 'm1');
// if (menuItem) {
// menuItem.show = !menuItem.show; // Toggle ซ่อน/แสดง
// menuItem.children?.forEach(child => child.show = menuItem.show);
// this.menuItemsSubject.next([...this.MENUITEMS]);
// const currentUrl = this.router.url;
// const evaluationPaths = menuItem.children?.map(child => child.path) || [];
// if (!menuItem.show && evaluationPaths.includes(currentUrl)) {
// this.router.navigate(['/company-registration']);
// }
// if (menuItem.show) {
// this.router.navigate(['/self-evaluation']);
// }
// }
const menuItem = this.MENUITEMS.find(item => item.id === 'm1');
if (menuItem) {
menuItem.show = !menuItem.show; // Toggle ซ่อน/แสดง
menuItem.children?.forEach(child => child.show = menuItem.show);
this.menuItemsSubject.next([...this.MENUITEMS]);
const currentUrl = this.router.url;
const evaluationPaths = menuItem.children?.map(child => child.path) || [];
if (!menuItem.show && evaluationPaths.includes(currentUrl)) {
this.router.navigate(['/company-registration']);
}
if (menuItem.show) {
this.router.navigate(['/self-evaluation']);
}
}
}
}
......@@ -5860,6 +5860,11 @@ select option:focus {
--tw-gradient-to: rgb(var(--color-primary) / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-secondary {
--tw-gradient-from: rgb(var(--color-secondary)) var(--tw-gradient-from-position);
--tw-gradient-to: rgb(var(--color-secondary) / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-white {
--tw-gradient-from: #fff var(--tw-gradient-from-position);
--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);
......@@ -8151,6 +8156,9 @@ span.flatpickr-weekday {
.numInput:focus {
--tw-ring-color: rgb(var(--color-primary));
}
.ring-primary {
--tw-ring-color: rgb(var(--color-primary));
}
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
--tw-bg-opacity: 1 !important;
background-color: rgb(255 255 255 / var(--tw-bg-opacity)) !important;
......@@ -25110,6 +25118,9 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
color: rgb(var(--color-primary));
}
.text-soft-secondary-no-hover {
color: rgb(var(--color-secondary) / 0.25);
}
.text-soft-secondary {
color: rgb(var(--color-secondary) / 0.25);
}
......@@ -25138,3 +25149,7 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
.\!border-sort-secondary {
border-color: rgb(var(--color-secondary) / 0.1) !important;
}
.\!ml-0{
margin-left: 0 !important;
}
\ No newline at end of file
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