Commit 2e52c698 by Nattana Chaiyamat

pms

parent 0f370421
......@@ -30,7 +30,8 @@
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">
ชื่อผู้รับการประเมิน(Employee)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ชื่อผู้การประเมิน(Evaluator)
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">
ชื่อผู้การประเมิน(Evaluator)
</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
......@@ -42,8 +43,10 @@
{{appraisalPms.data.apsapprove1.thFullName}}</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">รหัส (ID)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">รหัส (ID)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">รหัส (ID)
</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">รหัส (ID)
</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">
......@@ -52,8 +55,10 @@
{{appraisalPms.data.apsapprove1.employeeId}}</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ตำแหน่ง (Position)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ตำแหน่ง (Position)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ตำแหน่ง
(Position)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ตำแหน่ง
(Position)</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">
......@@ -62,8 +67,10 @@
{{appraisalPms.data.apsapprove1.position.tdesc}}</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">แผนก (Section)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">แผนก (Section)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">แผนก
(Section)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">แผนก
(Section)</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">
......@@ -72,8 +79,10 @@
{{appraisalPms.data.apsapprove1.bu2.tdesc}}</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ฝ่าย (Department)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ฝ่าย (Department)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ฝ่าย
(Department)</div>
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">ฝ่าย
(Department)</div>
</div>
<div class="py-2 grid grid-cols-1 col-span-1">
<div class="col-span-1 text-gray-400 border" style="padding-top:5px;min-height: 60px;">
......@@ -83,13 +92,13 @@
</div>
</div>
</div>
<ng-container *ngIf="appraisalPms.data.part1Detail else part1"></ng-container>
<ng-container *ngTemplateOutlet="part2"></ng-container>
<ng-container *ngTemplateOutlet="part3"></ng-container>
<ng-container *ngTemplateOutlet="part4"></ng-container>
<ng-container *ngTemplateOutlet="part5"></ng-container>
<ng-container *ngTemplateOutlet="part6"></ng-container>
<ng-container *ngTemplateOutlet="part7"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part1Detail?.length then part1 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part2Detail?.length then part2 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part3Detail?.length then part3 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part4Detail?.length then part4 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part5Detail?.length then part5 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part6Detail?.length then part6 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.data?.part7Detail?.length then part7 else noData"></ng-container>
<ng-container *ngTemplateOutlet="part8"></ng-container>
<ng-container *ngTemplateOutlet="part9"></ng-container>
<div class="pb-1rem px-2rem">
......@@ -149,7 +158,8 @@
</ng-template>
<ng-template #noData>
</ng-template>
<ng-template #part1>
<div class="mx-2rem py-1rem px-1rem bg-primary">
......@@ -207,51 +217,82 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="dataListFilter().length">
<tr *ngFor="let item of dataListFilter();let i = index">
<td class="align-start text-center">
<tbody *ngIf="appraisalPms?.data?.part1Detail">
<tr *ngFor="let item of appraisalPms?.data?.part1Detail;let i = index">
<td class="align-start text-center !white-space-normal ">
{{i+1}}
</td>
<td class="align-start">
{{item.hoshin}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.tdesc}}
</td>
<td class="align-start !white-space-normal">
{{item.performance}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.indicatorsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.target}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.performanceGoalsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.unit}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.detailUnit}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.timeLine}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.completionDate}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.weight}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part1radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part1radioA'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=5:item.scoreTopicExpectationBoss=5"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==5:item.scoreTopicExpectationBoss==5"><br>
{{item.groupAssessment1.pmsTopic.targetAdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part1radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part1radioB'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=4:item.scoreTopicExpectationBoss=4"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==4:item.scoreTopicExpectationBoss==4"><br>
{{item.groupAssessment1.pmsTopic.targetBdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part1radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part1radioC'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=3:item.scoreTopicExpectationBoss=3"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==3:item.scoreTopicExpectationBoss==3"><br>
{{item.groupAssessment1.pmsTopic.targetCdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part1radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part1radioD'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=2:item.scoreTopicExpectationBoss=2"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==2:item.scoreTopicExpectationBoss==2"><br>
{{item.groupAssessment1.pmsTopic.targetDdetail}}
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part1radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part1radio'+i+''+i2" [value]="item2" [(ngModel)]="item.targetDegree.check"><br>
{{item2}}
[id]="'part1radioE'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=1:item.scoreTopicExpectationBoss=1"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==1:item.scoreTopicExpectationBoss==1"><br>
{{item.groupAssessment1.pmsTopic.targetEdetail}}
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{numberFixed2(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss
)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.groupAssessment1.pmsTopic.weight *
(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-center">
<td class="align-start text-center !white-space-normal ">
</td>
<td class="align-start text-center">
<td class="align-start text-center !white-space-normal ">
คะแนนดิบ
</td>
<td class="align-start !white-space-normal text-center">
50
{{calRawScore(appraisalPms.data?.part1Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
......@@ -262,16 +303,16 @@
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
10
{{calWeigth(appraisalPms.data?.part1Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
คะแนนประเมินที่ได้
</td>
<td class="align-start !white-space-normal text-center">
8
{{calExpectationScore(appraisalPms.data?.part1Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
40
{{calExpectationTotalScore(appraisalPms.data?.part1Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -292,13 +333,13 @@
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
15.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
80
{{calPercentage(calExpectationTotalScore(appraisalPms.data?.part1Detail),calRawScore(appraisalPms.data?.part1Detail))}}
</td>
</tr>
</tbody>
......@@ -364,48 +405,79 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="data2ListFilter().length">
<tr *ngFor="let item of data2ListFilter();let i = index">
<td class="align-start text-center">
<tbody *ngIf="appraisalPms?.data?.part2Detail">
<tr *ngFor="let item of appraisalPms?.data?.part2Detail;let i = index">
<td class="align-start text-center !white-space-normal ">
{{i+1}}
</td>
<td class="align-start !white-space-normal">
{{item.performance}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.indicatorsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.target}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.performanceGoalsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.unit}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.detailUnit}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.timeLine}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.completionDate}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.weight}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part2radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part2radioA'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=5:item.scoreTopicExpectationBoss=5"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==5:item.scoreTopicExpectationBoss==5"><br>
{{item.groupAssessment1.pmsTopic.targetAdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part2radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part2radioB'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=4:item.scoreTopicExpectationBoss=4"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==4:item.scoreTopicExpectationBoss==4"><br>
{{item.groupAssessment1.pmsTopic.targetBdetail}}
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part2radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part2radio'+i+''+i2" [value]="item2" [(ngModel)]="item.targetDegree.check"><br>
{{item2}}
[id]="'part2radioC'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=3:item.scoreTopicExpectationBoss=3"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==3:item.scoreTopicExpectationBoss==3"><br>
{{item.groupAssessment1.pmsTopic.targetCdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part2radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part2radioD'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=2:item.scoreTopicExpectationBoss=2"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==2:item.scoreTopicExpectationBoss==2"><br>
{{item.groupAssessment1.pmsTopic.targetDdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part2radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part2radioE'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=1:item.scoreTopicExpectationBoss=1"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==1:item.scoreTopicExpectationBoss==1"><br>
{{item.groupAssessment1.pmsTopic.targetEdetail}}
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{numberFixed2(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss
)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.groupAssessment1.pmsTopic.weight *
(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-center">
<td class="align-start text-center !white-space-normal ">
</td>
<td class="align-start text-center">
<td class="align-start text-center !white-space-normal ">
คะแนนดิบ
</td>
<td class="align-start !white-space-normal text-center">
70
{{calRawScore(appraisalPms.data?.part2Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
</td>
......@@ -413,16 +485,16 @@
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
14
{{calWeigth(appraisalPms.data?.part2Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
คะแนนประเมินที่ได้
</td>
<td class="align-start !white-space-normal text-center">
10
{{calExpectationScore(appraisalPms.data?.part2Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
52
{{calExpectationTotalScore(appraisalPms.data?.part2Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -440,13 +512,13 @@
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
30.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
74.29
{{calPercentage(calExpectationTotalScore(appraisalPms.data?.part2Detail),calRawScore(appraisalPms.data?.part2Detail))}}
</td>
</tr>
</tbody>
......@@ -511,38 +583,69 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="data3ListFilter().length">
<tr *ngFor="let item of data3ListFilter();let i = index">
<td class="align-start text-center">
<tbody *ngIf="appraisalPms?.data?.part3Detail">
<tr *ngFor="let item of appraisalPms?.data?.part3Detail;let i = index">
<td class="align-start text-center !white-space-normal ">
{{i+1}}
</td>
<td class="align-start !white-space-normal">
{{item.performance}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.target}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.unit}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.timeLine}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
<input type="radio" [name]="'part2radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part2radio'+i+''+i2" [value]="item2" [(ngModel)]="item.targetDegree.check"><br>
{{item2}}
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.indicatorsDetail}}
</td>
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.performanceGoalsDetail}}
</td>
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.detailUnit}}
</td>
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.completionDate}}
</td>
<td class="align-start text-center !white-space-normal ">
{{item.groupAssessment1.pmsTopic.weight}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part3radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part3radioA'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=5:item.scoreTopicExpectationBoss=5"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==5:item.scoreTopicExpectationBoss==5"><br>
{{item.groupAssessment1.pmsTopic.targetAdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part3radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part3radioB'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=4:item.scoreTopicExpectationBoss=4"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==4:item.scoreTopicExpectationBoss==4"><br>
{{item.groupAssessment1.pmsTopic.targetBdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part3radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part3radioC'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=3:item.scoreTopicExpectationBoss=3"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==3:item.scoreTopicExpectationBoss==3"><br>
{{item.groupAssessment1.pmsTopic.targetCdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part3radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part3radioD'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=2:item.scoreTopicExpectationBoss=2"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==2:item.scoreTopicExpectationBoss==2"><br>
{{item.groupAssessment1.pmsTopic.targetDdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part3radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part3radioE'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=1:item.scoreTopicExpectationBoss=1"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==1:item.scoreTopicExpectationBoss==1"><br>
{{item.groupAssessment1.pmsTopic.targetEdetail}}
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{numberFixed2(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss
)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.groupAssessment1.pmsTopic.weight *
(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -552,7 +655,7 @@
คะแนนดิบ
</td>
<td class="align-start !white-space-normal text-center">
70
{{calRawScore(appraisalPms.data?.part3Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
</td>
......@@ -560,16 +663,16 @@
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
14
{{calWeigth(appraisalPms.data?.part3Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
คะแนนประเมินที่ได้
</td>
<td class="align-start !white-space-normal text-center">
10
{{calExpectationScore(appraisalPms.data?.part3Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
52
{{calExpectationTotalScore(appraisalPms.data?.part3Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -587,13 +690,13 @@
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
30.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
74.29
{{calPercentage(calExpectationTotalScore(appraisalPms.data?.part3Detail),calRawScore(appraisalPms.data?.part3Detail))}}
</td>
</tr>
</tbody>
......@@ -657,48 +760,69 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="data4ListFilter().length">
<tr *ngFor="let item of data4ListFilter();let i = index">
<tbody *ngIf="appraisalPms?.data?.part4Detail">
<tr *ngFor="let item of appraisalPms?.data?.part4Detail;let i = index">
<td class="align-start text-center">
{{i+1}}
</td>
<td class="align-start !white-space-normal">
{{item.competency}}
{{item.competencyType.tdesc}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
{{item.competencyType.weight}}
</td>
<td class="align-start !white-space-normal text-center">
<ng-container *ngIf="calAverage(item.averageScore)==5">
{{item.averageScore}}
</ng-container>
</td>
<td class="align-start !white-space-normal text-center">
<ng-container *ngIf="calAverage(item.averageScore)==4">
{{item.averageScore}}
</ng-container>
</td>
<td class="align-start !white-space-normal text-center">
<ng-container *ngIf="calAverage(item.averageScore)==3">
{{item.averageScore}}
</ng-container>
</td>
<td class="align-start !white-space-normal text-center">
<ng-container *ngIf="calAverage(item.averageScore)==2">
{{item.averageScore}}
</ng-container>
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
{{item2}}
<td class="align-start !white-space-normal text-center">
<ng-container *ngIf="calAverage(item.averageScore)==1">
{{item.averageScore}}
</ng-container>
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{calAverage(item.averageScore)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.competencyType.weight * calAverage(item.averageScore))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
<td class="align-start text-center">
คะแนนดิบ
70
{{calRawScorePart4(appraisalPms.data?.part4Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
30
{{calWeigthPart4(appraisalPms.data?.part4Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
คะแนนประเมินที่ได้
</td>
<td class="align-start !white-space-normal text-center">
9
{{calExpectationScorePart4(appraisalPms.data?.part4Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
90
{{calExpectationTotalScorePart4(appraisalPms.data?.part4Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -710,13 +834,13 @@
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
35.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
60
{{calPercentage(calExpectationTotalScorePart4(appraisalPms.data?.part4Detail),calRawScorePart4(appraisalPms.data?.part4Detail))}}
</td>
</tr>
</tbody>
......@@ -757,14 +881,14 @@
<tr class="font-size-12px">
<ng-container
*ngFor="let item of ['ลำดับ\n(No.)','จำนวนการเข้างาน\n(Time attendance)','เป้าหมายผลงาน\n(Target)','หน่วยนับ\n(Unit)','น้ำหนัก\n(Weight) [(A)]','ค่าเป้าหมาย(Target Degree)','สรุปผลงาน\n(Summary)\n[(B)]','คะแนนที่ได้\n(Score)\n[(A)x(B)]'];let i = index;let l = last">
<th scope="col" [attr.rowspan]="i==3?'1':'2'" [attr.colspan]="i==3?'5':'1'"
<th scope="col" [attr.rowspan]="i==5?'1':'2'" [attr.colspan]="i==5?'5':'1'"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700 ">{{ item }}</span>
<div *ngIf="!l&&i!=3" class="absolute top-1/2 transform -translate-y-1/2 right-0">
<div *ngIf="!l&&i!=5" class="absolute top-1/2 transform -translate-y-1/2 right-0">
<i class="ti ti-dots-vertical fs-l"></i>
</div>
</th>
<th *ngIf="i==3" scope="col" rowspan="2"
<th *ngIf="i==5" scope="col" rowspan="2"
class="relative bg-soft-secondary text-primary !text-center !p-0">
<div class="absolute top-1/2 transform -translate-y-1/2 right-0">
<i class="ti ti-dots-vertical fs-l"></i>
......@@ -781,35 +905,66 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="data5ListFilter().length">
<tr *ngFor="let item of data5ListFilter();let i = index">
<tbody *ngIf="appraisalPms?.data?.part5Detail">
<tr *ngFor="let item of appraisalPms?.data?.part5Detail;let i = index">
<td class="align-start text-center">
{{i+1}}
</td>
<td class="align-start !white-space-normal">
{{item.timeAttendance}}
{{item.tdesc}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.target}}
{{item.performanceTargets}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.unit}}
{{item.detailUnit}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
<input type="radio" [name]="'part4radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part4radio'+i+''+i2" [value]="item2" [(ngModel)]="item.targetDegree.check"><br>
{{item2}}
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part5radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part5radioA'+i"
(click)="evaluaterId==evaluateeId?item.pmsWorkingTimScore=5:item.pmsWorkingTimScoreBoss=5"
[checked]="evaluaterId==evaluateeId?item.pmsWorkingTimScore==5:item.pmsWorkingTimScoreBoss==5"><br>
{{item.targetADetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part5radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part5radioB'+i"
(click)="evaluaterId==evaluateeId?item.pmsWorkingTimScore=4:item.pmsWorkingTimScoreBoss=4"
[checked]="evaluaterId==evaluateeId?item.pmsWorkingTimScore==4:item.pmsWorkingTimScoreBoss==4"><br>
{{item.targetBDetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part5radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part5radioC'+i"
(click)="evaluaterId==evaluateeId?item.pmsWorkingTimScore=3:item.pmsWorkingTimScoreBoss=3"
[checked]="evaluaterId==evaluateeId?item.pmsWorkingTimScore==3:item.pmsWorkingTimScoreBoss==3"><br>
{{item.targetCDetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part5radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part5radioD'+i"
(click)="evaluaterId==evaluateeId?item.pmsWorkingTimScore=2:item.pmsWorkingTimScoreBoss=2"
[checked]="evaluaterId==evaluateeId?item.pmsWorkingTimScore==2:item.pmsWorkingTimScoreBoss==2"><br>
{{item.targetDDetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part5radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part5radioE'+i"
(click)="evaluaterId==evaluateeId?item.pmsWorkingTimScore=1:item.pmsWorkingTimScoreBoss=1"
[checked]="evaluaterId==evaluateeId?item.pmsWorkingTimScore==1:item.pmsWorkingTimScoreBoss==1"><br>
{{item.targetEDetail}}
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{numberFixed2(evaluaterId==evaluateeId?item.pmsWorkingTimScore:item.pmsWorkingTimScoreBoss
)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.weight *
(evaluaterId==evaluateeId?item.pmsWorkingTimScore:item.pmsWorkingTimScoreBoss))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -817,22 +972,25 @@
คะแนนดิบ
</td>
<td class="align-start text-center">
100
{{calRawScorePart5(appraisalPms.data?.part5Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
</td>
<td class="align-start !white-space-normal text-center">
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
20
{{calWeigthPart5(appraisalPms.data?.part5Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
<td class="align-start !white-space-normal text-end" colspan="5">
คะแนนประเมินที่ได้
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
13
{{calExpectationScorePart5(appraisalPms.data?.part5Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
65
{{calExpectationTotalScorePart5(appraisalPms.data?.part5Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -843,16 +1001,18 @@
100
</td>
<td class="align-start !white-space-normal text-center">
</td>
<td class="align-start !white-space-normal text-center">
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
10.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
65
{{calPercentage(calExpectationTotalScorePart5(appraisalPms.data?.part5Detail),calRawScorePart5(appraisalPms.data?.part5Detail))}}
</td>
</tr>
</tbody>
......@@ -916,41 +1076,72 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="data6ListFilter().length">
<tr *ngFor="let item of data6ListFilter();let i = index">
<tbody *ngIf="appraisalPms?.data?.part6Detail">
<tr *ngFor="let item of appraisalPms?.data?.part6Detail;let i = index">
<td class="align-start text-center">
{{i+1}}
</td>
<td class="align-start !white-space-normal">
{{item.crossFunctionalProjectAssignment}}
{{item.groupAssessment1.pmsTopic.tdesc}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.performanceIndicator}}
{{item.groupAssessment1.pmsTopic.indicatorsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.target}}
{{item.groupAssessment1.pmsTopic.performanceGoalsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.unit}}
{{item.groupAssessment1.pmsTopic.detailUnit}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.timeLine}}
{{item.groupAssessment1.pmsTopic.completionDate}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
{{item.groupAssessment1.pmsTopic.weight}}
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
<input type="radio" [name]="'part5radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part5radio'+i+''+i2" [value]="item2" [(ngModel)]="item.targetDegree.check"><br>
{{item2}}
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part6radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part6radioA'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=5:item.scoreTopicExpectationBoss=5"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==5:item.scoreTopicExpectationBoss==5"><br>
{{item.groupAssessment1.pmsTopic.targetAdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part6radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part6radioB'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=4:item.scoreTopicExpectationBoss=4"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==4:item.scoreTopicExpectationBoss==4"><br>
{{item.groupAssessment1.pmsTopic.targetBdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part6radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part6radioC'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=3:item.scoreTopicExpectationBoss=3"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==3:item.scoreTopicExpectationBoss==3"><br>
{{item.groupAssessment1.pmsTopic.targetCdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part6radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part6radioD'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=2:item.scoreTopicExpectationBoss=2"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==2:item.scoreTopicExpectationBoss==2"><br>
{{item.groupAssessment1.pmsTopic.targetDdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part6radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part6radioE'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=1:item.scoreTopicExpectationBoss=1"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==1:item.scoreTopicExpectationBoss==1"><br>
{{item.groupAssessment1.pmsTopic.targetEdetail}}
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{numberFixed2(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss
)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.groupAssessment1.pmsTopic.weight *
(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -960,7 +1151,7 @@
คะแนนดิบ
</td>
<td class="align-start text-center">
100
{{calRawScore(appraisalPms.data?.part6Detail)}}
</td>
<td class="align-start text-center">
</td>
......@@ -970,16 +1161,16 @@
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
20
{{calWeigth(appraisalPms.data?.part6Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
คะแนนประเมินที่ได้
</td>
<td class="align-start !white-space-normal text-center">
13
{{calExpectationScore(appraisalPms.data?.part6Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
65
{{calExpectationTotalScore(appraisalPms.data?.part6Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -999,13 +1190,13 @@
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
10.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
65
{{calPercentage(calExpectationTotalScore(appraisalPms.data?.part6Detail),calRawScore(appraisalPms.data?.part6Detail))}}
</td>
</tr>
</tbody>
......@@ -1070,41 +1261,72 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="data7ListFilter().length">
<tr *ngFor="let item of data7ListFilter();let i = index">
<tbody *ngIf="appraisalPms?.data?.part7Detail">
<tr *ngFor="let item of appraisalPms?.data?.part7Detail;let i = index">
<td class="align-start text-center">
{{i+1}}
</td>
<td class="align-start !white-space-normal">
{{item.specialActivities}}
{{item.groupAssessment1.pmsTopic.tdesc}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.performanceIndicator}}
{{item.groupAssessment1.pmsTopic.indicatorsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.target}}
{{item.groupAssessment1.pmsTopic.performanceGoalsDetail}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.unit}}
{{item.groupAssessment1.pmsTopic.detailUnit}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.timeLine}}
{{item.groupAssessment1.pmsTopic.completionDate}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.weight}}
{{item.groupAssessment1.pmsTopic.weight}}
</td>
<td class="align-start !white-space-normal text-center"
*ngFor="let item2 of item.targetDegree.text;let i2 = index">
<input type="radio" [name]="'part6radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part6radio'+i+''+i2" [value]="item2" [(ngModel)]="item.targetDegree.check"><br>
{{item2}}
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part7radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part7radioA'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=5:item.scoreTopicExpectationBoss=5"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==5:item.scoreTopicExpectationBoss==5"><br>
{{item.groupAssessment1.pmsTopic.targetAdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part7radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part7radioB'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=4:item.scoreTopicExpectationBoss=4"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==4:item.scoreTopicExpectationBoss==4"><br>
{{item.groupAssessment1.pmsTopic.targetBdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part7radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part7radioC'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=3:item.scoreTopicExpectationBoss=3"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==3:item.scoreTopicExpectationBoss==3"><br>
{{item.groupAssessment1.pmsTopic.targetCdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part7radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part7radioD'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=2:item.scoreTopicExpectationBoss=2"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==2:item.scoreTopicExpectationBoss==2"><br>
{{item.groupAssessment1.pmsTopic.targetDdetail}}
</td>
<td class="align-start text-center !white-space-normal ">
<input type="radio" [name]="'part7radio'+i" class="ti-form-radio cursor-pointer"
[id]="'part7radioE'+i"
(click)="evaluaterId==evaluateeId?item.scoreTopicExpectation=1:item.scoreTopicExpectationBoss=1"
[checked]="evaluaterId==evaluateeId?item.scoreTopicExpectation==1:item.scoreTopicExpectationBoss==1"><br>
{{item.groupAssessment1.pmsTopic.targetEdetail}}
</td>
<td class="!p-0"></td>
<td class="align-start !white-space-normal text-center">
{{item.summary}}
{{numberFixed2(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss
)}}
</td>
<td class="align-start !white-space-normal text-center">
{{item.score}}
{{numberFixed2(item.groupAssessment1.pmsTopic.weight *
(evaluaterId==evaluateeId?item.scoreTopicExpectation:item.scoreTopicExpectationBoss))}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -1114,7 +1336,7 @@
คะแนนดิบ
</td>
<td class="align-start text-center">
10
{{calRawScore(appraisalPms.data?.part7Detail)}}
</td>
<td class="align-start text-center">
</td>
......@@ -1124,16 +1346,16 @@
คำนวนถ่วงน้ำหนัก
</td>
<td class="align-start !white-space-normal text-center">
2
{{calWeigth(appraisalPms.data?.part7Detail)}}
</td>
<td class="align-start !white-space-normal text-end" colspan="6">
คะแนนประเมินที่ได้
</td>
<td class="align-start !white-space-normal text-center">
11
{{calExpectationScore(appraisalPms.data?.part7Detail)}}
</td>
<td class="align-start !white-space-normal text-center">
8.5
{{calExpectationTotalScore(appraisalPms.data?.part7Detail)}}
</td>
</tr>
<tr class="bg-table-soft-gray">
......@@ -1153,13 +1375,13 @@
ร้อยละของปัจจัย
</td>
<td class="align-start !white-space-normal text-center">
5.0
-
</td>
<td class="align-start !white-space-normal text-end" colspan="7">
คะแนนที่ได้คิดเป็นร้อยละ
</td>
<td class="align-start !white-space-normal text-center" style="font-size: 1.25rem">
85.00
{{calPercentage(calExpectationTotalScore(appraisalPms.data?.part7Detail),calRawScore(appraisalPms.data?.part7Detail))}}
</td>
</tr>
</tbody>
......
......@@ -3,65 +3,7 @@ import { AppraisalPmsFormModel } from 'src/app/shared/model/appraisal-pms-form.m
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
import { SettingAssessmentService } from 'src/app/shared/services/setting-assessment.service';
export interface DataModel {
hoshin: string
performance: string
target: string
unit: string
timeLine: string
weight: string
targetDegree: { check: string, text: string[] }
summary: string
score: string
}
export interface DataModel2 {
performance: string
target: string
unit: string
timeLine: string
weight: string
targetDegree: { check: string, text: string[] }
summary: string
score: string
}
export interface DataModel3 {
competency: string
weight: string
targetDegree: { check: string, text: string[] }
summary: string
score: string
}
export interface DataModel4 {
timeAttendance: string
target: string
unit: string
weight: string
targetDegree: { check: string, text: string[] }
summary: string
score: string
}
export interface DataModel5 {
crossFunctionalProjectAssignment: string
performanceIndicator: string
target: string
unit: string
timeLine: string
weight: string
targetDegree: { check: string, text: string[] }
summary: string
score: string
}
export interface DataModel6 {
specialActivities: string
performanceIndicator: string
target: string
unit: string
timeLine: string
weight: string
targetDegree: { check: string, text: string[] }
summary: string
score: string
}
export interface DataModel7 {
evaluationFactor: string,
rawScore: string,
......@@ -76,205 +18,14 @@ export interface DataModel7 {
styleUrls: ['./pms-evalution.component.scss']
})
export class PmsEvalutionComponent {
part1show = true
dataList: DataModel[] = [{
hoshin: "C1 CUSTOMER ORIENTED (SQCDME)",
performance: "Customer Satisfaction (QCDS)",
target: "95.0",
unit: "%",
timeLine: "November 2021",
weight: "5.0",
targetDegree: { check: "90-95% Award", text: [">95% Award", "90-95% Award", ">95% no award", "80-90% no award", "<80% no award"] },
summary: "4",
score: "20"
}, {
hoshin: "C2 MANUFACTURING OPTIMIZATION",
performance: "Manufacturing performance",
target: "100.0",
unit: "%",
timeLine: "November 2021",
weight: "5.0",
targetDegree: { check: "81-90%", text: [">90%", "81-90%", "71-80%", "61-70%", "<60%"] },
summary: "4",
score: "20"
}]
part2show = true
data2List: DataModel2[] = [{
performance: "ประสานงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในและภายนอก ตามแผนการฝึกอบรมและพัฒนา",
target: "80.0",
unit: "%",
timeLine: "Jan - Nov",
weight: "10.0",
targetDegree: { check: "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม81-90%จากเป้าหมาย", text: ["จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม>90%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม81-90%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม80%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม70-79%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม<70%จากเป้าหมาย"] },
summary: "4",
score: "40"
}, {
performance: "2.1การบันทึกผลการฝึกอบรมในระบบ(2020 ใช้ Tigersoft)",
target: "100.0",
unit: "%",
timeLine: "Jan - Nov",
weight: "2.0",
targetDegree: { check: "80-84", text: ["บันทึกภายใน", "บันทึกภายใน 3 วัน หลังฝึก การอบรม", "บันทึกภายใน 7 วัน หลังฝึก การอบรม", "80-84", "<79"] },
summary: "2",
score: "4"
}, {
performance: "2.2 การจัดทำรายงาน วิเคราะห์ ผลการฝึกอบรมในแต่ละหลักสูตร",
target: "100.0",
unit: "%",
timeLine: "Jan - Nov",
weight: "2.0",
targetDegree: { check: "สรุปผลการฝึกอบรมในแต่ละเดือนวิเคาระห์เป็นรายปี", text: ["สรุปผลการฝึกอบรมในแต่ละเดือนวิเคาระห์ทุก6เดือน", "สรุปผลการฝึกอบรมในแต่ละเดือนวิเคาระห์เป็นรายปี", "สรุปผลการฝึกอบรมของเดือนไม่เกินวันที่3ของเดือนถัดไป", "สรุปผลการฝึกอบรมของเดือนเกินกว่าวันที่3ของเดือนถัดไป", "สรุปผลการฝึกอบรมของเดือนเกินกว่า3วัน จำนวน>38ครั้ง/ปี"] },
summary: "4",
score: "8"
}]
part3show = true
data3List: DataModel2[] = [{
performance: "ประสานงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในและภายนอก ตามแผนการฝึกอบรมและพัฒนา",
target: "80.0",
unit: "%",
timeLine: "Jan - Nov",
weight: "10.0",
targetDegree: { check: "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม81-90%จากเป้าหมาย", text: ["จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม>90%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม81-90%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม80%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม70-79%จากเป้าหมาย", "จัดการอบรมได้ตามแผนและจำนวนผู้เข้ารับการอบรม<70%จากเป้าหมาย"] },
summary: "4",
score: "40"
}, {
performance: "2.1การบันทึกผลการฝึกอบรมในระบบ(2020 ใช้ Tigersoft)",
target: "100.0",
unit: "%",
timeLine: "Jan - Nov",
weight: "2.0",
targetDegree: { check: "80-84", text: ["บันทึกภายใน", "บันทึกภายใน 3 วัน หลังฝึก การอบรม", "บันทึกภายใน 7 วัน หลังฝึก การอบรม", "80-84", "<79"] },
summary: "2",
score: "4"
}, {
performance: "2.2 การจัดทำรายงาน วิเคราะห์ ผลการฝึกอบรมในแต่ละหลักสูตร",
target: "100.0",
unit: "%",
timeLine: "Jan - Nov",
weight: "2.0",
targetDegree: { check: "สรุปผลการฝึกอบรมในแต่ละเดือนวิเคาระห์เป็นรายปี", text: ["สรุปผลการฝึกอบรมในแต่ละเดือนวิเคาระห์ทุก6เดือน", "สรุปผลการฝึกอบรมในแต่ละเดือนวิเคาระห์เป็นรายปี", "สรุปผลการฝึกอบรมของเดือนไม่เกินวันที่3ของเดือนถัดไป", "สรุปผลการฝึกอบรมของเดือนเกินกว่าวันที่3ของเดือนถัดไป", "สรุปผลการฝึกอบรมของเดือนเกินกว่า3วัน จำนวน>38ครั้ง/ปี"] },
summary: "4",
score: "8"
}]
part4show = true
data4List: DataModel3[] = [{
competency: "Core Competency",
weight: "10.0",
targetDegree: { check: "76.00", text: ["", "", "76.00", "", ""] },
summary: "3",
score: "30"
}, {
competency: "Managerial Competency",
weight: "10.0",
targetDegree: { check: "68.00", text: ["", "", "", "68.00", ""] },
summary: "2",
score: "20"
}, {
competency: "Position Competency",
weight: "10.0",
targetDegree: { check: "89.00", text: ["", "89.00", "", "", ""] },
summary: "4",
score: "40"
}]
part5show = true
data5List: DataModel4[] = [{
timeAttendance: "ลาป่วย",
target: "0.0",
unit: "วัน",
weight: "5.0",
targetDegree: { check: "1-2", text: ["0.0", "1-2", "3-5", "6-10", ">10"] },
summary: "2",
score: "10"
}, {
timeAttendance: "ลาคลอดบุตร",
target: "0.0",
unit: "วัน",
weight: "5.0",
targetDegree: { check: "0.0", text: ["0.0", "<45", "45-90", "91-120", ">120"] },
summary: "5",
score: "25"
}, {
timeAttendance: "ลาฝึกอบรม (ไม่รับค่าจ้าง)",
target: "0.0",
unit: "วัน หรือ ครั้ง",
weight: "5.0",
targetDegree: { check: "0.0", text: ["0.0", "1-4", "5-10", "10-15", ">15"] },
summary: "5",
score: "25"
}, {
timeAttendance: "สาย",
target: "0.0",
unit: "ครั้ง",
weight: "5.0",
targetDegree: { check: ">6", text: ["0.0", "1-2", "3-4", "5-6", ">6"] },
summary: "1",
score: "5"
}]
part6show = true
data6List: DataModel5[] = [{
crossFunctionalProjectAssignment: "Business Continuity Plan (BCP)",
performanceIndicator: "",
target: "1.1 การเข้าร่วม ประชุม และเข้าร่วม ซ้อมแผน\n1.2 คะแนนการ ประเมินจากทีม ผู้บริหารและลูกค้ารวมกัน",
unit: "",
timeLine: "November 2021",
weight: "1.0",
targetDegree: { check: "เข้าร่วม 60 - 79% คะแนนการประเมิน 60- 79%", text: ["เข้าร่วม 90 - 100 % คะแนนการประเมิน 90- 100 %", "เข้าร่วม 80 - 89% คะแนนการประเมิน 80- 89%", "เข้าร่วม 60 - 79% คะแนนการประเมิน 60- 79%", "เข้าร่วม <59% คะแนนการประเมิน <59%", "ไม่เข้าร่วมกิจกรรมเลย"] },
summary: "3",
score: "3"
}, {
crossFunctionalProjectAssignment: "Safety committee",
performanceIndicator: "",
target: "เข้าร่วมประชุม, ร่วมกิจกรรม และปฏิบัติงานตามหน้าที่",
unit: "",
timeLine: "November 2021",
weight: "1.0",
targetDegree: { check: "เข้าร่วม 90-100%", text: ["เข้าร่วม 90-100%", "เข้าร่วม 70-80%", "เข้าร่วม 50%", "เข้าร่วม 30-40%", "เข้าร่วม 10-20%"] },
summary: "5",
score: "5"
}]
part7show = true
data7List: DataModel6[] = [{
specialActivities: "Kaizen",
performanceIndicator: "",
target: "1 Person / 1 Subject / 1 Month",
unit: "Subject",
timeLine: "Nov-21",
weight: "1.0",
targetDegree: { check: "1 เรื่อง x 12 เดือน", text: [">15 เรื่อง/ปี (ขั้นต่ำ 1 เรื่องเดือน)", ">12-15 เรื่อง/ปี (ขั้นต่ำ 1 เรื่องเดือน)", "1 เรื่อง x 12 เดือน", "10-12 เรื่อง/ปี (ขั้นต่ำ 1 เรื่องเดือน)", "<10 เรื่อง/ปี"] },
summary: "3",
score: "3"
}, {
specialActivities: "5S",
performanceIndicator: "",
target: "Result of Audit (Office)",
unit: "%",
timeLine: "Nov-21",
weight: "0.5",
targetDegree: { check: "89-85%", text: ["100-97%", "96-94%", "93-30%", "89-85%", "<84%"] },
summary: "2",
score: "1"
}, {
specialActivities: "QCC",
performanceIndicator: "",
target: "Present QCC Project",
unit: "Project",
timeLine: "Nov-21",
weight: "1.0",
targetDegree: { check: "ยื่นเรื่องและ นำเสนอผลงาน", text: ["อันดับ 1-3", "เข้ารอบ 5 ทีมสุดท้าย", "ยื่นเรื่องและ นำเสนอผลงาน", "สมัครสมาชิก และดำเนินกิจกรรมแต่ไม่ได้นำเสนอผลงาน", "ไม่เข้าร่วมกิจกรรม"] },
summary: "3",
score: "3"
}, {
specialActivities: "คณะกรรมการตามกิจกรรม",
performanceIndicator: "",
target: "5ส, Kaizen, QCC",
unit: "Activity",
timeLine: "Nov-21",
weight: "0.5",
targetDegree: { check: "1กิจกรรม", text: [">2 กิจกรรม", "2 กิจกรรม", "1กิจกรรม", " 89-85%", "<84%"] },
summary: "3",
score: "1.5"
}]
part8show = true
data8List: DataModel7[] = [{
evaluationFactor: "Part 1 : ประเมินผลการปฏิบัติงานตามนโยบายบริษัท (Hoshin)",
......@@ -321,27 +72,6 @@ export class PmsEvalutionComponent {
}]
part9show = true
part10show = true
dataListFilter() {
return this.dataList
}
data2ListFilter() {
return this.data2List
}
data3ListFilter() {
return this.data3List
}
data4ListFilter() {
return this.data4List
}
data5ListFilter() {
return this.data5List
}
data6ListFilter() {
return this.data6List
}
data7ListFilter() {
return this.data7List
}
data8ListFilter() {
return this.data8List
}
......@@ -381,4 +111,109 @@ export class PmsEvalutionComponent {
returnPath() {
this.sendReturnPath.emit()
}
calRawScore(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + item.groupAssessment1.pmsTopic.weight * 5, 0).toFixed(2);
}
return "0.00"
}
calWeigth(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + item.groupAssessment1.pmsTopic.weight, 0).toFixed(2);
}
return "0.00"
}
calExpectationScore(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + (this.evaluaterId == this.evaluateeId ? item.scoreTopicExpectation : item.scoreTopicExpectationBoss), 0).toFixed(2);
}
return "0.00"
}
calExpectationTotalScore(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + ((this.evaluaterId == this.evaluateeId ? item.scoreTopicExpectation : item.scoreTopicExpectationBoss) * item.groupAssessment1.pmsTopic.weight), 0).toFixed(2);
}
return "0.00"
}
calPercentage(A: number, B: number) {
if (B > 0) {
return ((A / B) * 100).toFixed(2);
}
return "0.00"
}
calAverage(score: number) {
const roundedScore = score % 1 <= 0.5 ? Math.floor(score) : Math.round(score);
if (roundedScore >= 90 && roundedScore <= 100) {
return 5;
} else if (roundedScore >= 80 && roundedScore <= 89) {
return 4;
} else if (roundedScore >= 60 && roundedScore <= 79) {
return 3;
} else if (roundedScore >= 40 && roundedScore <= 59) {
return 2;
} else {
return 1;
}
}
calRawScorePart4(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + item.competencyType.weight * 5, 0).toFixed(2);
}
return "0.00"
}
calWeigthPart4(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + item.competencyType.weight, 0).toFixed(2);
}
return "0.00"
}
calExpectationScorePart4(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + this.calAverage(item.averageScore), 0).toFixed(2);
}
return "0.00"
}
calExpectationTotalScorePart4(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + (item.competencyType.weight * this.calAverage(item.averageScore)), 0).toFixed(2);
}
return "0.00"
}
calRawScorePart5(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + item.weight * 5, 0).toFixed(2);
}
return "0.00"
}
calWeigthPart5(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + item.weight, 0).toFixed(2);
}
return "0.00"
}
calExpectationScorePart5(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + (this.evaluaterId == this.evaluateeId ? item.pmsWorkingTimScore : item.pmsWorkingTimScoreBoss), 0).toFixed(2);
}
return "0.00"
}
calExpectationTotalScorePart5(data?: any) {
if (data) {
return data.reduce((sum: number, item: any) => sum + ((this.evaluaterId == this.evaluateeId ? item.pmsWorkingTimScore : item.pmsWorkingTimScoreBoss) * item.weight), 0).toFixed(2);
}
return "0.00"
}
numberFixed2(data?: number) {
if (data) {
return data.toFixed(2)
}
return "0.00"
}
}
\ No newline at end of file
......@@ -132,11 +132,11 @@
</td>
<td class="text-center">
<div class="flex justify-center">
<!-- <button type="button" class="ti-btn rounded-sm ti-btn-soft-mute"
<button type="button" class="ti-btn rounded-sm ti-btn-soft-mute"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(click)="selectSubordinate(item,'',subordinate.select?.evaluationRoundId);pageEvalution='pms'">
PMS
</button> -->
</button>
</div>
</td>
<td class="text-center" style="font-size: 12px;">{{item.sumScore}}</td>
......
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