Commit 157df7d3 by Nattana Chaiyamat

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

parent 1e2750f6
...@@ -43,6 +43,8 @@ import { DayTypeRegistryComponent } from '../company-components/day-type-registr ...@@ -43,6 +43,8 @@ import { DayTypeRegistryComponent } from '../company-components/day-type-registr
import { TimeAttendanceComponent } from '../performance-management-evaluation/time-attendance/time-attendance.component'; 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 { 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 { 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 = [ ...@@ -94,7 +96,9 @@ const routes: Routes = [
{ path: "self-evaluation", title: 'ประเมินตนเอง', component: SelfEvaluationComponent }, { path: "self-evaluation", title: 'ประเมินตนเอง', component: SelfEvaluationComponent },
{ path: "day-type-registry", title: 'ประเมินตนเอง', component: DayTypeRegistryComponent }, { path: "day-type-registry", title: 'ประเมินตนเอง', component: DayTypeRegistryComponent },
{ path: "time-attendance", title: 'ทะเบียนการประเมินเวลาทำงาน', component: TimeAttendanceComponent }, { 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 ...@@ -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 { 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 { PmsSummaryComponent } from '../performance-evaluation/pms-form-employee/pms-summary/pms-summary.component';
import { BarRatingModule } from 'ngx-bar-rating'; 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 = { export const MY_DATE_FORMATS = {
parse: { parse: {
...@@ -309,7 +311,9 @@ export class CustomDateAdapter extends NativeDateAdapter { ...@@ -309,7 +311,9 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsCompetencyComponent, PmsCompetencyComponent,
PmsKpiComponent, PmsKpiComponent,
PmsIdpComponent, PmsIdpComponent,
PmsSummaryComponent PmsSummaryComponent,
EmployeeSelfServiceComponent,
MySkillXModuleComponent
], ],
imports: [ imports: [
CommonModule, 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 @@ ...@@ -3,7 +3,7 @@
<div class="flex flex-col"> <div class="flex flex-col">
<div class="flex flex-row py-2 gap-2 sticky" style="top:0;z-index:2;background: white;"> <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"> <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" style="border-radius:20px;width: 100px"
(click)="getAppraisalCompentencyForm(i);currentPart=appraisalCompentency.comType" (click)="getAppraisalCompentencyForm(i);currentPart=appraisalCompentency.comType"
[ngClass]="{'!bg-primary text-white':currentPart==appraisalCompentency.comType}"> [ngClass]="{'!bg-primary text-white':currentPart==appraisalCompentency.comType}">
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
</div> </div>
<div class="flex flex-col gap-2 relative" style="overflow-y: auto;min-height: calc(100vh - 480px);"> <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"> <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" style="border-radius:20px"
(click)="scrollToMenu(i); (click)="scrollToMenu(i);
allBiOpen(!biOpen.get(item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId),item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId)"> allBiOpen(!biOpen.get(item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId),item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId)">
...@@ -103,26 +104,29 @@ ...@@ -103,26 +104,29 @@
*ngFor="let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first"> *ngFor="let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first">
<tr class="border-b border-gray-200"> <tr class="border-b border-gray-200">
<td class="py-2" style="vertical-align: top">{{bi.behavioralIndicators}}</td> <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"> <td class="py-2 text-center" style="vertical-align: top">
<div class="flex flex-row justify-center gap-2 mb-2"> <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"> <ng-container *ngFor="let item of [5,4,3,2,1];let f = first">
<button type="button" <button type="button" class="h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white"
class="h-12 w-12 p-0 shadow border !border-soft-secondary text-soft-secondary bg-white"
style="border-radius:10px" style="border-radius:10px"
(mouseenter)="biScore.set(bi.behavioralIndicators+bi.assessmentId,item)" (mouseenter)="biScore.set(bi.behavioralIndicators+bi.assessmentId,item)"
(mouseleave)="biScore.clear()" (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}"> 'pointer-events-none':!canEdit}">
{{item}} {{item}}
</button> </button>
</ng-container> </ng-container>
</div> </div>
<div class="flex justify-center" style="height: 20px;white-space: nowrap; overflow: visible"> <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)] }} {{scoreDescriptions[(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)] }}
</span> </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] }} {{scoreDescriptions[bi.competencyBehavioral.scoreTopicExpectation] }}
</span> </span>
</div> </div>
...@@ -134,7 +138,8 @@ ...@@ -134,7 +138,8 @@
</ng-container> </ng-container>
</ng-container> </ng-container>
<button *ngIf="appraisalCompentencyFilter().length" [attr.id]="'menu-' + appraisalCompentencyFilter().length" <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('สรุป'),'สรุป')"> (click)="scrollToMenu(appraisalCompentencyFilter().length);allBiOpen(!biOpen.get('สรุป'),'สรุป')">
<span style="padding-left:50px"> <span style="padding-left:50px">
สรุป สรุป
...@@ -147,7 +152,8 @@ ...@@ -147,7 +152,8 @@
<ng-container *ngIf="biOpen.get('สรุป')"> <ng-container *ngIf="biOpen.get('สรุป')">
<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">ระดับความสามารถ (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-3 grid grid-cols-5">
<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" *ngFor="let item of [5,4,3,2,1]">{{item}}</div>
</div> </div>
...@@ -189,17 +195,19 @@ ...@@ -189,17 +195,19 @@
</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 font-semibold" style=" border-radius:20px">คะแนนรวมหลังถ่วงน้ำหนัก
</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 text-indigo-600 font-semibold">
{{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal)}} {{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal)}}
</div> </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 font-semibold" style=" border-radius:20px">คะแนนเฉลี่ยคิดเป็น
</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 text-indigo-600 font-semibold">
{{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}} {{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}}
</div> </div>
</div> </div>
...@@ -239,10 +247,10 @@ ...@@ -239,10 +247,10 @@
<span>{{item2}} </span><br> <span>{{item2}} </span><br>
</div> </div>
</td> </td>
<td class="align-start text-center"> <td class="align-start text-center text-indigo-600 font-semibold">
{{calAverage(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}} {{calAverage(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}}
</td> </td>
<td class="align-start text-center"> <td class="align-start text-center text-indigo-600 font-semibold">
{{calGap(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}} {{calGap(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)}}
</td> </td>
</tr> </tr>
......
<div class="flex flex-col gap-2 pt-2" style="overflow-y: auto;min-height: calc(100vh - 422px)"> <div class="flex flex-col gap-2 pt-2" style="overflow-y: auto;min-height: calc(100vh - 422px)">
<div class="flex"> <div class="flex">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px" <button type="button"
(click)="menuClose.set('Compentency',!menuClose.get('Compentency'))"> 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) รายละเอียดประเมินสมรรถนะ (Compentency)
</button> </button>
</div> </div>
...@@ -50,8 +51,9 @@ ...@@ -50,8 +51,9 @@
</table> </table>
</ng-container> </ng-container>
<div class="flex" *ngIf="appraisalPms"> <div class="flex" *ngIf="appraisalPms">
<button type="button" class="p-4 w-full bg-secondary text-white text-left" style="border-radius:20px" <button type="button"
(click)="menuClose.set('PMS',!menuClose.get('PMS'))"> 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) รายละเอียดประเมินผลการปฏิบัติงาน (PMS)
</button> </button>
</div> </div>
......
...@@ -81,6 +81,7 @@ export class PmsKpiComponent { ...@@ -81,6 +81,7 @@ export class PmsKpiComponent {
partShow: string[] = [] partShow: string[] = []
partOpen: Map<string, boolean> = new Map<string, boolean>() partOpen: Map<string, boolean> = new Map<string, boolean>()
partScore: Map<string, number> = new Map<string, number>() partScore: Map<string, number> = new Map<string, number>()
@Input() compentencyFormRemain = 0
@Input() evaluateeId = "" @Input() evaluateeId = ""
@Input() evaluaterId = "" @Input() evaluaterId = ""
@Input() appraisalPms?: Pms @Input() appraisalPms?: Pms
...@@ -95,8 +96,7 @@ export class PmsKpiComponent { ...@@ -95,8 +96,7 @@ export class PmsKpiComponent {
groupGrade: { loading: boolean, dataList: CompetencyGradeModel[] } = { loading: false, dataList: [] } groupGrade: { loading: boolean, dataList: CompetencyGradeModel[] } = { loading: false, dataList: [] }
@ViewChild('scrollContainer') scrollContainer!: ElementRef; @ViewChild('scrollContainer') scrollContainer!: ElementRef;
@Output() scrollToMenuId: EventEmitter<any> = new EventEmitter<any>(); @Output() scrollToMenuId: EventEmitter<any> = new EventEmitter<any>();
remain = 0
constructor(private appraisalService: AppraisalService, constructor(private appraisalService: AppraisalService,
private pmsGroupGradeService: PmsGroupGradeService, private pmsGroupGradeService: PmsGroupGradeService,
private employeeService: EmployeeService, private employeeService: EmployeeService,
...@@ -517,9 +517,9 @@ export class PmsKpiComponent { ...@@ -517,9 +517,9 @@ export class PmsKpiComponent {
return 0 return 0
} }
allFormRemain() { 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.kpiForm.emit(this.appraisalPms)
this.kpiFormRemain.emit(this.remain) this.kpiFormRemain.emit(remain)
} }
remainList() { remainList() {
...@@ -527,7 +527,7 @@ export class PmsKpiComponent { ...@@ -527,7 +527,7 @@ export class PmsKpiComponent {
this.part1Remain(), this.part1Remain(),
this.part2Remain(), this.part2Remain(),
this.part3Remain(), this.part3Remain(),
this.remain, this.compentencyFormRemain,
this.part5Remain(), this.part5Remain(),
this.part6Remain(), this.part6Remain(),
this.part7Remain() this.part7Remain()
......
...@@ -35,12 +35,6 @@ ...@@ -35,12 +35,6 @@
</div> </div>
</div> </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> </div>
<div class="w-full min-height-50px justify-between items-center py-2"> <div class="w-full min-height-50px justify-between items-center py-2">
...@@ -55,8 +49,9 @@ ...@@ -55,8 +49,9 @@
<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> <thead>
<tr> <tr>
<!-- ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','PMS','ผลประเมิน','เกรด' ,'สถานะผู้ประเมิน'] -->
<ng-container <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"> ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','สถานะผู้ประเมิน']; let f = first; let l = last; let i = index">
<th scope="col" <th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary" class="relative px-10px py-10px bg-soft-secondary text-primary"
...@@ -105,16 +100,22 @@ ...@@ -105,16 +100,22 @@
<td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td> <td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center"> <td class="text-center">
<div class="flex justify-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" *ngFor="let type of item.typeList"
[class]="statusButtonClass(type.statusType)" [class]="statusButtonClass(type.statusType)"
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;"
(click)="selectSubordinate(item,type.competencyTypeId,subordinate.select?.evaluationRoundId);pageEvalution=type.shortName"> (click)="selectSubordinate(item,type.competencyTypeId,subordinate.select?.evaluationRoundId);pageEvalution=type.shortName">
{{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> </button>
</div> </div>
</td> </td>
<td class="text-center"> <!-- <td class="text-center">
<div class="flex justify-center"> <div class="flex justify-center">
<button type="button" class="ti-btn rounded-sm" <button type="button" class="ti-btn rounded-sm"
[class]="statusButtonClass(item.statusIdp.statusType)" [class]="statusButtonClass(item.statusIdp.statusType)"
...@@ -133,7 +134,7 @@ ...@@ -133,7 +134,7 @@
PMS PMS
</button> </button>
</div> </div>
</td> </td> -->
<td class="text-center" style="font-size: 12px;" <td class="text-center" style="font-size: 12px;"
*ngIf="subordinate.select?.showPms"> *ngIf="subordinate.select?.showPms">
{{item.sumScore}}</td> {{item.sumScore}}</td>
......
...@@ -38,6 +38,21 @@ export class SupervisorEvaluationComponent { ...@@ -38,6 +38,21 @@ export class SupervisorEvaluationComponent {
return "" 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, constructor(private appraisalService: AppraisalService,
private cdr: ChangeDetectorRef) { private cdr: ChangeDetectorRef) {
} }
......
...@@ -738,7 +738,22 @@ ...@@ -738,7 +738,22 @@
<i class="ti ti-clipboard-check text-lg"></i> <i class="ti ti-clipboard-check text-lg"></i>
Task Manager Task Manager
</a> --> </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> <i class="ti ti-settings text-lg"></i>
Settings Settings
</a> </a>
......
...@@ -5,6 +5,7 @@ import { AuthService } from '../../services/auth.service'; ...@@ -5,6 +5,7 @@ import { AuthService } from '../../services/auth.service';
import { TokenService } from '../../services/token.service'; import { TokenService } from '../../services/token.service';
import { EmployeeService } from '../../services/employee.service'; import { EmployeeService } from '../../services/employee.service';
import { EmployeeModel, MyEmployeeModel } from '../../model/employee.model'; import { EmployeeModel, MyEmployeeModel } from '../../model/employee.model';
import { ActivatedRoute, Router } from '@angular/router';
@Component({ @Component({
selector: 'app-header', selector: 'app-header',
...@@ -13,26 +14,28 @@ import { EmployeeModel, MyEmployeeModel } from '../../model/employee.model'; ...@@ -13,26 +14,28 @@ import { EmployeeModel, MyEmployeeModel } from '../../model/employee.model';
}) })
export class HeaderComponent { export class HeaderComponent {
employeeProfile :EmployeeModel = new MyEmployeeModel(); employeeProfile: EmployeeModel = new MyEmployeeModel();
constructor(public navServices: NavService, constructor(public navServices: NavService,
private authService: AuthService, private authService: AuthService,
public tokenService:TokenService, public tokenService: TokenService,
private employeeService: EmployeeService, private employeeService: EmployeeService,
private elementRef: ElementRef, private elementRef: ElementRef,
public router: Router,
private route: ActivatedRoute,
private navService: NavService) { private navService: NavService) {
this.getEvaluatee(); this.getEvaluatee();
}
getEvaluatee() {
this.employeeProfile = new MyEmployeeModel(JSON.parse(sessionStorage.getItem('employeeProfile') || '{}'));
if(this.employeeProfile?.employeeId == undefined || this.employeeProfile?.employeeId == null || this.employeeProfile?.employeeId == ''){
this.employeeService.getWorking().subscribe({
next: response => {
sessionStorage.setItem('employeeProfile', JSON.stringify(response));
this.employeeProfile = new MyEmployeeModel(response)
}
})
} }
getEvaluatee() {
this.employeeProfile = new MyEmployeeModel(JSON.parse(sessionStorage.getItem('employeeProfile') || '{}'));
if (this.employeeProfile?.employeeId == undefined || this.employeeProfile?.employeeId == null || this.employeeProfile?.employeeId == '') {
this.employeeService.getWorking().subscribe({
next: response => {
sessionStorage.setItem('employeeProfile', JSON.stringify(response));
this.employeeProfile = new MyEmployeeModel(response)
}
})
}
} }
...@@ -142,4 +145,8 @@ export class HeaderComponent { ...@@ -142,4 +145,8 @@ export class HeaderComponent {
onSettingsClick() { onSettingsClick() {
this.navService.toggleEvaluationMenu(); this.navService.toggleEvaluationMenu();
} }
onNextPartClick(part: string) {
this.router.navigate([part]);
}
} }
...@@ -89,19 +89,19 @@ export class NavService implements OnDestroy { ...@@ -89,19 +89,19 @@ export class NavService implements OnDestroy {
} }
private MENUITEMS: Menu[] = [ private MENUITEMS: Menu[] = [
{ // {
title: 'ประเมินผล', // title: 'ประเมินผล',
type: 'sub', // type: 'sub',
selected: false, // selected: false,
active: false, // active: false,
path: '', // path: '',
id: 'm1', // id: 'm1',
show: true, // show: true,
children: [ // children: [
{ id: 'm11', path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link', show: true }, // { id: 'm11', path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link', show: true },
{ id: 'm12', path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link', show: true }, // { id: 'm12', path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link', show: true },
], // ],
}, // },
{ {
title: 'จัดการข้อมูลองค์กร', title: 'จัดการข้อมูลองค์กร',
type: 'sub', type: 'sub',
...@@ -182,28 +182,28 @@ export class NavService implements OnDestroy { ...@@ -182,28 +182,28 @@ export class NavService implements OnDestroy {
]; ];
// Array // Array
items = new BehaviorSubject<Menu[]>(this.MENUITEMS); items = new BehaviorSubject<Menu[]>(this.MENUITEMS);
private menuItemsSubject = new BehaviorSubject<Menu[]>(this.MENUITEMS); private menuItemsSubject = new BehaviorSubject<Menu[]>(this.MENUITEMS);
menuItems$ = this.menuItemsSubject.asObservable(); menuItems$ = this.menuItemsSubject.asObservable();
toggleEvaluationMenu() { toggleEvaluationMenu() {
// const menuItem = this.MENUITEMS.find(item => item.id === 'm1'); const menuItem = this.MENUITEMS.find(item => item.id === 'm1');
// if (menuItem) { if (menuItem) {
// menuItem.show = !menuItem.show; // Toggle ซ่อน/แสดง menuItem.show = !menuItem.show; // Toggle ซ่อน/แสดง
// menuItem.children?.forEach(child => child.show = menuItem.show); menuItem.children?.forEach(child => child.show = menuItem.show);
// this.menuItemsSubject.next([...this.MENUITEMS]); this.menuItemsSubject.next([...this.MENUITEMS]);
// const currentUrl = this.router.url; const currentUrl = this.router.url;
// const evaluationPaths = menuItem.children?.map(child => child.path) || []; const evaluationPaths = menuItem.children?.map(child => child.path) || [];
// if (!menuItem.show && evaluationPaths.includes(currentUrl)) { if (!menuItem.show && evaluationPaths.includes(currentUrl)) {
// this.router.navigate(['/company-registration']); this.router.navigate(['/company-registration']);
// } }
// if (menuItem.show) { if (menuItem.show) {
// this.router.navigate(['/self-evaluation']); this.router.navigate(['/self-evaluation']);
// } }
// } }
} }
} }
...@@ -5860,6 +5860,11 @@ select option:focus { ...@@ -5860,6 +5860,11 @@ select option:focus {
--tw-gradient-to: rgb(var(--color-primary) / 0) var(--tw-gradient-to-position); --tw-gradient-to: rgb(var(--color-primary) / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); --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 { .from-white {
--tw-gradient-from: #fff var(--tw-gradient-from-position); --tw-gradient-from: #fff var(--tw-gradient-from-position);
--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position); --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);
...@@ -8151,6 +8156,9 @@ span.flatpickr-weekday { ...@@ -8151,6 +8156,9 @@ span.flatpickr-weekday {
.numInput:focus { .numInput:focus {
--tw-ring-color: rgb(var(--color-primary)); --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 { .flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
--tw-bg-opacity: 1 !important; --tw-bg-opacity: 1 !important;
background-color: rgb(255 255 255 / var(--tw-bg-opacity)) !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) { ...@@ -25110,6 +25118,9 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
color: rgb(var(--color-primary)); color: rgb(var(--color-primary));
} }
.text-soft-secondary-no-hover {
color: rgb(var(--color-secondary) / 0.25);
}
.text-soft-secondary { .text-soft-secondary {
color: rgb(var(--color-secondary) / 0.25); color: rgb(var(--color-secondary) / 0.25);
} }
...@@ -25137,4 +25148,8 @@ div:where(.swal2-container) div:where(.swal2-validation-message) { ...@@ -25137,4 +25148,8 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
.\!border-sort-secondary { .\!border-sort-secondary {
border-color: rgb(var(--color-secondary) / 0.1) !important; 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