Commit 4554ccd0 by Nattana Chaiyamat

การประเมินผล

parent 30f5cafe
<app-page-header [pathTitle]="pathTitle"></app-page-header>
<div class="bg-card-white"> <div class="bg-card-white">
</div> </div>
<ng-container *ngIf="appraisalCompentency.data"> <div class="block-main-content" *ngIf="appraisalCompentency.data">
<div class="pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center"> <div class="pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center">
<div class="flex"> <div class="flex">
<button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500" <button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
...@@ -393,4 +394,4 @@ ...@@ -393,4 +394,4 @@
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
</div> </div>
</ng-container> </div>
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,7 @@ import Swal from 'sweetalert2'; ...@@ -11,6 +11,7 @@ import Swal from 'sweetalert2';
styleUrls: ['./evaluation.component.scss'] styleUrls: ['./evaluation.component.scss']
}) })
export class EvaluationComponent implements OnInit { export class EvaluationComponent implements OnInit {
@Input() pathTitle: string[] = []
@Input() evaluationRoundId = "" @Input() evaluationRoundId = ""
@Input() evaluateeId = "" @Input() evaluateeId = ""
@Input() evaluaterId = "" @Input() evaluaterId = ""
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
</nav> </nav>
</div> </div>
<div class="pt-50px" *ngIf="appraisalCompentency.dataList.length"> <div class="pt-50px" *ngIf="appraisalCompentency.dataList.length">
<div *ngFor="let item of appraisalCompentency.dataList; let i=index" [id]="'underline-'+(i+1)" <div *ngFor="let item of appraisalCompentency.dataList; let i=index ; let f= first"
role="tabpanel"> [id]="'underline-'+(i+1)" role="tabpanel" [class.hidden]="!f">
<div class="pb-2"> <div class="pb-2">
<div class="w-full min-height-50px justify-between items-center pb-2"> <div class="w-full min-height-50px justify-between items-center pb-2">
<div class="px-2rem py-3 bg-soft-secondary font-size-18px font-weight-700 text-primary"> <div class="px-2rem py-3 bg-soft-secondary font-size-18px font-weight-700 text-primary">
...@@ -201,7 +201,8 @@ ...@@ -201,7 +201,8 @@
<ng-template #selfEvaluationEdit> <ng-template #selfEvaluationEdit>
<app-evaluation (sendReturnPath)="currentTemplate = this.selfEvaluation" <app-evaluation [pathTitle]="['การประเมินผล', 'ประเมินตนเอง','ประเมิน']"
(sendReturnPath)="currentTemplate = selfEvaluation ; pathTitle = ['การประเมินผล', 'ประเมินตนเอง']"
[evaluationRoundId]="appraisalCompentency.select?.masfromEvaluationRound?.evaluationRoundId || ''" [evaluationRoundId]="appraisalCompentency.select?.masfromEvaluationRound?.evaluationRoundId || ''"
[evaluaterId]="evaluatee.data.employeeId" [evaluateeId]="evaluatee.data.employeeId" [evaluaterId]="evaluatee.data.employeeId" [evaluateeId]="evaluatee.data.employeeId"
[competencyTypeId]="competencyTypeId"></app-evaluation> [competencyTypeId]="competencyTypeId"></app-evaluation>
......
...@@ -20,161 +20,167 @@ ...@@ -20,161 +20,167 @@
</div> </div>
</div> </div>
<div class="pt-50px pb-2rem" *ngIf="subordinate.dataList.length"> <div class="pt-50px pb-2rem" *ngIf="subordinate.dataList.length">
<div class="header-title-type p-0 px-2rem"> <div *ngFor="let item of subordinate.dataList; let i=index;let f=first" [id]="'underline-'+(i+1)"
<div class="flex justify-end"> role="tabpanel" [class.hidden]="!f">
<div class="px-1"> <div class="header-title-type p-0 px-2rem">
<div class="relative shadow-md"> <div class="flex justify-end">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <div class="px-1">
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " <div class="relative shadow-md">
placeholder="Search by No. or Name" style="height: 40px;" [(ngModel)]="search" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
(ngModelChange)="searchChange()"> class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
<div placeholder="Search" style="height: 40px;" [(ngModel)]="search"
class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"> (ngModelChange)="searchChange()">
<i class="ri-search-line text-gray"></i> <div
class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
<i class="ri-search-line text-gray"></i>
</div>
</div> </div>
</div> </div>
</div> <div class="px-1">
<div class="px-1"> <button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md"> <i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i> Help
Help </button>
</button> </div>
</div> </div>
</div> </div>
</div> <div class="w-full min-height-50px justify-between items-center py-2">
<div class="w-full min-height-50px justify-between items-center py-2"> <div class="px-2rem py-3 bg-soft-secondary font-size-18px font-weight-700 text-primary">
<div class="px-2rem py-3 bg-soft-secondary font-size-18px font-weight-700 text-primary"> ประเมินสมรรถนะ
ประเมินสมรรถนะ </div>
</div> </div>
</div> <div class=" px-2rem">
<div class=" px-2rem"> <div class="overflow-auto table-bordered rounded-t-md">
<div class="overflow-auto table-bordered rounded-t-md"> <div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1"> <div class="overflow-auto shadow-md">
<div class="overflow-auto shadow-md"> <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover"> <thead>
<thead> <tr>
<tr> <ng-container
<ng-container *ngFor="let item of ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','PMS','ผลประเมิน','เกรด','สถานะ','สถานะผู้ประเมิน']; let f = first; let l = last; let i = index">
*ngFor="let item of ['รหัสพนักงาน','ชื่อพนักงาน','ตำเเหน่งงาน','ประเมิน','เเผนพัฒนา','PMS','ผลประเมิน','เกรด','สถานะ','สถานะผู้ประเมิน']; let f = first; let l = last; let i = index"> <th scope="col"
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
class="relative px-10px py-10px bg-soft-secondary text-primary" [class.!text-center]="f||l||'ประเมิน'||'เเผนพัฒนา'||'PMS'">
[class.!text-center]="f||l||'ประเมิน'||'เเผนพัฒนา'||'PMS'"> <span class="text-sm">{{ item }}</span>
<span class="text-sm">{{ item }}</span> <div class="absolute top-1/2 transform -translate-y-1/2 right-0"
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l&&!f&&!i">
*ngIf="!l&&!f&&!i"> <svg class="head-table-icon" xmlns="http://www.w3.org/2000/svg"
<svg class="head-table-icon" xmlns="http://www.w3.org/2000/svg" width="50" height="16" fill="currentColor"
width="50" height="16" fill="currentColor" viewBox="0 0 16 16"> viewBox="0 0 16 16">
<path <path
d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"> d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z">
</path> </path>
</svg> </svg>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody *ngIf="subordinate.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="!subordinate.loading&&!subordinateFilter().length">
<tr>
<td class="text-center" colspan="100%">
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody *ngIf="!subordinate.loading&&subordinateFilter().length">
<tr *ngFor="let item of subordinateFilter();let i = index">
<td class="text-center" style="font-size: 12px; width: 150px;">
{{item.apsassessy.employeeId}}
</td>
<td style="font-size: 12px; width: 175px;">
{{item.apsassessy.thFullName}}
</td>
<td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center">
<div class="flex">
<button type="button" class="ti-btn rounded-sm ti-btn-soft-success"
*ngFor="let type of item.typeList"
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(click)="selectSubordinate(item,type.competencyTypeId,subordinate.select?.evaluationRoundId);pageEvalution='evaluation'">
{{type.shortName}}
</button>
</div> </div>
</th> </td>
</ng-container> <td class="text-center">
</tr> <button type="button" class="ti-btn rounded-sm ti-btn-soft-dark"
</thead> style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;">
<tbody *ngIf="subordinate.loading"> IDP
<tr> </button>
<td class="text-center" colspan="100%"> </td>
<div *ngFor="let item of [1,2,3]" <td class="text-center">
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="!subordinate.loading&&!subordinateFilter().length">
<tr>
<td class="text-center" colspan="100%">
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody *ngIf="!subordinate.loading&&subordinateFilter().length">
<tr *ngFor="let item of subordinateFilter();let i = index">
<td class="text-center" style="font-size: 12px; width: 150px;">
{{item.apsassessy.employeeId}}
</td>
<td style="font-size: 12px; width: 175px;">
{{item.apsassessy.thFullName}}
</td>
<td style="font-size: 12px;">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center">
<div class="flex">
<button type="button" class="ti-btn rounded-sm ti-btn-soft-success" <button type="button" class="ti-btn rounded-sm ti-btn-soft-success"
*ngFor="let type of item.typeList" style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;">
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;" ประเมิน
(click)="selectSubordinate(item,type.competencyTypeId,subordinate.select?.evaluationRoundId);pageEvalution='evaluation'">
{{type.shortName}}
</button> </button>
</div> </td>
</td> <td class="text-center" style="font-size: 12px;">{{item.sumScore}}</td>
<td class="text-center"> <td class="text-center" style="font-size: 12px;">{{item.gread}}</td>
<button type="button" class="ti-btn rounded-sm ti-btn-soft-dark" <td class="text-center" style="font-size: 12px;">
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"> <!-- {{item.masfromStatusType.tdesc}} -->
IDP </td>
</button> <td class="text-center" style="font-size: 12px;">
</td> {{item.apsapproveType.tdesc}}
<td class="text-center"> </td>
<button type="button" class="ti-btn rounded-sm ti-btn-soft-success" </tr>
style="height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"> </tbody>
ประเมิน </table>
</button> </div>
</td>
<td class="text-center" style="font-size: 12px;">{{item.sumScore}}</td>
<td class="text-center" style="font-size: 12px;">{{item.gread}}</td>
<td class="text-center" style="font-size: 12px;">
<!-- {{item.masfromStatusType.tdesc}} -->
</td>
<td class="text-center" style="font-size: 12px;">{{item.apsapproveType.tdesc}}
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> <nav class="pagination-style-3 my-5" *ngIf="page.length">
<nav class="pagination-style-3 my-5" *ngIf="page.length"> <ul class="ti-pagination">
<ul class="ti-pagination"> <li>
<li> <a aria-label="anchor" class="page-link" href="javascript:void(0);"
<a aria-label="anchor" class="page-link" href="javascript:void(0);" (click)="currentPage = (currentPage-1 || 1)">
(click)="currentPage = (currentPage-1 || 1)"> <i class="ri-arrow-left-s-line align-middle rtl:rotate-180"></i>
<i class="ri-arrow-left-s-line align-middle rtl:rotate-180"></i>
</a>
</li>
<li *ngFor="let item of page;let f = first;let l = last">
<ng-container *ngIf="item==3&&currentPage!=1&&currentPage!=2&&currentPage!=3">
<a aria-label="anchor" class="page-link" href="javascript:void(0);"><i
class="ri-more-line"></i>
</a> </a>
</ng-container> </li>
<ng-container *ngIf="(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"> <li *ngFor="let item of page;let f = first;let l = last">
<a class="page-link" href="javascript:void(0);" [class.active]="item==currentPage" <ng-container *ngIf="item==3&&currentPage!=1&&currentPage!=2&&currentPage!=3">
(click)="currentPage=item">{{item}} <a aria-label="anchor" class="page-link" href="javascript:void(0);"><i
class="ri-more-line"></i>
</a>
</ng-container>
<ng-container
*ngIf="(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)">
<a class="page-link" href="javascript:void(0);" [class.active]="item==currentPage"
(click)="currentPage=item">{{item}}
</a>
</ng-container>
<ng-container
*ngIf="item==page.length-2&&currentPage!=page.length&&currentPage!=page.length-1&&currentPage!=page.length-2">
<a aria-label="anchor" class="page-link" href="javascript:void(0);"><i
class="ri-more-line"></i>
</a>
</ng-container>
</li>
<li>
<a aria-label="anchor" class="page-link" href="javascript:void(0);"
(click)="currentPage = (currentPage > page.length-1 ? currentPage: currentPage+1 )">
<i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i>
</a> </a>
</ng-container> </li>
<ng-container </ul>
*ngIf="item==page.length-2&&currentPage!=page.length&&currentPage!=page.length-1&&currentPage!=page.length-2"> <ul class="nav-tabs mt-3">
<a aria-label="anchor" class="page-link" href="javascript:void(0);"><i <span>Show {{((currentPage-1) * 10)+1}} to {{subordinateFilter().length<10
class="ri-more-line"></i> ?subordinateFilter().length: (currentPage==page.length ? ((currentPage * 10) -
</a> ((currentPage * 10) - subordinateFilter().length) ) :(currentPage * 10) ) }} of
</ng-container> {{subordinateFilter().length}} items</span>
</li> </ul>
<li> </nav>
<a aria-label="anchor" class="page-link" href="javascript:void(0);" </div>
(click)="currentPage = (currentPage > page.length-1 ? currentPage: currentPage+1 )">
<i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i>
</a>
</li>
</ul>
<ul class="nav-tabs mt-3">
<span>Show {{((currentPage-1) * 10)+1}} to {{subordinateFilter().length<10
?subordinateFilter().length: (currentPage==page.length ? ((currentPage * 10) -
((currentPage * 10) - subordinateFilter().length) ) :(currentPage * 10) ) }} of
{{subordinateFilter().length}} items</span>
</ul>
</nav>
</div> </div>
</div> </div>
</div> </div>
...@@ -187,7 +193,9 @@ ...@@ -187,7 +193,9 @@
<app-pms-evalution (sendPageEvalution)="pageEvalution=$event"></app-pms-evalution> <app-pms-evalution (sendPageEvalution)="pageEvalution=$event"></app-pms-evalution>
</ng-container> </ng-container>
<ng-container *ngIf="pageEvalution=='evaluation'"> <ng-container *ngIf="pageEvalution=='evaluation'">
<app-evaluation (sendReturnPath)="pageEvalution=''" [evaluationRoundId]="formEvaluation.evaluationRoundId" <app-evaluation [pathTitle]="['การประเมินผล', 'ประเมินโดยหัวหน้า','ประเมิน']"
[evaluaterId]="formEvaluation.evaluaterId" [evaluateeId]="formEvaluation.evaluateeId" (sendReturnPath)="pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"
[competencyTypeId]="formEvaluation.competencyTypeId"></app-evaluation> [competencyTypeId]="formEvaluation.competencyTypeId"></app-evaluation>
</ng-container> </ng-container>
\ No newline at end of file
...@@ -35,26 +35,27 @@ export class SupervisorEvaluationComponent { ...@@ -35,26 +35,27 @@ export class SupervisorEvaluationComponent {
this.cdr.detectChanges() this.cdr.detectChanges()
if (this.subordinate.dataList.length) { if (this.subordinate.dataList.length) {
this.subordinate.select = JSON.parse(JSON.stringify(this.subordinate.dataList[0])) this.subordinate.select = JSON.parse(JSON.stringify(this.subordinate.dataList[0]))
this.cdr.detectChanges()
} }
console.log(" 🐒 subordinate.dataList.length:", this.subordinate.dataList.length)
this.searchChange() this.searchChange()
this.cdr.detectChanges()
}, error: error => { }, error: error => {
this.cdr.detectChanges() this.cdr.detectChanges()
} }
}) })
} }
selectDataList(data: AppraisalSubordinateModel) { selectDataList(data?: AppraisalSubordinateModel) {
this.subordinate.select = JSON.parse(JSON.stringify(data)) this.subordinate.select = JSON.parse(JSON.stringify(data))
this.searchChange()
this.cdr.detectChanges() this.cdr.detectChanges()
this.searchChange()
} }
subordinateFilter() { subordinateFilter() {
if (this.subordinate.select) { if (this.subordinate.select) {
return this.subordinate.select.masfromevaluationassessment.filter(x => { return this.subordinate.select.masfromevaluationassessment.filter(x => {
return x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase()) return x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.position.tdesc.toLowerCase().includes(this.search.toLowerCase())
}) })
} }
return [] return []
......
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