Commit 4c6d793f by Nakarin Luankla

Merge branch 'DEV' of https://mygit.myhr.co.th/angular/myAppraisal into DEV

# Conflicts:
#	src/app/components/dashboard/dashboard.module.ts
parents dee8abcf 50249a87
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</label> </label>
</td> </td>
<td style="font-size: 12px; width: 60%;"> <td style="font-size: 12px; width: 60%;">
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.tdesc}} {{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</td> </td>
<td style="font-size: 12px;text-align: center;"> <td style="font-size: 12px;text-align: center;">
{{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.expectation}} {{item.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.expectation}}
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
{{item.data.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}} {{item.data.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</td> </td>
<td style="font-size: 12px; width: 60%;"> <td style="font-size: 12px; width: 60%;">
{{item.data.competencyIndicatorsCourses0.tdesc}} {{item.data.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</td> </td>
<td style="font-size: 12px;text-align: center; width: 20%;"> <td style="font-size: 12px;text-align: center; width: 20%;">
{{item.data.competencyIndicatorsCourses0.expectation}}</td> {{item.data.competencyIndicatorsCourses0.expectation}}</td>
......
...@@ -117,6 +117,7 @@ export class EditGroupCompetenciesComponent { ...@@ -117,6 +117,7 @@ export class EditGroupCompetenciesComponent {
}) })
}) })
this.isDataListCheckedAll = false this.isDataListCheckedAll = false
this.searchChange()
this.dataListCheckAll() this.dataListCheckAll()
} }
......
...@@ -107,7 +107,7 @@ export class EditGroupIndicators implements OnInit { ...@@ -107,7 +107,7 @@ export class EditGroupIndicators implements OnInit {
}; };
}); });
this.dataList.sort((a, b) => +a.code - +b.code) this.dataList.sort((a, b) => +a.code - +b.code)
let maxCode = Math.max(-1, ...this.dataList.map(x => +x.code)) let maxCode = Math.max(0, ...this.dataList.map(x => +x.code))
while (this.dataList.length < +this.indicatorsCourses.competencyTopic.expectationLevel) { while (this.dataList.length < +this.indicatorsCourses.competencyTopic.expectationLevel) {
this.dataList.push({ this.dataList.push({
code: (++maxCode) + "", code: (++maxCode) + "",
......
...@@ -151,6 +151,7 @@ import { PmsGradeManagementComponent } from '../performance-management-evaluatio ...@@ -151,6 +151,7 @@ import { PmsGradeManagementComponent } from '../performance-management-evaluatio
import { PmsSubGradeRegistrationComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-sub-grade-registration/pms-sub-grade-registration.component'; import { PmsSubGradeRegistrationComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-sub-grade-registration/pms-sub-grade-registration.component';
import { PmsGroupGradeComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-group-grade/pms-group-grade.component'; import { PmsGroupGradeComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-group-grade/pms-group-grade.component';
import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-assessment.service'; import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-assessment.service';
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
export const MY_DATE_FORMATS = { export const MY_DATE_FORMATS = {
parse: { parse: {
...@@ -332,6 +333,7 @@ export class CustomDateAdapter extends NativeDateAdapter { ...@@ -332,6 +333,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsGroupGradeService, PmsGroupGradeService,
PmsSettingAssessmentService, PmsSettingAssessmentService,
EvaluationAssessmentService, EvaluationAssessmentService,
AppraisalService,
{ {
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
useClass: HttpRequestInterceptor, useClass: HttpRequestInterceptor,
......
...@@ -35,30 +35,30 @@ ...@@ -35,30 +35,30 @@
<div class="p-2 grid grid-cols-12"> <div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div> <div class="col-span-2"></div>
<div class="col-span-1 text-secondary">รหัสพนักงาน</div> <div class="col-span-1 text-secondary">รหัสพนักงาน</div>
<div class="col-span-2">20220064</div> <div class="col-span-2">{{employee.data.employeeId}}</div>
<div class="col-span-1 text-secondary">ตำเเหน่ง</div> <div class="col-span-1 text-secondary">ตำเเหน่ง</div>
<div class="col-span-6">Customer Service Officer - Chain Store</div> <div class="col-span-6">{{employee.data.position.tdesc}}</div>
</div> </div>
<div class="p-2 grid grid-cols-12"> <div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div> <div class="col-span-2"></div>
<div class="col-span-1 text-secondary">ชื่อ - สกุล</div> <div class="col-span-1 text-secondary">ชื่อ - สกุล</div>
<div class="col-span-2">อนันท์ ว่อง</div> <div class="col-span-2">{{employee.data.thFullName}}</div>
<div class="col-span-1 text-secondary">ฝ่าย</div> <div class="col-span-1 text-secondary">ฝ่าย</div>
<div class="col-span-6">ฝ่ายปฏิบัติการ</div> <div class="col-span-6">{{employee.data.bu1.tdesc}}</div>
</div> </div>
<div class="p-2 grid grid-cols-12"> <div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div> <div class="col-span-2"></div>
<div class="col-span-1 text-secondary">แผนก</div> <div class="col-span-1 text-secondary">แผนก</div>
<div class="col-span-2">แผนกบริการลูกค้า</div> <div class="col-span-2">{{employee.data.bu2.tdesc}}</div>
<div class="col-span-1 text-secondary">ส่วน</div> <div class="col-span-1 text-secondary">ส่วน</div>
<div class="col-span-6">ส่วนงานบริการลูกค้า-Chain Store</div> <div class="col-span-6">{{employee.data.bu3.tdesc}}</div>
</div> </div>
<div class="p-2 grid grid-cols-12"> <div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div> <div class="col-span-2"></div>
<div class="col-span-1 text-secondary">ส่วนย่อย</div> <div class="col-span-1 text-secondary">ส่วนย่อย</div>
<div class="col-span-2">-</div> <div class="col-span-2">{{employee.data.bu4.tdesc}}</div>
<div class="col-span-1 text-secondary">ส่วนย่อย 1 </div> <div class="col-span-1 text-secondary">ส่วนย่อย 1 </div>
<div class="col-span-6">-</div> <div class="col-span-6">{{employee.data.bu5.tdesc}}</div>
</div> </div>
</div> </div>
<div class="pb-2"> <div class="pb-2">
...@@ -83,33 +83,43 @@ ...@@ -83,33 +83,43 @@
</ng-container> </ng-container>
</tr> </tr>
</thead> </thead>
<tbody *ngIf="!dataListFilter().length"> <tbody *ngIf="appraisalCompentency.loading">
<tr>
<td class="text-center" colspan="100%">
<div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1"
role="status" aria-label="loading">
<span class="sr-only">Loading...</span>
</div>
</td>
</tr>
</tbody>
<tbody *ngIf="!appraisalCompentency.loading&&!appraisalCompentencyFilter().length">
<tr> <tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล ไม่พบข้อมูล
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="dataListFilter().length"> <tbody *ngIf="!appraisalCompentency.loading&&appraisalCompentencyFilter().length">
<tr *ngFor="let item of dataListFilter();let i = index"> <tr *ngFor="let item of appraisalCompentencyFilter();let i = index">
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
{{item.code}} {{item.data.masfromEvaluationRoundModel.evaluationRoundId}}
</td> </td>
<td> <td>
{{item.name}} {{item.data.masfromEvaluationRoundModel.tdesc}}
</td> </td>
<td> <td>
{{item.startDate}} {{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodStart)}}
</td> </td>
<td> <td>
{{item.endDate}} {{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodEnd)}}
</td> </td>
<td> <td>
{{item.status}} {{item.data.masfromStatusType.tdesc}}
</td> </td>
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
<span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer" <span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer"
(click)="currentTemplate = selfEvaluation1_2Edit ; pathTitle = ['การประเมินผล', 'ประเมินผล']"> (click)="selectAppraisalCompentency(item.data);getAppraisalCompentencyForm();currentTemplate = selfEvaluation1_2Edit ; pathTitle = ['การประเมินผล', 'ประเมินผล']">
ประเมิน ประเมิน
</span> </span>
</td> </td>
...@@ -140,29 +150,39 @@ ...@@ -140,29 +150,39 @@
</ng-container> </ng-container>
</tr> </tr>
</thead> </thead>
<tbody *ngIf="!dataList2Filter().length"> <tbody *ngIf="appraisalPms.loading">
<tr>
<td class="text-center" colspan="100%">
<div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1"
role="status" aria-label="loading">
<span class="sr-only">Loading...</span>
</div>
</td>
</tr>
</tbody>
<tbody *ngIf="!appraisalPms.loading&&!appraisalPmsFilter().length">
<tr> <tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล ไม่พบข้อมูล
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="dataList2Filter().length"> <tbody *ngIf="!appraisalPms.loading&&appraisalPmsFilter().length">
<tr *ngFor="let item of dataList2Filter();let i = index"> <tr *ngFor="let item of appraisalPmsFilter();let i = index">
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
{{item.code}} {{item.data.masfromEvaluationRoundModel.evaluationRoundId}}
</td> </td>
<td> <td>
{{item.name}} {{item.data.masfromEvaluationRoundModel.tdesc}}
</td> </td>
<td> <td>
{{item.startDate}} {{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodStart)}}
</td> </td>
<td> <td>
{{item.endDate}} {{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodEnd)}}
</td> </td>
<td> <td>
{{item.status}} {{item.data.masfromStatusType.tdesc}}
</td> </td>
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
<span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer"> <span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer">
...@@ -268,24 +288,37 @@ ...@@ -268,24 +288,37 @@
</tr> </tr>
<tr class="font-size-12px"> <tr class="font-size-12px">
<ng-container *ngFor="let item of [5,4,3,2,1]"> <ng-container *ngFor="let item of [5,4,3,2,1]">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary text-center"> <th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
{{item}} {{item}}
</th> </th>
</ng-container> </ng-container>
</tr> </tr>
</thead> </thead>
<tbody *ngIf="!dataList3Filter().length"> <tbody *ngIf="appraisalCompentencyForm.loading">
<tr class="hover:table-hover2-hover"> <tr>
<td class="text-center" colspan="100%">
<div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1"
role="status" aria-label="loading">
<span class="sr-only">Loading...</span>
</div>
</td>
</tr>
</tbody>
<tbody *ngIf="!appraisalCompentencyForm.loading&&!appraisalCompentencyFormFilter().length">
<tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล ไม่พบข้อมูล
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="dataList3Filter().length"> <tbody *ngIf="!appraisalCompentencyForm.loading&&appraisalCompentencyFormFilter().length">
<ng-container *ngFor=" let data of dataList3Filter();let i = index"> <ng-container
<tr *ngFor="let item of data.bi;let i2 = index;let f = first" *ngFor="let appraisalCompentencyForm of appraisalCompentencyFormFilter();let i = index">
(mouseenter)="hoveredCode = data.code" (mouseleave)="hoveredCode = null" <tr *ngFor="let bi of appraisalCompentencyForm.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first"
[ngClass]="{ 'table-hover2': data.code === hoveredCode ,'border-none':!f }"> (mouseenter)="hoveredCode = appraisalCompentencyForm.groupAssessment1.competencyIndicatorsCourses1Mini.competencyCourseId"
(mouseleave)="hoveredCode = null"
[ngClass]="{ 'table-hover2': appraisalCompentencyForm.groupAssessment1.competencyIndicatorsCourses1Mini.competencyCourseId === hoveredCode ,'border-none':!f }">
<td class="align-start text-center"> <td class="align-start text-center">
<ng-container *ngIf="f"> <ng-container *ngIf="f">
{{i+1}} {{i+1}}
...@@ -293,24 +326,25 @@ ...@@ -293,24 +326,25 @@
</td> </td>
<td class="align-start text-center"> <td class="align-start text-center">
<ng-container *ngIf="f"> <ng-container *ngIf="f">
{{data.code}} {{appraisalCompentencyForm.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</ng-container> </ng-container>
</td> </td>
<td class="align-start !white-space-normal"> <td class="align-start !white-space-normal">
<ng-container *ngIf="f"> <ng-container *ngIf="f">
{{data.name}} {{appraisalCompentencyForm.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.tdesc}}
</ng-container> </ng-container>
</td> </td>
<td class="align-start !white-space-normal"> <td class="align-start !white-space-normal">
{{item.name}} {{bi.behavioralIndicators}}
</td> </td>
<td class="align-center text-center"> <td class="align-center text-center">
{{showTools(item.tools)}} {{bi.assessmentId}}
</td> </td>
<td class="align-center text-center" <td class="align-center text-center" *ngFor="let value of [5,4,3,2,1]; let i3=index">
*ngFor="let value of ['5','4','3','2','1']; let i3=index">
<input type="radio" [name]="'radio'+i+''+i2" class="ti-form-radio cursor-pointer" <input type="radio" [name]="'radio'+i+''+i2" class="ti-form-radio cursor-pointer"
[id]="'radio'+i+''+i2+''+i3" [value]="value" [(ngModel)]="item.degree"> [id]="'radio'+i+''+i2+''+i3" [value]="value"
[(ngModel)]="bi.competencyBehavioral.scoreTopicExpectation"
(ngModelChange)="caltargetScore(value)">
</td> </td>
</tr> </tr>
</ng-container> </ng-container>
...@@ -321,33 +355,41 @@ ...@@ -321,33 +355,41 @@
<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"></div>
<div class="col-span-3 grid grid-cols-5">
<div class="col-span-5 text-center">ระดับความสามารถ (Target Degree)</div>
</div>
</div>
<div class="py-2 grid grid-cols-11">
<div class="col-span-8"></div>
<div class="col-span-3 grid grid-cols-5">
<div class="col-span-1 text-center" *ngFor="let item of [5,4,3,2,1]">{{item}}</div>
</div>
</div>
<div class="py-2 grid grid-cols-11">
<div class="col-span-8">รวมจำนวนเครื่องหมายแต่ละช่อง (1)</div> <div class="col-span-8">รวมจำนวนเครื่องหมายแต่ละช่อง (1)</div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-1 text-center">14</div> <div class="col-span-1 text-center">{{appraisalCompentencyForm.data.targetScore5}}</div>
<div class="col-span-1 text-center">6</div> <div class="col-span-1 text-center">{{appraisalCompentencyForm.data.targetScore4}}</div>
<div class="col-span-1 text-center">0</div> <div class="col-span-1 text-center">{{appraisalCompentencyForm.data.targetScore3}}</div>
<div class="col-span-1 text-center">0</div> <div class="col-span-1 text-center">{{appraisalCompentencyForm.data.targetScore2}}</div>
<div class="col-span-1 text-center">0</div> <div class="col-span-1 text-center">{{appraisalCompentencyForm.data.targetScore1}}</div>
</div> </div>
</div> </div>
<div class="py-2 grid grid-cols-11"> <div class="py-2 grid grid-cols-11">
<div class="col-span-8">ตัวคูณคะแนนในแต่ละช่อง (2)</div> <div class="col-span-8">ตัวคูณคะแนนในแต่ละช่อง (2)</div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-1 text-center">1</div> <div class="col-span-1 text-center">{{setting.data.settingScore5}}</div>
<div class="col-span-1 text-center">0.8</div> <div class="col-span-1 text-center">{{setting.data.settingScore4}}</div>
<div class="col-span-1 text-center">0.6</div> <div class="col-span-1 text-center">{{setting.data.settingScore3}}</div>
<div class="col-span-1 text-center">0.4</div> <div class="col-span-1 text-center">{{setting.data.settingScore2}}</div>
<div class="col-span-1 text-center">0.2</div> <div class="col-span-1 text-center">{{setting.data.settingScore1}}</div>
</div> </div>
</div> </div>
<div class="py-2 grid grid-cols-11"> <div class="py-2 grid grid-cols-11">
<div class="col-span-8">ถ่วงน้ำหนักผลรวม 1X2</div> <div class="col-span-8">ถ่วงน้ำหนักผลรวม 1X2</div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-1 text-center">14</div> <div class="col-span-1 text-center" *ngFor="let item of [5,4,3,2,1]">{{calWeightScore(item)}}</div>
<div class="col-span-1 text-center">4.80</div>
<div class="col-span-1 text-center">0.00</div>
<div class="col-span-1 text-center">0.00</div>
<div class="col-span-1 text-center">0.00</div>
</div> </div>
</div> </div>
<div class="py-2 grid grid-cols-11"> <div class="py-2 grid grid-cols-11">
...@@ -395,8 +437,8 @@ ...@@ -395,8 +437,8 @@
</ng-container> </ng-container>
</tr> </tr>
</thead> </thead>
<tbody *ngIf="dataList4.length"> <tbody *ngIf="checkSheet.length">
<tr *ngFor="let item of dataList4;let i = index"> <tr *ngFor="let item of checkSheet;let i = index">
<td class="align-start" rowspan="2"> <td class="align-start" rowspan="2">
<div *ngFor="let item2 of item.score"> <div *ngFor="let item2 of item.score">
<span>{{item2}} </span><br> <span>{{item2}} </span><br>
...@@ -409,13 +451,13 @@ ...@@ -409,13 +451,13 @@
</td> </td>
<td class="!p-0"></td> <td class="!p-0"></td>
<td class="align-start text-center"> <td class="align-start text-center">
{{item.e}} ???
</td> </td>
<td class="align-start text-center"> <td class="align-start text-center">
{{item.a}} ???
</td> </td>
<td class="align-start text-center"> <td class="align-start text-center">
{{item.gap}} {{idp.data.score}}
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -431,46 +473,52 @@ ...@@ -431,46 +473,52 @@
<div class="py-1rem px-2rem"> <div class="py-1rem px-2rem">
<div class="py-2 grid grid-cols-7 gap-3"> <div class="py-2 grid grid-cols-7 gap-3">
<div class="col-span-1">ผู้ประเมิน1</div> <div class="col-span-1">ผู้ประเมิน1</div>
<div class="col-span-1">น.ส. พิมพร อูรณการ</div> <div class="col-span-1">{{appraisalCompentencyForm.data.apsassessy.thFullName}}</div>
<div class="col-span-1"> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600 <input type="checkbox" id="hs-basic-usage1" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200"> checked:before:bg-green-200 dark:checked:before:bg-green-200">
<label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label> <label for="hs-basic-usage1" class="sr-only">ยืนยันผล</label>
</div> </div>
<div class="col-span-2"> <div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2"></textarea> <textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"></textarea>
<span class="pt-2"> <span class="pt-2">
วันที่ : วันที่ : {{convertDate(currentDate)}}
</span> </span>
</div> </div>
</div> </div>
<div class="py-2 grid grid-cols-7 gap-3"> <div class="py-2 grid grid-cols-7 gap-3">
<div class="col-span-1">ผู้ประเมิน2</div> <div class="col-span-1">ผู้ประเมิน2</div>
<div class="col-span-1">น.ส. นดี แป้นศรี</div> <div class="col-span-1">{{appraisalCompentencyForm.data.apsapprove2.thFullName}}</div>
<div class="col-span-1"> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage2" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600 <input type="checkbox" id="hs-basic-usage2" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200"> checked:before:bg-green-200 dark:checked:before:bg-green-200"
(click)="appraisalCompentencyForm.data.apsapprove2Status=='0'?appraisalCompentencyForm.data.apsapprove2Status='1':appraisalCompentencyForm.data.apsapprove2Status='0'"
[checked]="appraisalCompentencyForm.data.apsapprove2Status=='1'">
<label for="hs-basic-usage2" class="sr-only">ตรวจสอบ</label> <label for="hs-basic-usage2" class="sr-only">ตรวจสอบ</label>
</div> </div>
<div class="col-span-2"> <div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" value="ใส่ Comment ที่นี่"></textarea> <textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[(ngModel)]="appraisalCompentencyForm.data.apsapprove2Comment"></textarea>
<span> <span>
วันที่ : วันที่ : {{convertDate(currentDate)}}
</span> </span>
</div> </div>
</div> </div>
<div class="py-2 grid grid-cols-7 gap-3"> <div class="py-2 grid grid-cols-7 gap-3">
<div class="col-span-1">ผู้อนุมัติ</div> <div class="col-span-1">ผู้อนุมัติ</div>
<div class="col-span-1">น.ส.ศรีไพ คชา</div> <div class="col-span-1">{{appraisalCompentencyForm.data.apsapprove3.thFullName}}</div>
<div class="col-span-1"> <div class="col-span-1">
<input type="checkbox" id="hs-basic-usage3" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600 <input type="checkbox" id="hs-basic-usage3" class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 focus:ring-green-600 dark:checked:bg-green-600
checked:before:bg-green-200 dark:checked:before:bg-green-200"> checked:before:bg-green-200 dark:checked:before:bg-green-200"
(click)="appraisalCompentencyForm.data.apsapprove3Status=='0'?appraisalCompentencyForm.data.apsapprove3Status='1':appraisalCompentencyForm.data.apsapprove3Status='0'"
[checked]="appraisalCompentencyForm.data.apsapprove3Status=='1'">
<label for="hs-basic-usage3" class="sr-only">อนุมัติ</label> <label for="hs-basic-usage3" class="sr-only">อนุมัติ</label>
</div> </div>
<div class="col-span-2"> <div class="col-span-2">
<textarea type="text" rows="2" class="ti-form-input mb-2" value="ใส่ Comment ที่นี่"></textarea> <textarea type="text" rows="2" class="ti-form-input mb-2" placeholder="ใส่ Comment ที่นี่"
[(ngModel)]="appraisalCompentencyForm.data.apsapprove3Comment"></textarea>
<span> <span>
วันที่ : วันที่ : {{convertDate(currentDate)}}
</span> </span>
</div> </div>
</div> </div>
......
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { ChangeDetectorRef, Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { AppraisalFormModel, MyAppraisalFormModel } from 'src/app/shared/model/appraisal-form.model';
import { AppraisalModel, MyAppraisalModel } from 'src/app/shared/model/appraisal.model';
import { EmployeeModel, MyEmployeeModel } from 'src/app/shared/model/employee.model';
import { IdpDevelopmentModel, MyIdpDevelopmentModel } from 'src/app/shared/model/idp-development.model';
import { MySettingAssessmentModel, SettingAssessmentModel } from 'src/app/shared/model/setting-assessment.model';
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
import { IdpDevelopmentService } from 'src/app/shared/services/idp-development.service';
import { SettingAssessmentService } from 'src/app/shared/services/setting-assessment.service';
import Swal from 'sweetalert2'; import Swal from 'sweetalert2';
export interface DataModel {
code: string,
name: string,
startDate: string,
endDate: string,
status: string
}
export interface Data2Model {
code: string,
name: string,
bi: BiModel[],
}
export interface BiModel { export interface BiModel {
name: string, name: string,
tools: string[], tools: string[],
...@@ -26,119 +22,126 @@ export interface BiModel { ...@@ -26,119 +22,126 @@ export interface BiModel {
styleUrls: ['./self-evaluation.component.scss'] styleUrls: ['./self-evaluation.component.scss']
}) })
export class SelfEvaluationComponent implements OnInit { export class SelfEvaluationComponent implements OnInit {
pathTitle = ['การประเมินผล', 'ประเมินตนเอง'] pathTitle = ['การประเมินผล', 'ประเมินตนเอง']
dataList: DataModel[] = [
{
code: "CC",
name: "การประเมินผลการปฏิบัติงาน (performance-evaluation)",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
},
{
code: "MC",
name: "การประเมินศักยภาพ (Potential Evaluation)",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
},
{
code: "PC",
name: "การประเมินประสิทธิภาพขององค์กร (Organizational Effectiveness Evaluation)",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
}
]
dataList2: DataModel[] = [
{
code: "KPI",
name: "Performance Management System",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
}
]
hoveredCode: string | null = null; hoveredCode: string | null = null;
dataList3: Data2Model[] = [ checkSheet: {
{
code: "CC-01",
name: "จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)",
bi: [{
name: "สอนงานด้านความปลอดภัย และคุณภาพของบริษัทให้กับพนักงานในหน่วยงาน",
tools: ["O"],
degree: "4"
}, {
name: "ติดตามและปรับปรุงการทำงานด้านความปลอดภัยและคุณภาพของทีมงาน",
tools: ["O", "D"],
degree: "5"
}],
},
{
code: "CC-02",
name: "การทำงานเป็นทีมแบบ TAT (TAT Teamwork)",
bi: [{
name: "คิดวิเคราะห์เพื่อแก้ปัญหาด้านความปลอดภัยและคุณภาพในหน่วยงานที่รับผิดชอบ",
tools: ["O", "D"],
degree: "5"
}, {
name: "นำเสนอและจัดทำรายงานด้านความปลอดภัยและคุณภาพทั้งภาษาไทยและภาษาอังกฤษ",
tools: ["O"],
degree: "2"
},
{
name: "สอนงาน และพัฒนาทีมงานให้เกิดการทำงานเป็นทีม โดยยึดเป้าหมายเดียวกัน (TAT Goal) และคำนึงถึง ความต้องการของลูกค้าเป็นหลัก (Next Customer)",
tools: ["O"],
degree: "2"
},
{
name: "สนับสนุนทีมงานให้ดำเนินการตามเป้าหมายของทีม และสิ่งที่ตนเองได้รับมอบหมาย",
tools: ["O", "D"],
degree: "4"
},
{
name: "วิเคราะห์และแก้ไขปัญหาที่เกิดจากการทำงานเป็นทีม รวมถึงการควบคุมดูแลให้เป็นไปตามเป้าหมาย",
tools: ["O"],
degree: "5"
},
{
name: "สื่อสารเพื่อสร้างความเข้าใจ และรับฟังความคิดเห็น ของสมาชิกในทีม ชื่นชมทีมงานแต่ละคนที่เป็น ส่วนหนึ่งในความสำเร็จของทีมร่วมกัน",
tools: ["O", "D"],
degree: "5"
}],
}
]
dataList4: {
score: string[], score: string[],
condition: string[], condition: string[]
e: string,
a: string,
gap: string
}[] = [{ }[] = [{
score: ["หากได้คะแนน 90 - 100% ถือว่า Gap +1", "หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap", "หากได้คะแนน 60 - 79% ถือว่า Gap - 1", "หากได้คะแนน 40 - 59% ถือว่า Gap -", "หากได้คะแนน 0 - 39% ถือว่า Gap - 3"], score: ["หากได้คะแนน 90 - 100% ถือว่า Gap +1", "หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap", "หากได้คะแนน 60 - 79% ถือว่า Gap - 1", "หากได้คะแนน 40 - 59% ถือว่า Gap -", "หากได้คะแนน 0 - 39% ถือว่า Gap - 3"],
condition: ["1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1", "2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %", "3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"], condition: ["1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1", "2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %", "3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"],
e: "4",
a: "3",
gap: "-1"
}] }]
@ViewChild('selfEvaluation1_2', { static: true }) selfEvaluation1_2!: TemplateRef<any>; @ViewChild('selfEvaluation1_2', { static: true }) selfEvaluation1_2!: TemplateRef<any>;
@ViewChild('selfEvaluation1_2Edit', { static: true }) selfEvaluation1_2Edit!: TemplateRef<any>; @ViewChild('selfEvaluation1_2Edit', { static: true }) selfEvaluation1_2Edit!: TemplateRef<any>;
currentTemplate: TemplateRef<any> = this.selfEvaluation1_2 currentTemplate: TemplateRef<any> = this.selfEvaluation1_2
appraisalCompentency: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
appraisalCompentencyForm: { loading: boolean, data: AppraisalFormModel } = { loading: false, data: new MyAppraisalFormModel() }
appraisalPms: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
employee: { loading: boolean, data: EmployeeModel } = { loading: false, data: new MyEmployeeModel() }
setting: { loading: boolean, data: SettingAssessmentModel } = { loading: false, data: new MySettingAssessmentModel() }
idp: { loading: boolean, data: IdpDevelopmentModel } = { loading: false, data: new MyIdpDevelopmentModel() }
currentDate = new Date()
constructor(private appraisalService: AppraisalService,
private employeeService: EmployeeService,
private cdr: ChangeDetectorRef,
private settingAssessmentService: SettingAssessmentService,
private idpDevelopmentService: IdpDevelopmentService
) {
}
ngOnInit(): void { ngOnInit(): void {
this.currentTemplate = this.selfEvaluation1_2 this.currentTemplate = this.selfEvaluation1_2
this.getProfile()
this.getAppraisalCompentencyList()
this.getSettingList()
this.getIdpData()
} }
dataListFilter() {
return this.dataList getIdpData() {
this.idp.loading = true
this.idpDevelopmentService.getList().subscribe({
next: response => {
this.idp.data = new MyIdpDevelopmentModel(response)
this.idp.data.developmentPlan.sort((a, b) => +a.planId - +b.planId)
this.idp.loading = false
this.cdr.detectChanges()
}, error: error => {
this.idp.loading = false
this.cdr.detectChanges()
}
})
}
getSettingList() {
this.setting.loading = true
this.settingAssessmentService.get().subscribe({
next: response => {
this.setting.data = new MySettingAssessmentModel(response)
this.setting.loading = false
this.cdr.detectChanges()
}, error: error => {
this.setting.loading = false
this.cdr.detectChanges()
}
})
}
getProfile() {
this.employee.loading = true
this.employeeService.getProfile().subscribe({
next: response => {
this.employee.data = new MyEmployeeModel(response)
this.employee.loading = false
this.cdr.detectChanges()
}, error: error => {
this.employee.loading = false
this.cdr.detectChanges()
}
})
}
getAppraisalCompentencyList() {
this.appraisalCompentency.loading = true
this.appraisalService.getList().subscribe({
next: response => {
this.appraisalCompentency.dataList = response.map(x => ({ check: false, data: new MyAppraisalModel(x) }))
this.appraisalCompentency.loading = false
this.cdr.detectChanges()
}, error: error => {
this.appraisalCompentency.loading = false
this.cdr.detectChanges()
}
})
} }
dataList2Filter() { appraisalCompentencyFilter() {
return this.dataList2 return this.appraisalCompentency.dataList
} }
dataList3Filter() { selectAppraisalCompentency(data: AppraisalModel) {
return this.dataList3 this.appraisalCompentency.select = new MyAppraisalModel(data)
}
getAppraisalCompentencyForm() {
this.appraisalCompentencyForm.loading = true
this.appraisalService.getFormCompentencyById(this.appraisalCompentency.select.masfromEvaluationRoundModel.evaluationRoundId, this.employee.data.employeeId).subscribe({
next: response => {
this.appraisalCompentencyForm.data = new MyAppraisalFormModel(response)
console.log(" 🐒 this.appraisalCompentencyForm.data:", this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList)
for (let i = 1; i <= 5; i++) {
this.caltargetScore(i)
}
this.appraisalCompentencyForm.loading = false
this.cdr.detectChanges()
}, error: error => {
this.appraisalCompentencyForm.loading = false
this.cdr.detectChanges()
}
})
}
appraisalCompentencyFormFilter() {
return this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList
}
appraisalPmsFilter() {
return this.appraisalPms.dataList
} }
showTools(data: string[]) { showTools(data: string[]) {
return data.join("/") return data.join("/")
...@@ -196,4 +199,66 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -196,4 +199,66 @@ export class SelfEvaluationComponent implements OnInit {
} }
}); });
} }
convertDate(dateInput: string | Date): string {
const date = typeof dateInput === 'string' ? new Date(dateInput) : dateInput;
return date.toLocaleDateString('th-TH', { day: 'numeric', month: 'long', year: 'numeric' });
}
caltargetScore(targetScore: number) {
console.log(" 🐒 targetScore:", this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.filter(x => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter(y => y.competencyBehavioral.scoreTopicExpectation == 1)))
switch (targetScore) {
case (1): {
this.appraisalCompentencyForm.data.targetScore1 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.filter(x => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter(y => y.competencyBehavioral.scoreTopicExpectation == 1).length).length
console.log(" 🐒 1:", this.appraisalCompentencyForm.data.targetScore1)
this.cdr.detectChanges()
break;
}
case (2): {
this.appraisalCompentencyForm.data.targetScore2 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.filter(x => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter(y => y.competencyBehavioral.scoreTopicExpectation == 2).length).length * 2
console.log(" 🐒 2:", this.appraisalCompentencyForm.data.targetScore2)
this.cdr.detectChanges()
break;
}
case (3): {
this.appraisalCompentencyForm.data.targetScore3 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.filter(x => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter(y => y.competencyBehavioral.scoreTopicExpectation == 3).length).length * 3
console.log(" 🐒 3:", this.appraisalCompentencyForm.data.targetScore3)
this.cdr.detectChanges()
break;
}
case (4): {
this.appraisalCompentencyForm.data.targetScore4 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.filter(x => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter(y => y.competencyBehavioral.scoreTopicExpectation == 4).length).length * 4
console.log(" 🐒 4:", this.appraisalCompentencyForm.data.targetScore4)
this.cdr.detectChanges()
break;
}
case (5): {
this.appraisalCompentencyForm.data.targetScore5 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.filter(x => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter(y => y.competencyBehavioral.scoreTopicExpectation == 5).length).length * 5
console.log(" 🐒 5:", this.appraisalCompentencyForm.data.targetScore5)
this.cdr.detectChanges()
break;
}
default: { return }
}
}
calWeightScore(targetScore: number) {
switch (targetScore) {
case (1): {
return +(this.setting.data.settingScore1) * this.appraisalCompentencyForm.data.targetScore1
}
case (2): {
return +(this.setting.data.settingScore2) * this.appraisalCompentencyForm.data.targetScore2
}
case (3): {
return +(this.setting.data.settingScore3) * this.appraisalCompentencyForm.data.targetScore3
}
case (4): {
return +(this.setting.data.settingScore4) * this.appraisalCompentencyForm.data.targetScore4
}
case (5): {
return +(this.setting.data.settingScore5) * this.appraisalCompentencyForm.data.targetScore5
}
default: { return }
}
}
} }
...@@ -158,12 +158,21 @@ export class AssigningApproversComponent { ...@@ -158,12 +158,21 @@ export class AssigningApproversComponent {
this.page = Array.from({ length: Math.ceil(this.groupapprove_listFilter().length / 10) }, (_, i) => i + 1); this.page = Array.from({ length: Math.ceil(this.groupapprove_listFilter().length / 10) }, (_, i) => i + 1);
} }
groupapprove_listFilter() { groupapprove_listFilter() {
return this.groupapprove_list.filter(x => x.apsapprove1.employeeId || x.apsapprove2.employeeId || x.apsapprove3.employeeId || x.apsapprove4.employeeId || x.apsapprove5.employeeId.toLowerCase().includes(this.search.toLowerCase()) || return this.groupapprove_list.filter(x => x.apsapprove1.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove1.fname || x.apsapprove1.lname.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove2.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.fname || x.apsapprove2.lname.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove3.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.fname || x.apsapprove3.lname.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove4.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove4.fname || x.apsapprove4.lname.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove5.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove5.fname || x.apsapprove5.lname.toLowerCase().includes(this.search.toLowerCase())) x.apsapprove1.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove1.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove4.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove4.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove5.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove5.lname.toLowerCase().includes(this.search.toLowerCase()))
} }
selectGroupapprove(groupapprove?: GroupApproveModel) { selectGroupapprove(groupapprove?: GroupApproveModel) {
......
...@@ -229,6 +229,27 @@ ...@@ -229,6 +229,27 @@
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.indicatorsDetail"> <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.indicatorsDetail">
<label class="ti-form-label mt-2rem">เป้าหมายผลงาน</label> <label class="ti-form-label mt-2rem">เป้าหมายผลงาน</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.performanceGoalsDetail"> <input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.performanceGoalsDetail">
<label class="ti-form-label mt-2rem">ค่าเป้าหมาย</label>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">A (5 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetAdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">B (4 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetBdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">C (3 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetCdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">D (2 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetDdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">F (1 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetFdetail">
</div>
<div class="flex justify-end mt-2rem mb-1rem"> <div class="flex justify-end mt-2rem mb-1rem">
<button type="button" <button type="button"
class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10" class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
......
import { EmployeeModel, MyEmployeeModel } from "./employee.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model"
import { MasfromEvaluationAssessment1Model, MyMasfromEvaluationAssessment1Model } from "./masfrom-evaluation-assessment1.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface AppraisalFormModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1Model[]
}
export class MyAppraisalFormModel implements AppraisalFormModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1Model[]
constructor(data?: Partial<AppraisalFormModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.masfromEvaluationRoundModel = new MyEvaluationCycleModel(data?.masfromEvaluationRoundModel)
this.companyId = data?.companyId || ""
this.fromDetail = data?.fromDetail || ""
this.apsassessy = new MyEmployeeModel(data?.apsassessy)
this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1)
this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2)
this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3)
this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4)
this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5)
this.apsassessyStatus = data?.apsassessyStatus || ""
this.apsapprove1Status = data?.apsapprove1Status || ""
this.apsapprove2Status = data?.apsapprove2Status || ""
this.apsapprove3Status = data?.apsapprove3Status || ""
this.apsapprove4Status = data?.apsapprove4Status || ""
this.apsapprove5Status = data?.apsapprove5Status || ""
this.targetScore1 = data?.targetScore1 ?? 0
this.targetScore2 = data?.targetScore2 ?? 0
this.targetScore3 = data?.targetScore3 ?? 0
this.targetScore4 = data?.targetScore4 ?? 0
this.targetScore5 = data?.targetScore5 ?? 0
this.weightedTotal = data?.weightedTotal ?? 0
this.averageScore = data?.averageScore ?? 0
this.apsapprove1Comment = data?.apsapprove1Comment || ""
this.apsapprove2Comment = data?.apsapprove2Comment || ""
this.apsapprove3Comment = data?.apsapprove3Comment || ""
this.apsapprove4Comment = data?.apsapprove4Comment || ""
this.apsapprove5Comment = data?.apsapprove5Comment || ""
this.evaluationResults = data?.evaluationResults || ""
this.sumEvaluationResults = data?.sumEvaluationResults || ""
this.masfromEvaluationAssessment1lList = data?.masfromEvaluationAssessment1lList?.map(x => new MyMasfromEvaluationAssessment1Model(x)) || []
}
}
import { EmployeeModel, MyEmployeeModel } from "./employee.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model"
import { MyPLModel, PLModel } from "./pl.model"
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model"
export interface AppraisalModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
masfromStatusType: StatusCodeModel
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
}
export class MyAppraisalModel implements AppraisalModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
masfromStatusType: StatusCodeModel
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
constructor(data?: Partial<AppraisalModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.masfromEvaluationRoundModel = new MyEvaluationCycleModel(data?.masfromEvaluationRoundModel)
this.companyId = data?.companyId || ""
this.masfromStatusType = new MyStatusCodeModel(data?.masfromStatusType)
this.fromDetail = data?.fromDetail || ""
this.apsassessy = new MyEmployeeModel(data?.apsassessy)
this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1)
this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2)
this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3)
this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4)
this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5)
this.apsassessyStatus = data?.apsassessyStatus || ""
this.apsapprove1Status = data?.apsapprove1Status || ""
this.apsapprove2Status = data?.apsapprove2Status || ""
this.apsapprove3Status = data?.apsapprove3Status || ""
this.apsapprove4Status = data?.apsapprove4Status || ""
this.apsapprove5Status = data?.apsapprove5Status || ""
this.targetScore1 = data?.targetScore1 ?? 0
this.targetScore2 = data?.targetScore2 ?? 0
this.targetScore3 = data?.targetScore3 ?? 0
this.targetScore4 = data?.targetScore4 ?? 0
this.targetScore5 = data?.targetScore5 ?? 0
this.weightedTotal = data?.weightedTotal ?? 0
this.averageScore = data?.averageScore ?? 0
this.apsapprove1Comment = data?.apsapprove1Comment || ""
this.apsapprove2Comment = data?.apsapprove2Comment || ""
this.apsapprove3Comment = data?.apsapprove3Comment || ""
this.apsapprove4Comment = data?.apsapprove4Comment || ""
this.apsapprove5Comment = data?.apsapprove5Comment || ""
this.evaluationResults = data?.evaluationResults || ""
this.sumEvaluationResults = data?.sumEvaluationResults || ""
}
}
export interface CompetencyBehavioralModel {
scoreTopicExpectation: number
companyId: string
}
export class MyCompetencyBehavioralModel implements CompetencyBehavioralModel {
scoreTopicExpectation: number
companyId: string
constructor(data?: Partial<CompetencyBehavioralModel>) {
this.scoreTopicExpectation = data?.scoreTopicExpectation ?? 0
this.companyId = data?.companyId || ""
}
}
import { CompetencyCourseModel, MyCompetencyCourseModel } from "./competency-course.model" import { CompetencyCourseModel, MyCompetencyCourseModel } from "./competency-course.model"
import { CompetencyIndicatorsCourses0Model, MyCompetencyIndicatorsCourses0Model } from "./competency-indicators-courses0.model" import { CompetencyIndicatorsCourses0Model, MyCompetencyIndicatorsCourses0Model } from "./competency-indicators-courses0.model"
import { CompetencyIndicatorsCourses2ListModel, MyCompetencyIndicatorsCourses2ListModel } from "./competency-indicators-courses2-list.model"
export interface CompetencyIndicatorsCourses1MiniModel { export interface CompetencyIndicatorsCourses1MiniModel {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses0Model competencyIndicatorsCourses0: CompetencyIndicatorsCourses0Model
...@@ -7,6 +8,7 @@ export interface CompetencyIndicatorsCourses1MiniModel { ...@@ -7,6 +8,7 @@ export interface CompetencyIndicatorsCourses1MiniModel {
companyId: string companyId: string
competencyCourseId: string competencyCourseId: string
competencyCourse: CompetencyCourseModel[] competencyCourse: CompetencyCourseModel[]
behavioralIndicatorsList: CompetencyIndicatorsCourses2ListModel[]
} }
export class MyCompetencyIndicatorsCourses1MiniModel implements CompetencyIndicatorsCourses1MiniModel { export class MyCompetencyIndicatorsCourses1MiniModel implements CompetencyIndicatorsCourses1MiniModel {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses0Model competencyIndicatorsCourses0: CompetencyIndicatorsCourses0Model
...@@ -14,12 +16,14 @@ export class MyCompetencyIndicatorsCourses1MiniModel implements CompetencyIndica ...@@ -14,12 +16,14 @@ export class MyCompetencyIndicatorsCourses1MiniModel implements CompetencyIndica
companyId: string companyId: string
competencyCourseId: string competencyCourseId: string
competencyCourse: CompetencyCourseModel[] competencyCourse: CompetencyCourseModel[]
behavioralIndicatorsList: CompetencyIndicatorsCourses2ListModel[]
constructor(data?: Partial<CompetencyIndicatorsCourses1MiniModel>) { constructor(data?: Partial<CompetencyIndicatorsCourses1MiniModel>) {
this.competencyIndicatorsCourses0 = new MyCompetencyIndicatorsCourses0Model(data?.competencyIndicatorsCourses0 || {}) this.competencyIndicatorsCourses0 = new MyCompetencyIndicatorsCourses0Model(data?.competencyIndicatorsCourses0 || {})
this.lineNo = data?.lineNo ?? 0 this.lineNo = data?.lineNo ?? 0
this.companyId = data?.companyId || "" this.companyId = data?.companyId || ""
this.competencyCourseId = data?.competencyCourseId || "" this.competencyCourseId = data?.competencyCourseId || ""
this.competencyCourse = data?.competencyCourse?.map(x => new MyCompetencyCourseModel(x)) || [] this.competencyCourse = data?.competencyCourse?.map(x => new MyCompetencyCourseModel(x)) || []
this.behavioralIndicatorsList = data?.behavioralIndicatorsList?.map(x => new MyCompetencyIndicatorsCourses2ListModel(x)) || []
} }
} }
import { CompetencyAssessmentModel, MyCompetencyAssessmentModel } from "./competency-assessment.model" import { CompetencyAssessmentModel, MyCompetencyAssessmentModel } from "./competency-assessment.model"
import { CompetencyBehavioralModel, MyCompetencyBehavioralModel } from "./competency-behavioral.model"
export interface CompetencyIndicatorsCourses2ListModel { export interface CompetencyIndicatorsCourses2ListModel {
runNo: number runNo: number
...@@ -6,6 +7,7 @@ export interface CompetencyIndicatorsCourses2ListModel { ...@@ -6,6 +7,7 @@ export interface CompetencyIndicatorsCourses2ListModel {
assessmentId: string assessmentId: string
behavioralIndicators: string behavioralIndicators: string
competencyAssessment: CompetencyAssessmentModel[] competencyAssessment: CompetencyAssessmentModel[]
competencyBehavioral: CompetencyBehavioralModel
} }
export class MyCompetencyIndicatorsCourses2ListModel implements CompetencyIndicatorsCourses2ListModel { export class MyCompetencyIndicatorsCourses2ListModel implements CompetencyIndicatorsCourses2ListModel {
runNo: number runNo: number
...@@ -13,12 +15,14 @@ export class MyCompetencyIndicatorsCourses2ListModel implements CompetencyIndica ...@@ -13,12 +15,14 @@ export class MyCompetencyIndicatorsCourses2ListModel implements CompetencyIndica
assessmentId: string assessmentId: string
behavioralIndicators: string behavioralIndicators: string
competencyAssessment: CompetencyAssessmentModel[] competencyAssessment: CompetencyAssessmentModel[]
constructor(data: Partial<CompetencyIndicatorsCourses2ListModel>) { competencyBehavioral: CompetencyBehavioralModel
this.runNo = data.runNo ?? 0 constructor(data?: Partial<CompetencyIndicatorsCourses2ListModel>) {
this.companyId = data.companyId || "" this.runNo = data?.runNo ?? 0
this.assessmentId = data.assessmentId || "" this.companyId = data?.companyId || ""
this.behavioralIndicators = data.behavioralIndicators || "" this.assessmentId = data?.assessmentId || ""
this.competencyAssessment = data.competencyAssessment?.map(x => new MyCompetencyAssessmentModel(x)) || [] this.behavioralIndicators = data?.behavioralIndicators || ""
this.competencyAssessment = data?.competencyAssessment?.map(x => new MyCompetencyAssessmentModel(x)) || []
this.competencyBehavioral = new MyCompetencyBehavioralModel(data?.competencyBehavioral)
} }
} }
export interface DevelopmentPlanModel {
planId: string;
companyId: string;
ojtJobAssignment: boolean;
coachMentor: boolean;
training: boolean;
}
export class MyDevelopmentPlanModel implements DevelopmentPlanModel {
planId: string;
companyId: string;
ojtJobAssignment: boolean;
coachMentor: boolean;
training: boolean;
constructor(data?: Partial<DevelopmentPlanModel>) {
this.planId = data?.planId || '';
this.companyId = data?.companyId || '';
this.ojtJobAssignment = data?.ojtJobAssignment ?? false
this.coachMentor = data?.coachMentor ?? false
this.training = data?.training ?? false
}
}
...@@ -19,14 +19,14 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel { ...@@ -19,14 +19,14 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel {
apsPeriodEnd: string; apsPeriodEnd: string;
statusCode: StatusCodeModel; statusCode: StatusCodeModel;
constructor(data: Partial<EvaluationCycleModel>) { constructor(data?: Partial<EvaluationCycleModel>) {
this.evaluationRoundId = data.evaluationRoundId || ""; this.evaluationRoundId = data?.evaluationRoundId || "";
this.tdesc = data.tdesc || ""; this.tdesc = data?.tdesc || "";
this.edesc = data.edesc || ""; this.edesc = data?.edesc || "";
this.apsyear = data.apsyear || ""; this.apsyear = data?.apsyear || "";
this.apsPeriodStart = data.apsPeriodStart || ""; this.apsPeriodStart = data?.apsPeriodStart || "";
this.apsPeriodEnd = data.apsPeriodEnd || ""; this.apsPeriodEnd = data?.apsPeriodEnd || "";
this.statusCode =new MyStatusCodeModel(data.statusCode || {}) this.statusCode =new MyStatusCodeModel(data?.statusCode || {})
} }
} }
import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1MiniModel } from "./competency-indicators-courses1-mini.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface GroupAssessmentMiniModel {
personalLevel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
edesc: string
tdesc: string
}
export class MyGroupAssessmentMiniModel implements GroupAssessmentMiniModel {
personalLevel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
edesc: string
tdesc: string
constructor(data?: Partial<GroupAssessmentMiniModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.competencyIndicatorsCourses1Mini = new MyCompetencyIndicatorsCourses1MiniModel(data?.competencyIndicatorsCourses1Mini)
this.companyId = data?.companyId || ""
this.edesc = data?.edesc || ""
this.tdesc = data?.tdesc || ""
}
}
import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1MiniModel } from "./competency-indicators-courses1-mini.model"
import { GroupAssessmentMiniModel, MyGroupAssessmentMiniModel } from "./group-assessment-mini.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface GroupAssessment1Model {
personalLevelModel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
groupAssessmentMini: GroupAssessmentMiniModel
}
export class MyGroupAssessment1Model implements GroupAssessment1Model {
personalLevelModel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
groupAssessmentMini: GroupAssessmentMiniModel
constructor(data?: Partial<GroupAssessment1Model>) {
this.personalLevelModel = new MyPLModel(data?.personalLevelModel)
this.competencyIndicatorsCourses1Mini = new MyCompetencyIndicatorsCourses1MiniModel(data?.competencyIndicatorsCourses1Mini)
this.companyId = data?.companyId || ""
this.groupAssessmentMini = new MyGroupAssessmentMiniModel(data?.groupAssessmentMini)
}
}
export interface DevelopmentPlan { import { DevelopmentPlanModel, MyDevelopmentPlanModel } from "./development-plan.model";
planId: string;
companyId: string; export interface IdpDevelopmentModel {
ojtJobAssignment: boolean; evaluationId: string;
coachMentor: boolean; companyId: string;
training: boolean; score: number;
developmentPlan: DevelopmentPlanModel[];
}
export class MyIdpDevelopmentModel implements IdpDevelopmentModel {
evaluationId: string;
companyId: string;
score: number;
developmentPlan: DevelopmentPlanModel[];
constructor(data?: Partial<IdpDevelopmentModel>) {
this.evaluationId = data?.evaluationId || '';
this.companyId = data?.companyId || '';
this.score = data?.score ?? 0;
this.developmentPlan = data?.developmentPlan?.map(x => new MyDevelopmentPlanModel(x)) || [];
} }
}
export interface IdpDevelopmentModel {
evaluationId: string;
companyId: string;
score: number;
developmentPlan: DevelopmentPlan[];
}
export class MyIdpDevelopmentModel implements IdpDevelopmentModel {
evaluationId: string;
companyId: string;
score: number;
developmentPlan: DevelopmentPlan[];
constructor(data: Partial<IdpDevelopmentModel>) {
this.evaluationId = data.evaluationId || '';
this.companyId = data.companyId || '';
this.score = data.score ?? 0;
this.developmentPlan = data.developmentPlan || [];
}
}
\ No newline at end of file
import { GroupAssessment1Model, MyGroupAssessment1Model } from "./group-assessment1.model"
export interface MasfromEvaluationAssessment1Model {
companyId: string
lineNo: number
groupAssessment1: GroupAssessment1Model
}
export class MyMasfromEvaluationAssessment1Model implements MasfromEvaluationAssessment1Model {
companyId: string
lineNo: number
groupAssessment1: GroupAssessment1Model
constructor(data?: Partial<MasfromEvaluationAssessment1Model>) {
this.companyId = data?.companyId || ""
this.lineNo = data?.lineNo ?? 0
this.groupAssessment1 = new MyGroupAssessment1Model(data?.groupAssessment1)
}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { PLModel } from '../model/pl.model';
import { AlertModel } from '../model/alert.model';
import { AppraisalModel } from '../model/appraisal.model';
import { AppraisalFormModel } from '../model/appraisal-form.model';
@Injectable({
providedIn: 'root'
})
export class AppraisalService {
api = "/appraisal"
urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) {
}
getFormCompentencyById(evaluationRoundId: string, apsassessy: string): Observable<AppraisalFormModel> {
return this.http.get<AppraisalFormModel>(this.urlApi + "/competency/" + evaluationRoundId + "/" + apsassessy)
}
getList(): Observable<AppraisalModel[]> {
return this.http.get<AppraisalModel[]>(this.urlApi + "/competency/emp")
}
post(body: AppraisalModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body)
}
}
\ No newline at end of file
...@@ -34,6 +34,9 @@ export class EmployeeService { ...@@ -34,6 +34,9 @@ export class EmployeeService {
getById(employeeId: string): Observable<EmployeeModel> { getById(employeeId: string): Observable<EmployeeModel> {
return this.http.get<EmployeeModel>(this.urlApi + "/profile?employeeId=" + employeeId) return this.http.get<EmployeeModel>(this.urlApi + "/profile?employeeId=" + employeeId)
} }
getProfile(): Observable<EmployeeModel> {
return this.http.get<EmployeeModel>(this.urlApi + "/profile")
}
add(body: EmployeeModel): Observable<AlertModel> { add(body: EmployeeModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi + '/profile-create', body) return this.http.post<AlertModel>(this.urlApi + '/profile-create', body)
} }
......
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