Commit 0520217b by Nattana Chaiyamat

เพิ่ม view แสดงคะแนนประเมินของลูกน้องกับหัวหน้า

parent 0dadc073
......@@ -71,7 +71,9 @@
</a>
</div>
</th>
<th scope="col" style="width: 500px;">ระดับความสามารถ
<th scope="col"
[ngStyle]="{'width': (evaluaterId!=evaluateeId||currentStep != '0') ?'325px' :'500px;'}">
ระดับความสามารถ
<div class="hs-tooltip ti-main-tooltip [--trigger:hover]">
<a class="hs-tooltip-toggle ti-main-tooltip-toggle" href="javascript:;">
<i class="ti ti-help-circle"></i>
......@@ -97,13 +99,13 @@
</a>
</div>
</th>
<th scope="col" *ngIf="evaluaterId!=evaluateeId||currentStep != '0'">คะแนนลูกน้อง</th>
</tr>
</thead>
<tbody>
<ng-container
*ngFor="let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first">
<tr class="border-b border-gray-200"
(mouseenter)="tableHover.set(bi.behavioralIndicators,true)"
<tr class="border-b border-gray-200" (mouseenter)="tableHover.set(bi.behavioralIndicators,true)"
(mouseleave)="tableHover.clear()"
[ngStyle]="{'background':tableHover.get(bi.behavioralIndicators)?'#f1f5f9':'#ffffff'}">
<td class="py-2" style="vertical-align: top">{{bi.behavioralIndicators}}</td>
......@@ -112,7 +114,9 @@
<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 text-soft-secondary-no-hover bg-white"
<ng-container *ngIf="evaluaterId!=evaluateeId||currentStep != '0'">
<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()"
......@@ -124,6 +128,22 @@
{{item}}
</button>
</ng-container>
<ng-container *ngIf="!(evaluaterId!=evaluateeId||currentStep != '0')">
<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.scoreTopicExpectationEmp=item;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>
</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-indigo-600">
......@@ -134,6 +154,10 @@
</span>
</div>
</td>
<td class="py-2 text-center text-indigo-600 font-semibold" style="vertical-align: top"
*ngIf="evaluaterId!=evaluateeId||currentStep != '0'">
{{bi.competencyBehavioral.scoreTopicExpectationEmp}}
</td>
</tr>
</ng-container>
</tbody>
......
......@@ -24,10 +24,15 @@ export class PmsCompetencyComponent {
@Output() compentencyFormRemain: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyForm: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyScore: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyScoreEmp: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyWeightScore: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyWeightScoreEmp: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyGap: EventEmitter<any> = new EventEmitter<any>();
@Output() compentencyGapEmp: EventEmitter<any> = new EventEmitter<any>();
@Output() sendInforWeight: EventEmitter<any> = new EventEmitter<any>();
@Output() sendInforWeightEmp: EventEmitter<any> = new EventEmitter<any>();
@Output() sendInforGap: EventEmitter<any> = new EventEmitter<any>();
@Output() sendInforGapEmp: EventEmitter<any> = new EventEmitter<any>();
@Input() canEdit = false
@Input() currentStep = ""
@Input() dateIso = ""
......@@ -61,6 +66,8 @@ export class PmsCompetencyComponent {
inforWeight: Map<string, string> = new Map<string, string>()
inforGap: Map<string, string> = new Map<string, string>()
inforWeightEmp: Map<string, string> = new Map<string, string>()
inforGapEmp: Map<string, string> = new Map<string, string>()
@Output() scrollToMenuId: EventEmitter<any> = new EventEmitter<any>();
......@@ -169,6 +176,15 @@ export class PmsCompetencyComponent {
}
calnumberCheck() {
if (this.evaluaterId != this.evaluateeId || this.currentStep != '0') {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1Emp = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationEmp == 1).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2Emp = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationEmp == 2).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3Emp = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationEmp == 3).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4Emp = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationEmp == 4).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5Emp = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationEmp == 5).length).reduce((acc: any, num: any) => acc + num, 0)
}
}
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 1).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 2).length).reduce((acc: any, num: any) => acc + num, 0)
......@@ -202,10 +218,35 @@ export class PmsCompetencyComponent {
}
return
}
calWeightScoreEmp(numberCheck: number) {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) {
switch (numberCheck) {
case (1): {
return this.showNumber((this.setting.data.settingScore1) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1Emp)
}
case (2): {
return this.showNumber((this.setting.data.settingScore2) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2Emp)
}
case (3): {
return this.showNumber((this.setting.data.settingScore3) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3Emp)
}
case (4): {
return this.showNumber((this.setting.data.settingScore4) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4Emp)
}
case (5): {
return this.showNumber((this.setting.data.settingScore5) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5Emp)
}
default: { return }
}
}
return
}
calWeightTotal() {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal = +(((this.calWeightScore(1) ?? 0) + (this.calWeightScore(2) ?? 0) + (this.calWeightScore(3) ?? 0) + (this.calWeightScore(4) ?? 0) + (this.calWeightScore(5) ?? 0)).toFixed(2))
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalEmp = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalEmp = +(((this.calWeightScoreEmp(1) ?? 0) + (this.calWeightScoreEmp(2) ?? 0) + (this.calWeightScoreEmp(3) ?? 0) + (this.calWeightScoreEmp(4) ?? 0) + (this.calWeightScoreEmp(5) ?? 0)).toFixed(2))
this.cdr.detectChanges()
this.calAverageScore()
}
......@@ -222,6 +263,8 @@ export class PmsCompetencyComponent {
if (total) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore = this.showNumber((this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal * 100) / total)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreEmp = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreEmp = this.showNumber((this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalEmp * 100) / total)
this.cdr.detectChanges()
}
}
......@@ -309,14 +352,22 @@ export class PmsCompetencyComponent {
this.compentencyGap.emit(this.calGap(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore))
this.compentencyForm.emit(this.appraisalCompentencyList)
this.compentencyFormRemain.emit(remain)
this.compentencyScoreEmp.emit(score.map(x => this.calWeightScoreEmp(x)))
this.compentencyWeightScoreEmp.emit(this.showNumber(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreEmp))
this.compentencyGapEmp.emit(this.calGap(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreEmp))
}
allWeightGap() {
this.appraisalCompentencyList.forEach((x, i) => {
this.inforWeight.set(x.comType, x.masfromEvaluationAssessment1lList[0].averageScore + '')
this.inforGap.set(x.comType, this.calGap(x.masfromEvaluationAssessment1lList[0].averageScore, (i + '')) ?? '')
this.inforWeightEmp.set(x.comType, x.masfromEvaluationAssessment1lList[0].averageScoreEmp + '')
this.inforGapEmp.set(x.comType, this.calGap(x.masfromEvaluationAssessment1lList[0].averageScoreEmp, (i + '')) ?? '')
})
this.sendInforWeight.emit(this.inforWeight)
this.sendInforGap.emit(this.inforGap)
this.sendInforWeightEmp.emit(this.inforWeightEmp)
this.sendInforGapEmp.emit(this.inforGapEmp)
}
allBiOpen(status: boolean, part?: string) {
......
......@@ -198,6 +198,67 @@
</div>
</div>
</div>
<div class="w-full"
*ngIf="currentTap=='แบบประเมินสมรรถนะ' &&(evaluaterId!=evaluateeId||compentency.data ? compentency.data?.currentStep != '0': false)">
<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>
<i *ngIf="menuClose.get('ค่าถ่วงน้ำหนักลูกน้องของความสามารถในแต่ละระดับ')" title="แสดง"
class="bg-white cursor-pointer border ti ti-chevron-down"
style="padding: 1px;border-radius:10px;font-size:27px;height:33px"
(click)="menuClose.set('ค่าถ่วงน้ำหนักลูกน้องของความสามารถในแต่ละระดับ',false)"></i>
<i *ngIf="!menuClose.get('ค่าถ่วงน้ำหนักลูกน้องของความสามารถในแต่ละระดับ')" title="ปิด"
class="bg-white cursor-pointer border ti ti-chevron-up"
style="padding: 1px;border-radius:10px;font-size:27px;height:33px"
(click)="menuClose.set('ค่าถ่วงน้ำหนักลูกน้องของความสามารถในแต่ละระดับ',true)"></i>
</div>
</div>
<div class="box-body py-2"
[class.hidden]="menuClose.get('ค่าถ่วงน้ำหนักลูกน้องของความสามารถในแต่ละระดับ')">
<div class="w-full flex flex-col gap-2" *ngIf="compentency.data">
<div class="w-full flex flex-col gap-2 mt-2">
<div class="w-full flex flex-row gap-2">
<div class="flex-1 text-center font-size-18px font-weight-700" *ngFor="let item of [5,4,3,2,1]">
{{item}}</div>
</div>
<div class="w-full flex flex-row gap-2">
<div *ngFor="let item of [5,4,3,2,1]"
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;">
{{compentencyScoreEmp[item-1]}}
</div>
</div>
</div>
<div class="w-full mt-2 flex justify-center">
<div class="flex flex-row gap-2 w-full">
<div class="flex-1 font-size-18px font-weight-700 text-right align-center">
คะแนนเฉลี่ย
</div>
<div class="flex-1 flex justify-center items-center">
<div
class="w-full 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;">
{{compentencyWeightScoreEmp}}
</div>
</div>
<div class="flex-1 font-size-18px font-weight-700 text-right align-center">
ผล Gap
</div>
<div class="flex-1 flex justify-center items-center">
<div
class="w-full 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;">
{{compentencyGapEmp}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="w-full" *ngIf="currentTap=='ประเมินผลการปฏิบัติงาน'||currentTap=='สรุปคะแนนและข้อเสนอแนะ'">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('สรุปผลประเมิน')">
......@@ -267,6 +328,76 @@
</div>
</div>
</div>
<div class="w-full"
*ngIf="(currentTap=='ประเมินผลการปฏิบัติงาน'||currentTap=='สรุปคะแนนและข้อเสนอแนะ')&&(evaluaterId!=evaluateeId||compentency.data ? compentency.data?.currentStep != '0': false)">
<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>
<i *ngIf="menuClose.get('สรุปผลประเมินลูกน้อง')" title="แสดง"
class="bg-white cursor-pointer border ti ti-chevron-down"
style="padding: 1px;border-radius:10px;font-size:27px"
(click)="menuClose.set('สรุปผลประเมินลูกน้อง',false)"></i>
<i *ngIf="!menuClose.get('สรุปผลประเมินลูกน้อง')" title="ปิด"
class="bg-white cursor-pointer border ti ti-chevron-up"
style="padding: 1px;border-radius:10px;font-size:27px"
(click)="menuClose.set('สรุปผลประเมินลูกน้อง',true)"></i>
</div>
</div>
<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 kpiScorePartEmp; let i=index">
<ng-container *ngIf="i<4 && i< kpiScorePartEmp.length-2">
<div class="flex flex-row">
<div class="flex-1" 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 kpiScorePartEmp; let i=index">
<ng-container *ngIf="i>=4 && i< kpiScorePartEmp.length-2">
<div class="flex flex-row">
<div class="flex-1" 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>
<div class='flex-1 flex flex-row gap-2'>
<ng-container *ngFor="let item of kpiScorePartEmp; let i=index; let l=last">
<ng-container *ngIf="i >= kpiScorePartEmp.length-2 && !l">
<div class="flex-1 flex flex-col gap-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 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 class="w-full" *ngIf="compentency.data">
<div class="box shadow-md hover:shadow-xl transition m-0" style="border-radius:20px">
<div class="box-header" [class.border-none]="menuClose.get('สถานะการประเมิน')">
......@@ -439,21 +570,27 @@
<div class="min-height: calc(100vh - 406px);" [class.hidden]="currentTap!='ข้อมูลการประเมิน'">
<app-pms-information [statusType]="compentency.data.statusType" [canSave]="canSave"
[appraisalPms]="compentency.data.pms" [appraisalCompentencyList]="compentency.data.competency"
[inforGap]="inforGap" [inforWeight]="inforWeight"
[inforGap]="inforGap" [inforWeight]="inforWeight" [inforGapEmp]="inforGapEmp" [inforWeightEmp]="inforWeightEmp"
[kpiScore]="kpiScorePart.length > 1 ?kpiScorePart[kpiScorePart.length-2].score : ''"
[kpiScoreEmp]="kpiScorePartEmp.length > 1 ?kpiScorePartEmp[kpiScorePartEmp.length-2].score : ''"
[kpiGrade]="kpiScorePart.length > 0 ?kpiScorePart[kpiScorePart.length-1].score : ''"
[kpiName]="compentency.data.tdesc" (sendCurrentTap)="currentTap=$event"
(sendCurrentPart)="currentPart=$event"></app-pms-information>
(sendCurrentPart)="currentPart=$event" [evaluaterId]="evaluaterId" [evaluateeId]="evaluateeId"
[currentStep]="compentency.data.currentStep"></app-pms-information>
</div>
<div class="min-height: calc(100vh - 406px);" [class.hidden]="currentTap!='แบบประเมินสมรรถนะ'">
<app-pms-competency [currentTap]="currentTap" [canSave]="canSave" [fCurrentPart]="currentPart"
[appraisalCompentencyList]="compentency.data.competency" [evaluaterId]="evaluaterId"
[evaluateeId]="evaluateeId" [canEdit]="canEdit" [currentStep]="compentency.data.currentStep"
[dateIso]="dateIso" (compentencyScore)="compentencyScore=$event"
(compentencyScoreEmp)="compentencyScoreEmp=$event"
(compentencyWeightScore)="compentencyWeightScore=$event" (compentencyGap)="compentencyGap=$event"
(compentencyWeightScoreEmp)="compentencyWeightScoreEmp=$event"
(compentencyGapEmp)="compentencyGapEmp=$event"
(compentencyFormRemain)="compentencyFormRemain=$event"
(compentencyForm)="compentency.data.competency=$event" (sendInforGap)="inforGap=$event"
(sendInforWeight)="inforWeight=$event" (scrollToMenuId)="scrollToMenu($event)"></app-pms-competency>
(sendInforWeight)="inforWeight=$event" (sendInforGapEmp)="inforGapEmp=$event"
(sendInforWeightEmp)="inforWeightEmp=$event" (scrollToMenuId)="scrollToMenu($event)"></app-pms-competency>
</div>
<div class="min-height: calc(100vh - 406px);"
[class.hidden]="currentTap!='ประเมินผลการปฏิบัติงาน'&&currentTap!='สรุปคะแนนและข้อเสนอแนะ'">
......@@ -461,8 +598,9 @@
[currentPart]="currentTap" [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)"
[inforWeight]="inforWeight" [compentencyFormRemain]="compentencyFormRemain"></app-pms-kpi>
(scorePartEmp)="kpiScorePartEmp=$event" (kpiForm)="compentency.data.pms=$event"
(scrollToMenuId)="scrollToMenu($event)" [inforWeight]="inforWeight"
[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"
......
......@@ -55,11 +55,17 @@ export class PmsFormEmployeeComponent {
compentencyScore: String[] = []
compentencyWeightScore = ""
compentencyGap = ""
compentencyScoreEmp: String[] = []
compentencyWeightScoreEmp = ""
compentencyGapEmp = ""
inforWeight: Map<string, string> = new Map<string, string>()
inforGap: Map<string, string> = new Map<string, string>()
inforWeightEmp: Map<string, string> = new Map<string, string>()
inforGapEmp: Map<string, string> = new Map<string, string>()
kpiScorePart: { text: string, score: string }[] = []
kpiScorePartEmp: { text: string, score: string }[] = []
menuClose: Map<string, boolean> = new Map<string, boolean>()
......
......@@ -13,7 +13,10 @@
<th scope="col">แบบการประเมิน</th>
<th scope="col text-center">วันที่เริ่มต้น</th>
<th scope="col text-center">วันที่สิ้นสุด</th>
<th scope="col text-center" *ngIf="evaluaterId!=evaluateeId||currentStep != '0'">คะแนนเฉลี่ยลูกน้อง
</th>
<th scope="col text-center">คะแนนเฉลี่ย</th>
<th scope="col text-center" *ngIf="evaluaterId!=evaluateeId||currentStep != '0'">ผล GAP ลูกน้อง</th>
<th scope="col text-center">ผล GAP</th>
<th scope="col text-center">การจัดการ</th>
</tr>
......@@ -33,9 +36,18 @@
<td class="py-2 text-center" style="vertical-align: top">
{{formatThaiDate(item.masfromEvaluationRound.apsPeriodEnd)}}
</td>
<td class="py-2 text-center" style="vertical-align: top"
*ngIf="evaluaterId!=evaluateeId||currentStep != '0'">
{{inforWeightEmp.get(item.comType)!=='undefined' && inforWeightEmp.get(item.comType)
!=='null'?inforWeightEmp.get(item.comType): '0'}}
</td>
<td class="py-2 text-center" style="vertical-align: top">
{{inforWeight.get(item.comType) !=='null'?inforWeight.get(item.comType): '0'}}
</td>
<td class="py-2 text-center" style="vertical-align: top"
*ngIf="evaluaterId!=evaluateeId||currentStep != '0'">
{{inforGapEmp.get(item.comType)!=='null'?inforGapEmp.get(item.comType): ''}}
</td>
<td class="py-2 text-center" style="vertical-align: top">
{{inforGap.get(item.comType)!=='null'?inforGap.get(item.comType): ''}}
</td>
......@@ -67,6 +79,7 @@
<th scope="col">แบบการประเมิน</th>
<th scope="col text-center">วันที่เริ่มต้น</th>
<th scope="col text-center">วันที่สิ้นสุด</th>
<th scope="col text-center">ผลการประเมินลูกน้อง</th>
<th scope="col text-center">ผลการประเมิน</th>
<th scope="col text-center">เกรด</th>
<th scope="col text-center">การจัดการ</th>
......@@ -85,6 +98,10 @@
<td class="py-2 text-center" style="vertical-align: top">
{{formatThaiDate(appraisalPms.pmsMasfromEvaluationRoundModel.apsPeriodEnd)}}
</td>
<td *ngIf="evaluaterId!=evaluateeId||currentStep != '0'" class="py-2 text-center"
style="vertical-align: top">
{{kpiScoreEmp}}
</td>
<td class="py-2 text-center" style="vertical-align: top">
{{kpiScore}}
</td>
......
......@@ -11,11 +11,17 @@ export class PmsInformationComponent {
@Input() statusType = ''
@Input() inforWeight: Map<string, string> = new Map<string, string>()
@Input() inforGap: Map<string, string> = new Map<string, string>()
@Input() inforWeightEmp: Map<string, string> = new Map<string, string>()
@Input() inforGapEmp: Map<string, string> = new Map<string, string>()
@Input() appraisalCompentencyList: Competency[] = []
@Input() appraisalPms?: Pms
@Input() kpiScore: string = ""
@Input() kpiScoreEmp: string = ""
@Input() kpiGrade: string = ""
@Input() kpiName: string = ""
@Input() evaluateeId = ""
@Input() evaluaterId = ""
@Input() currentStep = ""
@Output() sendCurrentTap: EventEmitter<any> = new EventEmitter<any>();
@Output() sendCurrentPart: EventEmitter<any> = new EventEmitter<any>();
tableHover: Map<string, boolean> = new Map<string, boolean>()
......
......@@ -110,6 +110,7 @@ export class PmsKpiComponent {
@Output() kpiFormRemain: EventEmitter<any> = new EventEmitter<any>();
@Output() kpiForm: EventEmitter<any> = new EventEmitter<any>();
@Output() scorePart: EventEmitter<any> = new EventEmitter<any>();
@Output() scorePartEmp: EventEmitter<any> = new EventEmitter<any>();
groupGrade: { loading: boolean, dataList: CompetencyGradeModel[] } = { loading: false, dataList: [] }
@ViewChild('scrollContainer') scrollContainer!: ElementRef;
@Output() scrollToMenuId: EventEmitter<any> = new EventEmitter<any>();
......@@ -354,13 +355,7 @@ export class PmsKpiComponent {
calScoreObtainedEmp() {
return this.data8List.reduce((sum: number, item: any) => sum + item.scoreObtainedEmp, 0).toFixed(2);
}
calNetScoreEmp() {
if (this.appraisalPms) {
this.appraisalPms.netScoreEmp = +(this.data8List.reduce((sum: number, item: any) => sum + item.netScoreEmp, 0).toFixed(2));
return this.appraisalPms.netScoreEmp
}
return "0.00"
}
calScoreObtained() {
return this.data8List.reduce((sum: number, item: any) => sum + item.scoreObtained, 0).toFixed(2);
}
......@@ -371,7 +366,13 @@ export class PmsKpiComponent {
}
return "0.00"
}
calNetScoreEmp() {
if (this.appraisalPms) {
this.appraisalPms.netScoreEmp = +(this.data8List.reduce((sum: number, item: any) => sum + item.netScoreEmp, 0).toFixed(2));
return this.appraisalPms.netScoreEmp
}
return "0.00"
}
calAverage(score: number) {
const roundedScore = score % 1 <= 0.5 ? Math.floor(score) : Math.round(score);
......@@ -599,7 +600,9 @@ export class PmsKpiComponent {
if (this.appraisalPms) {
const gradeScore = this.groupGrade.dataList.find(item => Math.ceil(+this.calNetScore()) >= item.gradeMinScore && Math.ceil(+this.calNetScore()) <= item.gradeMaxScore);
const score = this.data8List.map((x, i) => ({ text: "PART " + (i + 1), score: this.numberFixed2(x.netScore) })).concat([{ text: "สุทธิ", score: this.calNetScore() + '' }, { text: "Grade", score: gradeScore?.gradeDetail || '' }])
const scoreEmp = this.data8List.map((x, i) => ({ text: "PART " + (i + 1), score: this.numberFixed2(x.netScoreEmp) })).concat([{ text: "สุทธิ", score: this.calNetScoreEmp() + '' }, { text: "Grade", score: gradeScore?.gradeDetail || '' }])
this.scorePart.emit(score)
this.scorePartEmp.emit(scoreEmp)
}
}
......
......@@ -715,6 +715,7 @@ export interface MasfromEvaluationAssessment1lList {
apsassessyDate: string
apsassessyStatus: string
averageScore: number
averageScoreEmp: number
companyId: string
competencyType: CompetencyType
evaluationResults: string
......@@ -724,9 +725,15 @@ export interface MasfromEvaluationAssessment1lList {
numberCheck3: number
numberCheck4: number
numberCheck5: number
numberCheck1Emp: number
numberCheck2Emp: number
numberCheck3Emp: number
numberCheck4Emp: number
numberCheck5Emp: number
plId: string
sumEvaluationResults: string
weightedTotal: number
weightedTotalEmp: number
masfromEvaluationAssessment2List: MasfromEvaluationAssessment2List[]
}
......@@ -869,6 +876,7 @@ export interface BehavioralIndicatorsList {
export interface CompetencyBehavioral {
scoreTopicExpectation: number
scoreTopicExpectationEmp: number
companyId: string
}
......
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