Commit f7aee2de by Nakarin Luankla

การจัดการรอบการประเมิน รอบการประเมิน

parent 8ff65caf
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
(click)="activeTab='underline-1';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'รอบการประเมิน']"> (click)="activeTab='underline-1';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'รอบการประเมิน']">
รอบการประเมิน รอบการประเมิน
</a> </a>
<a class="font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary" <!-- <a class="font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary"
href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2" href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2"
aria-controls="underline-2" aria-controls="underline-2"
(click)="activeTab='underline-2';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'กำหนดฟอร์มเอกสาร']"> (click)="activeTab='underline-2';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'กำหนดฟอร์มเอกสาร']">
กำหนดฟอร์มเอกสาร กำหนดฟอร์มเอกสาร
</a> </a> -->
</nav> </nav>
</div> </div>
<div class="px-2rem" [ngClass]="{'pt-50px': groupShow !== '2'}"> <div class="px-2rem" [ngClass]="{'pt-50px': groupShow !== '2'}">
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " placeholder="Search by No. or Name" [(ngModel)]="search" (ngModelChange)="searchChange()" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " placeholder="Search" [(ngModel)]="search" (ngModelChange)="searchChange()"
style="height: 40px;"> style="height: 40px;">
<div <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"> 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">
...@@ -72,14 +72,14 @@ ...@@ -72,14 +72,14 @@
</thead> </thead>
<tbody> <tbody>
<tr <tr
*ngFor="let item of assessmentListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"> *ngFor="let item of assessmentListFilter() | slice:((currentPage-1) * this.pageSize) : (((currentPage-1) * this.pageSize) + this.pageSize);let i = index">
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
{{item.masfromEvaluationRound.evaluationRoundId}}</td> {{item.masfromEvaluationRound.evaluationRoundId}}</td>
<td>{{item.apsassessy.fname}} {{item.apsassessy.lname}}</td> <td>{{item.apsassessy.fname}} {{item.apsassessy.lname}}</td>
<td class="text-center">{{item.apsassessy.position.tdesc}}</td> <td class="text-center">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center">{{item.personalLevel.tdesc}}</td> <td class="text-center">{{item.personalLevel.tdesc}}</td>
<td class="flex justify-center items-center space-x-2"> <td class="flex justify-center items-center space-x-2">
<i class="ti ti-edit cursor-pointer i-gray fs-xl px-1" (click)="openAddRoundModel(item.masfromEvaluationRound.evaluationRoundId,item.apsassessy.employeeId,item,'form-pm-emp')" ></i> <i class="ti ti-edit cursor-pointer i-gray fs-xl px-1" *ngIf="item.active" (click)="openAddRoundModel(item.masfromEvaluationRound.evaluationRoundId,item.apsassessy.employeeId,item,'form-pm-emp')" ></i>
<input type="checkbox" id="hs-small-switch{{i+1}}" [(ngModel)]="item.active" <input type="checkbox" id="hs-small-switch{{i+1}}" [(ngModel)]="item.active"
class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 dark:checked:bg-green-600 checked:before:bg-green-200 dark:checked:before:bg-green-200 shrink-0 w-11 h-6 before:w-5 before:h-5"> class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 dark:checked:bg-green-600 checked:before:bg-green-200 dark:checked:before:bg-green-200 shrink-0 w-11 h-6 before:w-5 before:h-5">
</td> </td>
...@@ -91,42 +91,49 @@ ...@@ -91,42 +91,49 @@
</div> </div>
<nav class="pagination-style-3 overflow-auto my-5" *ngIf="page.length"> <nav class="pagination-style-3 overflow-auto 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> </a>
</li> </li>
<li *ngFor="let item of page;let f = first;let l = last"> <li *ngFor="let item of page;let f = first;let l = last">
<ng-container *ngIf="item==3&&currentPage!=1&&currentPage!=2&&currentPage!=3"> <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 aria-label="anchor" class="page-link" href="javascript:void(0);"><i class="ri-more-line"></i>
</a> </a>
</ng-container> </ng-container>
<ng-container *ngIf="(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"> <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" <a class="page-link" href="javascript:void(0);" [class.active]="item==currentPage"
(click)="currentPage=item">{{item}} (click)="currentPage=item">{{item}}
</a> </a>
</ng-container> </ng-container>
<ng-container <ng-container
*ngIf="item==page.length-2&&currentPage!=page.length&&currentPage!=page.length-1&&currentPage!=page.length-2"> *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 aria-label="anchor" class="page-link" href="javascript:void(0);"><i class="ri-more-line"></i>
</a> </a>
</ng-container> </ng-container>
</li> </li>
<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 > page.length-1 ? currentPage: currentPage+1 )"> (click)="currentPage = (currentPage > page.length-1 ? currentPage: currentPage+1 )">
<i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i> <i class="ri-arrow-right-s-line align-middle rtl:rotate-180"></i>
</a> </a>
</li> </li>
<li>
<select class="ti-form-select" [(ngModel)]="pageSize" (ngModelChange)="searchChange()">
<option [value]="10">10</option>
<option [value]="20">20</option>
<option [value]="50">50</option>
<option [value]="100">100</option>
</select>
</li>
</ul> </ul>
<ul class="nav-tabs mt-3"> <ul class="nav-tabs mt-3">
<span>Show {{((currentPage-1) * 10)+1}} to {{assessmentListFilter().length<10 <span>Show {{((currentPage-1) * pageSize)+1}} to {{(assessmentListFilter().length < pageSize) ?assessmentListFilter().length:
?assessmentListFilter().length: (currentPage==page.length ? ((currentPage * 10) - ((currentPage * (currentPage==page.length ? ((currentPage * pageSize) - ((currentPage * pageSize) - assessmentListFilter().length) )
10) - assessmentListFilter().length) ) :(currentPage * 10) ) }} of {{assessmentListFilter().length}} :(currentPage * pageSize) ) }} of {{assessmentListFilter().length}} items</span>
items</span>
</ul> </ul>
</nav> </nav>
</div> </div>
...@@ -200,7 +207,7 @@ ...@@ -200,7 +207,7 @@
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" style="height: 40px;" [(ngModel)]="searchRound" (ngModelChange)="searchChange()"> placeholder="Search" style="height: 40px;" [(ngModel)]="searchRound" (ngModelChange)="searchChange()">
<div <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"> 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> <i class="ri-search-line text-gray"></i>
...@@ -208,14 +215,14 @@ ...@@ -208,14 +215,14 @@
</div> </div>
</div> </div>
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md" (click)="openModalClass('form-assessment')"> <button type="button" class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md" (click)="openModalClass('form-assessment');searchIndicatorsChange()">
<i class="ri-add-line"></i> <i class="ri-add-line"></i>
Add Add
</button> </button>
</div> </div>
<div class="px-1"> <div class="px-1">
<button href="javascript:void(0);" <button href="javascript:void(0);"
class="ti-btn ti-btn-soft-danger h-20px m-0 shadow-md" (click)="openModalClass('modal-alert','deleteForm')"> class="ti-btn ti-btn-soft-danger h-20px m-0 shadow-md" (click)="deleteAssessmentList()">
<i class="ri-delete-bin-6-line"></i> <i class="ri-delete-bin-6-line"></i>
Delete Delete
</button> </button>
...@@ -256,8 +263,8 @@ ...@@ -256,8 +263,8 @@
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="empassessmentListFilter().length > 0"> <tbody *ngIf="!loading&&empassessmentListFilter().length > 0">
<tr *ngFor="let item of empassessmentListFilter() | slice:((currentPageRound-1) * 10) : (((currentPageRound-1) * 10) + 10);let i = index"> <tr *ngFor="let item of empassessmentListFilter() | slice:((currentPageRound-1) * pageSizeRound) : (((currentPageRound-1) * pageSizeRound) + pageSizeRound);let i = index">
<td class="text-center"> <td class="text-center">
<input type="checkbox" class="ti-form-checkbox cursor-pointer" <input type="checkbox" class="ti-form-checkbox cursor-pointer"
id="checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}" [(ngModel)]="item.checkbox" (change)="checkempassessmentRoundListCheckbox()"> id="checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}" [(ngModel)]="item.checkbox" (change)="checkempassessmentRoundListCheckbox()">
...@@ -269,7 +276,7 @@ ...@@ -269,7 +276,7 @@
<td >{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}</td> <td >{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}</td>
<td class="!text-center">{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}</td> <td class="!text-center">{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}</td>
<td class="flex justify-center"> <td class="flex justify-center">
<i class="ti ti-trash cursor-pointer i-gray fs-l px-1" (click)="deleteFormOne(item.item);openModalClass('modal-alert','deleteFormOne')"></i> <i class="ti ti-trash cursor-pointer i-gray fs-l px-1" (click)="deleteFormOne(item.item);"></i>
</td> </td>
</tr> </tr>
...@@ -310,9 +317,9 @@ ...@@ -310,9 +317,9 @@
</li> </li>
</ul> </ul>
<ul class="nav-tabs mt-3"> <ul class="nav-tabs mt-3">
<span>Show {{((currentPageRound-1) * 10)+1}} to {{empassessmentListFilter().length<10 <span>Show {{((currentPageRound-1) * pageSizeRound)+1}} to {{empassessmentListFilter().length< pageSizeRound
?empassessmentListFilter().length: (currentPageRound==pageRound.length ? ((currentPageRound * 10) - ((currentPageRound * ?empassessmentListFilter().length: (currentPageRound==pageRound.length ? ((currentPageRound * pageSizeRound) - ((currentPageRound *
10) - empassessmentListFilter().length) ) :(currentPageRound * 10) ) }} of {{empassessmentListFilter().length}} pageSizeRound) - empassessmentListFilter().length) ) :(currentPageRound * pageSizeRound) ) }} of {{empassessmentListFilter().length}}
items</span> items</span>
</ul> </ul>
</nav> </nav>
...@@ -323,7 +330,7 @@ ...@@ -323,7 +330,7 @@
(click)="closeModalClass('form-pm-emp')"> (click)="closeModalClass('form-pm-emp')">
ย้อนกลับ ย้อนกลับ
</button> </button>
<button type="button" class="ti-btn ti-btn-success" > <button type="button" class="ti-btn ti-btn-success" (click)="openModalClass('modal-alert','addIndicator')">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
</div> </div>
...@@ -356,7 +363,7 @@ ...@@ -356,7 +363,7 @@
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" style="height: 40px;" [(ngModel)]="searchIndicator" (ngModelChange)="searchIndicatorsChange()"> placeholder="Search" style="height: 40px;" [(ngModel)]="searchIndicator" (ngModelChange)="searchIndicatorsChange()">
<div <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"> 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> <i class="ri-search-line text-gray"></i>
...@@ -374,7 +381,7 @@ ...@@ -374,7 +381,7 @@
<thead> <thead>
<tr> <tr>
<ng-container <ng-container
*ngFor="let item of ['รหัส','ชื่อประเภท','ชื่อย่อ','การจัดการ']; let f = first; let l = last; let i = index"> *ngFor="let item of ['รหัส','ชื่อประเภท','ความคาดหวัง','การจัดการ']; let f = first; let l = last; let i = index">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f||l"> [class.!text-center]="f||l">
<span class="text-sm">{{ item }}</span> <span class="text-sm">{{ item }}</span>
...@@ -401,16 +408,16 @@ ...@@ -401,16 +408,16 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let item of filterIndicators() | slice:((currentPageIndicator-1) * 10) : (((currentPageIndicator-1) * 10) + 10);let i = index"> <tr *ngFor="let item of filterIndicators() | slice:((currentPageIndicator-1) * pageSizeIndicator) : (((currentPageIndicator-1) * pageSizeIndicator) + pageSizeIndicator);let i = index">
<td>{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}</td> <td>{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}</td>
<td >{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}</td> <td >{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}</td>
<td class="!text-center">{{item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}</td> <td class="!text-center">{{item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}</td>
<td class="flex justify-center"> <td class="flex justify-center">
<div class="px-1"> <div class="px-1">
<button type="button" <button type="button" (click)="addIndicators(item)"
class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md" > class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md" >
<i class="ri-add-line"></i> <i class="ri-add-line"></i>
Select เพิ่มรายการ
</button> </button>
</div> </div>
</td> </td>
...@@ -452,9 +459,9 @@ ...@@ -452,9 +459,9 @@
</li> </li>
</ul> </ul>
<ul class="nav-tabs mt-3"> <ul class="nav-tabs mt-3">
<span>Show {{((currentPageIndicator-1) * 10)+1}} to {{empassessmentListFilter().length<10 <span>Show {{((currentPageIndicator-1) * pageSizeIndicator)+1}} to {{filterIndicators().length< pageSizeIndicator
?empassessmentListFilter().length: (currentPageIndicator==pageIndicator.length ? ((currentPageIndicator * 10) - ((currentPageIndicator * ?filterIndicators().length: (currentPageIndicator==pageIndicator.length ? ((currentPageIndicator * pageSizeIndicator) - ((currentPageIndicator *
10) - empassessmentListFilter().length) ) :(currentPageIndicator * 10) ) }} of {{empassessmentListFilter().length}} pageSizeIndicator) - filterIndicators().length) ) :(currentPageIndicator * pageSizeIndicator) ) }} of {{filterIndicators().length}}
items</span> items</span>
</ul> </ul>
</nav> </nav>
...@@ -502,7 +509,10 @@ ...@@ -502,7 +509,10 @@
<button type="button" class="ti-btn ti-btn-success" *ngIf="typeForm=='addForm'" (click)="saveAssessmentList();closeModalClass('modal-alert')"> <button type="button" class="ti-btn ti-btn-success" *ngIf="typeForm=='addForm'" (click)="saveAssessmentList();closeModalClass('modal-alert')">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
<button type="button" class="ti-btn ti-btn-success" *ngIf="typeForm=='deleteForm'|| typeForm=='deleteFormOne'" (click)="deleteAssessment();closeModalClass('modal-alert')"> <button type="button" class="ti-btn ti-btn-success" *ngIf="typeForm=='addIndicator'" (click)="saveIndicators();closeModalClass('modal-alert')">
บันทึกข้อมูล
</button>
<button type="button" class="ti-btn ti-btn-success" *ngIf="typeForm=='deleteForm'|| typeForm=='deleteFormOne'" (click)="closeModalClass('modal-alert')">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
</div> </div>
......
...@@ -4,6 +4,7 @@ import { AppraisalRoundModel, MyAppraisalRoundModel } from 'src/app/shared/model ...@@ -4,6 +4,7 @@ import { AppraisalRoundModel, MyAppraisalRoundModel } from 'src/app/shared/model
import { AppraisalFormModel } from 'src/app/shared/model/appraisal-form.model'; import { AppraisalFormModel } from 'src/app/shared/model/appraisal-form.model';
import { AppraisalModel, MyAppraisalModel } from 'src/app/shared/model/appraisal.model'; import { AppraisalModel, MyAppraisalModel } from 'src/app/shared/model/appraisal.model';
import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/model/evaluation-cycle.model'; import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/model/evaluation-cycle.model';
import { EvaluationModal } from 'src/app/shared/model/evaluation-form.modal';
import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-assessment.service'; import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-assessment.service';
import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle.service'; import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle.service';
...@@ -21,6 +22,7 @@ export class EditEvaluationFormComponent { ...@@ -21,6 +22,7 @@ export class EditEvaluationFormComponent {
currentPage = 1 currentPage = 1
page = Array.from({ length: 1 }, (_, i) => i + 1); page = Array.from({ length: 1 }, (_, i) => i + 1);
pageSize = 10
search = "" search = ""
assessmentList: AppraisalModel[] = [] assessmentList: AppraisalModel[] = []
...@@ -30,13 +32,15 @@ export class EditEvaluationFormComponent { ...@@ -30,13 +32,15 @@ export class EditEvaluationFormComponent {
isChecked: boolean = false; isChecked: boolean = false;
apsassessy = "" apsassessy = ""
empassessmentList: AppraisalModel[] = [] empassessmentList?: EvaluationModal
searchEmp = "" searchEmp = ""
empassessmentRoundList: AppraisalRoundModel[] = [] empassessmentRoundList: AppraisalRoundModel[] = []
empassessmentRoundListCheckbox: { checkbox: boolean, item: AppraisalRoundModel }[] = [] empassessmentRoundListCheckbox: { checkbox: boolean, item: AppraisalRoundModel }[] = []
currentPageRound = 1 currentPageRound = 1
pageRound = Array.from({ length: 1 }, (_, i) => i + 1); pageRound = Array.from({ length: 1 }, (_, i) => i + 1);
pageSizeRound = 10
searchRound = "" searchRound = ""
selectEmp: AppraisalModel = new MyAppraisalModel() selectEmp: AppraisalModel = new MyAppraisalModel()
numDataListChecked = 0 numDataListChecked = 0
...@@ -47,10 +51,13 @@ export class EditEvaluationFormComponent { ...@@ -47,10 +51,13 @@ export class EditEvaluationFormComponent {
loading = false loading = false
indicatorsList:AppraisalRoundModel[] = [] indicatorsList: AppraisalRoundModel[] = []
indicatorsListShow: AppraisalRoundModel[] = []
searchIndicator = "" searchIndicator = ""
currentPageIndicator = 1 currentPageIndicator = 1
pageIndicator = Array.from({ length: 1 }, (_, i) => i + 1); pageIndicator = Array.from({ length: 1 }, (_, i) => i + 1);
pageSizeIndicator = 10
competencyTopicIds: string[] = []
constructor(private toastr: ToastrService, constructor(private toastr: ToastrService,
private cdr: ChangeDetectorRef, private cdr: ChangeDetectorRef,
private evaluationAssessmentService: EvaluationAssessmentService, private evaluationAssessmentService: EvaluationAssessmentService,
...@@ -72,8 +79,8 @@ export class EditEvaluationFormComponent { ...@@ -72,8 +79,8 @@ export class EditEvaluationFormComponent {
this.getAssessmentId(); this.getAssessmentId();
this.getAssessmentList(); this.getAssessmentList();
} }
} }
//############################# เเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
getAssessmentId() { getAssessmentId() {
this.evaluationCycleService.getById(this.evaluationRoundId!).subscribe({ this.evaluationCycleService.getById(this.evaluationRoundId!).subscribe({
next: response => { next: response => {
...@@ -90,6 +97,7 @@ export class EditEvaluationFormComponent { ...@@ -90,6 +97,7 @@ export class EditEvaluationFormComponent {
this.evaluationAssessmentService.getById(this.evaluationRoundId!).subscribe({ this.evaluationAssessmentService.getById(this.evaluationRoundId!).subscribe({
next: response => { next: response => {
this.assessmentList = response this.assessmentList = response
this.searchChange()
this.cdr.detectChanges(); this.cdr.detectChanges();
}, },
error: err => { error: err => {
...@@ -110,39 +118,9 @@ export class EditEvaluationFormComponent { ...@@ -110,39 +118,9 @@ export class EditEvaluationFormComponent {
searchChange() { searchChange() {
this.currentPage = 1; this.currentPage = 1;
const filteredData = this.assessmentListFilter(); const filteredData = this.assessmentListFilter();
this.page = Array.from({ length: Math.ceil(filteredData.length / 10) }, (_, i) => i + 1); this.page = Array.from({ length: Math.ceil(filteredData.length / this.pageSize) }, (_, i) => i + 1);
} }
openModalClass(id: string, type?: string) {
this.typeForm = type ?? ""
if (id == 'modal-alert') {
if (type == 'deleteForm') {
this.msg = 'ยืนยันการลบรายการ'
} else if (type == 'addForm') {
this.msg = 'ยืนยันการบันทึกรายการ'
}
}
if (id) {
document.getElementById(id)?.classList.add('open');
document.getElementById(id)?.classList.remove('hidden');
setTimeout(() => {
document.getElementById(id)?.setAttribute('aria-overlay', 'false')
}, 10);
}
this.isChecked = false;
this.numDataListChecked = 0;
}
closeModalClass(id: string) {
const modal = document.getElementById(id);
if (id) {
modal?.classList.add("hidden"); // ซ่อน Modal
}
}
saveAssessmentList() { saveAssessmentList() {
let body = this.assessmentList.filter(x => x.active == true) let body = this.assessmentList.filter(x => x.active == true)
...@@ -160,46 +138,39 @@ export class EditEvaluationFormComponent { ...@@ -160,46 +138,39 @@ export class EditEvaluationFormComponent {
this.showAlert('ไม่พบรายการ', 'error') this.showAlert('ไม่พบรายการ', 'error')
} }
} }
//############################# ปิดเเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
openAddRoundModel(evaluationRoundId: string, apsassessy: string, item: AppraisalModel, model: string) {
this.selectEmp = item // ############################# Modal 2 #############################
console.log("🚀 ~ EditEvaluationFormComponent ~ openAddRoundModel ~ this.selectEmp:", this.selectEmp)
this.openModalClass(model); saveIndicators() {
this.evaluationRoundId = evaluationRoundId if (this.empassessmentRoundListCheckbox.map(x => x.item).length > 0) {
this.apsassessy = apsassessy if (this.empassessmentList) {
this.getApsassessy() this.empassessmentList.masfromTopic = this.empassessmentRoundListCheckbox.map(x => x.item) as any;
this.getApsassessyMini();
this.getIndicators();
}
getIndicators() {
this.evaluationAssessmentService.getIndicators(this.selectEmp.apsassessy.pl.plId).subscribe({
next: response => {
this.indicatorsList = response
this.cdr.detectChanges();
},
error: err => {
console.error('Error fetching evaluation cycles:', err);
} }
}) this.evaluationAssessmentService.postList([this.empassessmentList]).subscribe({
} next: response => {
filterIndicators() { if (response.success) {
return this.indicatorsList.filter(x => this.showAlert(response.message, 'success')
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.tdesc?.toLowerCase()?.includes(this.searchIndicator?.toLowerCase() ?? "") || this.getApsassessy();
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.edesc?.toLowerCase()?.includes(this.searchIndicator?.toLowerCase() ?? "") || this.getApsassessyMini();
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId?.toLowerCase()?.includes(this.searchIndicator?.toLowerCase() ?? "")) this.cdr.detectChanges();
} }
searchIndicatorsChange() { }, error: err => {
this.currentPageIndicator = 1; console.error('Error fetching evaluation cycles:', err);
const filteredData = this.filterIndicators(); }
this.pageIndicator = Array.from({ length: Math.ceil(filteredData.length / 10) }, (_, i) => i + 1); })
}else {
this.showAlert('กรุณาเลือกรายการ', 'error');
}
} }
getApsassessy() { getApsassessy() {
this.loading = true this.loading = true
this.evaluationAssessmentService.getApsassessy(this.evaluationRoundId, this.apsassessy).subscribe({ this.evaluationAssessmentService.getApsassessy(this.evaluationRoundId, this.apsassessy).subscribe({
next: response => { next: response => {
this.empassessmentList = response this.empassessmentList = response
this.cdr.detectChanges();
this.loading = false this.loading = false
this.cdr.detectChanges();
}, },
error: err => { error: err => {
this.loading = false this.loading = false
...@@ -212,6 +183,8 @@ export class EditEvaluationFormComponent { ...@@ -212,6 +183,8 @@ export class EditEvaluationFormComponent {
next: response => { next: response => {
this.empassessmentRoundList = response this.empassessmentRoundList = response
this.empassessmentRoundListCheckbox = this.empassessmentRoundList.map(item => ({ checkbox: false, item })) this.empassessmentRoundListCheckbox = this.empassessmentRoundList.map(item => ({ checkbox: false, item }))
this.checkTopic();
this.searchEmpassessmentListFilterChange()
this.cdr.detectChanges(); this.cdr.detectChanges();
}, },
error: err => { error: err => {
...@@ -225,10 +198,17 @@ export class EditEvaluationFormComponent { ...@@ -225,10 +198,17 @@ export class EditEvaluationFormComponent {
x.item.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.edesc?.toLowerCase()?.includes(this.searchRound?.toLowerCase() ?? "") || x.item.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.edesc?.toLowerCase()?.includes(this.searchRound?.toLowerCase() ?? "") ||
x.item.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId?.toLowerCase()?.includes(this.searchRound?.toLowerCase() ?? "")) x.item.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId?.toLowerCase()?.includes(this.searchRound?.toLowerCase() ?? ""))
} }
searchEmpassessmentListFilterChange() { searchEmpassessmentListFilterChange() {
this.currentPageRound = 1; this.currentPageRound = 1;
const filteredData = this.empassessmentListFilter(); const filteredData = this.empassessmentListFilter();
this.pageRound = Array.from({ length: Math.ceil(filteredData.length / 10) }, (_, i) => i + 1); this.pageRound = Array.from({ length: Math.ceil(filteredData.length / this.pageSizeRound) }, (_, i) => i + 1);
}
checkTopic() {
this.competencyTopicIds = Array.from(new Set(
this.empassessmentRoundListCheckbox.filter(x => x.item.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId)
.map(x => x.item.groupAssessment1!.competencyIndicatorsCourses1Mini!.competencyIndicatorsCourses0!.competencyTopic!.competencyTopicId)
));
} }
toggleCheckbox() { toggleCheckbox() {
this.isChecked = !this.isChecked; // สลับสถานะ this.isChecked = !this.isChecked; // สลับสถานะ
...@@ -239,32 +219,83 @@ export class EditEvaluationFormComponent { ...@@ -239,32 +219,83 @@ export class EditEvaluationFormComponent {
checkempassessmentRoundListCheckbox() { checkempassessmentRoundListCheckbox() {
this.numDataListChecked = this.empassessmentRoundListCheckbox.filter(x => x.checkbox).length this.numDataListChecked = this.empassessmentRoundListCheckbox.filter(x => x.checkbox).length
this.isChecked = this.numDataListChecked ? true : false this.isChecked = this.numDataListChecked ? true : false
} }
deleteFormOne(item: AppraisalRoundModel) { deleteFormOne(item: AppraisalRoundModel) {
this.selectData = item this.selectData = item;
this.empassessmentRoundListCheckbox = this.empassessmentRoundListCheckbox.filter(i => i.item !== item);
this.checkTopic();
this.indicatorChange();
this.searchEmpassessmentListFilterChange()
this.checkempassessmentRoundListCheckbox()
} }
deleteAssessment() { deleteAssessmentList() {
let body = this.empassessmentRoundListCheckbox.filter(x => x.checkbox).map(x => x.item) let body = this.empassessmentRoundListCheckbox.filter(x => x.checkbox).map(x => x.item);
if (this.typeForm == 'deleteFormOne') { if (body.length === 0) {
body = [this.selectData] this.showAlert('กรุณาเลือกรายการ', 'error');
return;
} }
if (body.length == 0) { this.empassessmentRoundListCheckbox = this.empassessmentRoundListCheckbox.filter(x => !x.checkbox);
this.showAlert('กรุณาเลือกรายการ', 'error') this.checkTopic();
return this.indicatorChange();
} this.searchEmpassessmentListFilterChange();
this.evaluationAssessmentService.deletemMini(body, this.selectEmp.apsassessy.employeeId, this.selectEmp.masfromEvaluationRound.evaluationRoundId).subscribe({ this.checkempassessmentRoundListCheckbox();
// this.evaluationAssessmentService.deletemMini(body, this.selectEmp.apsassessy.employeeId, this.selectEmp.masfromEvaluationRound.evaluationRoundId).subscribe({
// next: response => {
// if (response.success) {
// this.showAlert(response.message, 'success')
// this.getApsassessyMini();
// } else {
// this.showAlert(response.message, 'error')
// }
// }
// })
}
// ############################# ปิด Modal 2 #############################
//############################# Modal Indicators #############################
getIndicators() {
this.evaluationAssessmentService.getIndicators(this.selectEmp.apsassessy.pl.plId).subscribe({
next: response => { next: response => {
if (response.success) { this.indicatorsList = response
this.showAlert(response.message, 'success') this.indicatorChange()
this.getApsassessyMini(); this.searchIndicatorsChange()
} else { this.cdr.detectChanges();
this.showAlert(response.message, 'error') },
} error: err => {
console.error('Error fetching evaluation cycles:', err);
} }
}) })
} }
indicatorChange() {
this.indicatorsListShow = this.indicatorsList.filter(x =>
!this.competencyTopicIds.includes(
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId
)
);
}
filterIndicators() {
return this.indicatorsListShow.filter(x =>
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.tdesc?.toLowerCase()?.includes(this.searchIndicator?.toLowerCase() ?? "") ||
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.edesc?.toLowerCase()?.includes(this.searchIndicator?.toLowerCase() ?? "") ||
x.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId?.toLowerCase()?.includes(this.searchIndicator?.toLowerCase() ?? ""))
}
searchIndicatorsChange() {
this.currentPageIndicator = 1;
const filteredData = this.filterIndicators();
this.pageIndicator = Array.from({ length: Math.ceil(filteredData.length / this.pageSizeIndicator) }, (_, i) => i + 1);
}
addIndicators(item: AppraisalRoundModel) {
this.empassessmentRoundListCheckbox.push({ checkbox: false, item })
this.competencyTopicIds.push(item.groupAssessment1?.competencyIndicatorsCourses1Mini?.competencyIndicatorsCourses0?.competencyTopic?.competencyTopicId)
this.indicatorChange();
this.closeModalClass('form-assessment')
}
//############################# ปิด Modal Indicators #############################
showAlert(text: string, type: 'success' | 'error') { showAlert(text: string, type: 'success' | 'error') {
this.toastr[type](text, 'แจ้งเตือน', { this.toastr[type](text, 'แจ้งเตือน', {
...@@ -273,6 +304,46 @@ export class EditEvaluationFormComponent { ...@@ -273,6 +304,46 @@ export class EditEvaluationFormComponent {
}); });
} }
openModalClass(id: string, type?: string) {
this.typeForm = type ?? ""
if (id == 'modal-alert') {
if (type == 'deleteForm') {
this.msg = 'ยืนยันการลบรายการ'
} else if (type == 'addForm' || type == 'addIndicator') {
this.msg = 'ยืนยันการบันทึกรายการ'
}
}
if (id) {
document.getElementById(id)?.classList.add('open');
document.getElementById(id)?.classList.remove('hidden');
setTimeout(() => {
document.getElementById(id)?.setAttribute('aria-overlay', 'false')
}, 10);
}
this.isChecked = false;
this.numDataListChecked = 0;
}
closeModalClass(id: string) {
const modal = document.getElementById(id);
if (id) {
modal?.classList.add("hidden"); // ซ่อน Modal
}
}
openAddRoundModel(evaluationRoundId: string, apsassessy: string, item: AppraisalModel, model: string) {
this.searchIndicator = ""
this.selectEmp = item
this.openModalClass(model);
this.evaluationRoundId = evaluationRoundId
this.apsassessy = apsassessy
this.getApsassessy()
this.getApsassessyMini();
this.getIndicators();
}
......
export interface EvaluationModal {
personalLevel: PersonalLevel
masfromEvaluationRound: MasfromEvaluationRound
companyId: string
active: boolean
apsassessy: Apsassessy
apsapprove1: Apsapprove1
apsapprove2: Apsapprove2
apsapprove3: Apsapprove3
apsapprove4: Apsapprove4
apsapprove5: Apsapprove5
masfromTypeList: MasfromTypeList[]
masfromTopic: MasfromTopic[]
}
export interface PersonalLevel {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface MasfromEvaluationRound {
evaluationRoundId: string
companyId: string
tdesc: string
edesc: string
apsyear: string
apsPeriodStart: string
apsPeriodEnd: string
statusCode: StatusCode
}
export interface StatusCode {
code: string
tdesc: string
edesc: string
}
export interface Apsassessy {
employeeId: string
bossId: string
prefix: Prefix
fname: string
lname: string
efname: string
elname: string
bu1: Bu1
bu2: Bu2
bu3: Bu3
bu4: Bu4
bu5: Bu5
position: Position
job: Job
pl: Pl
status: Status
time0: Time0
resignDate: string
endWorkDate: string
thFullName: string
engFullName: string
}
export interface Prefix {
prefixId: string
tdesc: string
edesc: string
}
export interface Bu1 {
bu1id: string
tdesc: string
edesc: string
companyId: string
}
export interface Bu2 {
bu2id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu3 {
bu3id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu4 {
bu4id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu5 {
bu5id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Position {
positionId: string
tdesc: string
edesc: string
consolidate: string
shortName: string
companyId: string
}
export interface Job {
jobCodeId: string
tdesc: string
edesc: string
}
export interface Pl {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface Status {
statusCode: string
statusType: string
tdesc: string
edesc: string
}
export interface Time0 {
time0id: string
tdesc: string
edesc: string
stickTm: string
hourD: number
}
export interface Apsapprove1 {
employeeId: string
bossId: string
prefix: Prefix2
fname: string
lname: string
efname: string
elname: string
bu1: Bu12
bu2: Bu22
bu3: Bu32
bu4: Bu42
bu5: Bu52
position: Position2
job: Job2
pl: Pl2
status: Status2
time0: Time02
resignDate: string
endWorkDate: string
thFullName: string
engFullName: string
}
export interface Prefix2 {
prefixId: string
tdesc: string
edesc: string
}
export interface Bu12 {
bu1id: string
tdesc: string
edesc: string
companyId: string
}
export interface Bu22 {
bu2id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu32 {
bu3id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu42 {
bu4id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu52 {
bu5id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Position2 {
positionId: string
tdesc: string
edesc: string
consolidate: string
shortName: string
companyId: string
}
export interface Job2 {
jobCodeId: string
tdesc: string
edesc: string
}
export interface Pl2 {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface Status2 {
statusCode: string
statusType: string
tdesc: string
edesc: string
}
export interface Time02 {
time0id: string
tdesc: string
edesc: string
stickTm: string
hourD: number
}
export interface Apsapprove2 {
employeeId: string
bossId: string
prefix: Prefix3
fname: string
lname: string
efname: string
elname: string
bu1: Bu13
bu2: Bu23
bu3: Bu33
bu4: Bu43
bu5: Bu53
position: Position3
job: Job3
pl: Pl3
status: Status3
time0: Time03
resignDate: string
endWorkDate: string
thFullName: string
engFullName: string
}
export interface Prefix3 {
prefixId: string
tdesc: string
edesc: string
}
export interface Bu13 {
bu1id: string
tdesc: string
edesc: string
companyId: string
}
export interface Bu23 {
bu2id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu33 {
bu3id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu43 {
bu4id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu53 {
bu5id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Position3 {
positionId: string
tdesc: string
edesc: string
consolidate: string
shortName: string
companyId: string
}
export interface Job3 {
jobCodeId: string
tdesc: string
edesc: string
}
export interface Pl3 {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface Status3 {
statusCode: string
statusType: string
tdesc: string
edesc: string
}
export interface Time03 {
time0id: string
tdesc: string
edesc: string
stickTm: string
hourD: number
}
export interface Apsapprove3 {
employeeId: string
bossId: string
prefix: Prefix4
fname: string
lname: string
efname: string
elname: string
bu1: Bu14
bu2: Bu24
bu3: Bu34
bu4: Bu44
bu5: Bu54
position: Position4
job: Job4
pl: Pl4
status: Status4
time0: Time04
resignDate: string
endWorkDate: string
thFullName: string
engFullName: string
}
export interface Prefix4 {
prefixId: string
tdesc: string
edesc: string
}
export interface Bu14 {
bu1id: string
tdesc: string
edesc: string
companyId: string
}
export interface Bu24 {
bu2id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu34 {
bu3id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu44 {
bu4id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu54 {
bu5id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Position4 {
positionId: string
tdesc: string
edesc: string
consolidate: string
shortName: string
companyId: string
}
export interface Job4 {
jobCodeId: string
tdesc: string
edesc: string
}
export interface Pl4 {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface Status4 {
statusCode: string
statusType: string
tdesc: string
edesc: string
}
export interface Time04 {
time0id: string
tdesc: string
edesc: string
stickTm: string
hourD: number
}
export interface Apsapprove4 {
employeeId: string
bossId: string
prefix: Prefix5
fname: string
lname: string
efname: string
elname: string
bu1: Bu15
bu2: Bu25
bu3: Bu35
bu4: Bu45
bu5: Bu55
position: Position5
job: Job5
pl: Pl5
status: Status5
time0: Time05
resignDate: string
endWorkDate: string
thFullName: string
engFullName: string
}
export interface Prefix5 {
prefixId: string
tdesc: string
edesc: string
}
export interface Bu15 {
bu1id: string
tdesc: string
edesc: string
companyId: string
}
export interface Bu25 {
bu2id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu35 {
bu3id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu45 {
bu4id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu55 {
bu5id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Position5 {
positionId: string
tdesc: string
edesc: string
consolidate: string
shortName: string
companyId: string
}
export interface Job5 {
jobCodeId: string
tdesc: string
edesc: string
}
export interface Pl5 {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface Status5 {
statusCode: string
statusType: string
tdesc: string
edesc: string
}
export interface Time05 {
time0id: string
tdesc: string
edesc: string
stickTm: string
hourD: number
}
export interface Apsapprove5 {
employeeId: string
bossId: string
prefix: Prefix6
fname: string
lname: string
efname: string
elname: string
bu1: Bu16
bu2: Bu26
bu3: Bu36
bu4: Bu46
bu5: Bu56
position: Position6
job: Job6
pl: Pl6
status: Status6
time0: Time06
resignDate: string
endWorkDate: string
thFullName: string
engFullName: string
}
export interface Prefix6 {
prefixId: string
tdesc: string
edesc: string
}
export interface Bu16 {
bu1id: string
tdesc: string
edesc: string
companyId: string
}
export interface Bu26 {
bu2id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu36 {
bu3id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu46 {
bu4id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Bu56 {
bu5id: string
tdesc: string
edesc: string
parent: string
companyId: string
}
export interface Position6 {
positionId: string
tdesc: string
edesc: string
consolidate: string
shortName: string
companyId: string
}
export interface Job6 {
jobCodeId: string
tdesc: string
edesc: string
}
export interface Pl6 {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface Status6 {
statusCode: string
statusType: string
tdesc: string
edesc: string
}
export interface Time06 {
time0id: string
tdesc: string
edesc: string
stickTm: string
hourD: number
}
export interface MasfromTypeList {
plId: string
companyId: string
lineNo: number
competencyType: CompetencyType
masfromStatusType: MasfromStatusType
currentStep: string
lastStep: string
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
numberCheck1: number
numberCheck2: number
numberCheck3: number
numberCheck4: number
numberCheck5: number
weightedTotal: number
averageScore: number
apsassessyComment: string
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
apsassessyDate: string
apsapprove1Date: string
apsapprove2Date: string
apsapprove3Date: string
apsapprove4Date: string
apsapprove5Date: string
evaluationResults: string
sumEvaluationResults: string
}
export interface CompetencyType {
competencyTypeId: string
companyId: string
edesc: string
tdesc: string
shortName: string
expectationLevel: string
weight: number
}
export interface MasfromStatusType {
code: string
tdesc: string
edesc: string
}
export interface MasfromTopic {
masfromEvaluationAssessment1: MasfromEvaluationAssessment1
runNo: number
companyId: string
groupAssessment1: GroupAssessment1
}
export interface MasfromEvaluationAssessment1 {
plId: string
companyId: string
lineNo: number
competencyType: CompetencyType2
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
numberCheck1: number
numberCheck2: number
numberCheck3: number
numberCheck4: number
numberCheck5: number
weightedTotal: number
averageScore: number
apsassessyComment: string
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
apsassessyDate: string
apsapprove1Date: string
apsapprove2Date: string
apsapprove3Date: string
apsapprove4Date: string
apsapprove5Date: string
evaluationResults: string
sumEvaluationResults: string
}
export interface CompetencyType2 {
competencyTypeId: string
companyId: string
edesc: string
tdesc: string
shortName: string
expectationLevel: string
weight: number
}
export interface GroupAssessment1 {
personalLevelModel: PersonalLevelModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1Mini
companyId: string
groupAssessmentMini: GroupAssessmentMini
}
export interface PersonalLevelModel {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface CompetencyIndicatorsCourses1Mini {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses0
lineNo: number
companyId: string
competencyCourseId: string
competencyCourse: CompetencyCourse[]
behavioralIndicatorsList: BehavioralIndicatorsList[]
}
export interface CompetencyIndicatorsCourses0 {
competencyTopic: CompetencyTopic
companyId: string
edesc: string
tdesc: string
indicatorsCourseDetailTh: string
indicatorsCourseDetailEn: string
expectation: string
}
export interface CompetencyTopic {
competencyTopicId: string
competencyType: CompetencyType3
companyId: string
edesc: string
tdesc: string
competencyDetail: string
competencyFiles: string
lineNo: number
expectationLevel: string
}
export interface CompetencyType3 {
competencyTypeId: string
companyId: string
edesc: string
tdesc: string
shortName: string
expectationLevel: string
weight: number
}
export interface CompetencyCourse {
competencyCourseId: string
companyId: string
edesc: string
tdesc: string
courseDetail: string
courseTopic: string
courseLinkMylearn: string
}
export interface BehavioralIndicatorsList {
competencyIndicators1: CompetencyIndicators1
runNo: number
companyId: string
assessmentId: string
behavioralIndicators: string
competencyAssessment: CompetencyAssessment[]
competencyBehavioral: CompetencyBehavioral
}
export interface CompetencyIndicators1 {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses02
lineNo: number
companyId: string
competencyCourseId: string
}
export interface CompetencyIndicatorsCourses02 {
competencyTopic: CompetencyTopic2
companyId: string
edesc: string
tdesc: string
indicatorsCourseDetailTh: string
indicatorsCourseDetailEn: string
}
export interface CompetencyTopic2 {
competencyTopicId: string
competencyType: CompetencyType4
companyId: string
edesc: string
tdesc: string
competencyDetail: string
competencyFiles: string
lineNo: number
expectationLevel: string
}
export interface CompetencyType4 {
competencyTypeId: string
companyId: string
edesc: string
tdesc: string
shortName: string
expectationLevel: string
weight: number
}
export interface CompetencyAssessment {
assessmentId: string
companyId: string
edesc: string
tdesc: string
shortName: string
}
export interface CompetencyBehavioral {
evaluationRoundId: string
scoreTopicExpectation: number
companyId: string
}
export interface GroupAssessmentMini {
personalLevel: PersonalLevel2
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1Mini2
companyId: string
edesc: string
tdesc: string
}
export interface PersonalLevel2 {
plId: string
tdesc: string
edesc: string
companyId: string
}
export interface CompetencyIndicatorsCourses1Mini2 {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses03
lineNo: number
companyId: string
competencyCourseId: string
competencyCourse: CompetencyCourse2[]
behavioralIndicatorsList: BehavioralIndicatorsList2[]
}
export interface CompetencyIndicatorsCourses03 {
competencyTopic: CompetencyTopic3
companyId: string
edesc: string
tdesc: string
indicatorsCourseDetailTh: string
indicatorsCourseDetailEn: string
expectation: string
}
export interface CompetencyTopic3 {
competencyTopicId: string
competencyType: CompetencyType5
companyId: string
edesc: string
tdesc: string
competencyDetail: string
competencyFiles: string
lineNo: number
expectationLevel: string
}
export interface CompetencyType5 {
competencyTypeId: string
companyId: string
edesc: string
tdesc: string
shortName: string
expectationLevel: string
weight: number
}
export interface CompetencyCourse2 {
competencyCourseId: string
companyId: string
edesc: string
tdesc: string
courseDetail: string
courseTopic: string
courseLinkMylearn: string
}
export interface BehavioralIndicatorsList2 {
competencyIndicators1: CompetencyIndicators12
runNo: number
companyId: string
assessmentId: string
behavioralIndicators: string
competencyAssessment: CompetencyAssessment2[]
competencyBehavioral: CompetencyBehavioral2
}
export interface CompetencyIndicators12 {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses04
lineNo: number
companyId: string
competencyCourseId: string
}
export interface CompetencyIndicatorsCourses04 {
competencyTopic: CompetencyTopic4
companyId: string
edesc: string
tdesc: string
indicatorsCourseDetailTh: string
indicatorsCourseDetailEn: string
}
export interface CompetencyTopic4 {
competencyTopicId: string
competencyType: CompetencyType6
companyId: string
edesc: string
tdesc: string
competencyDetail: string
competencyFiles: string
lineNo: number
expectationLevel: string
}
export interface CompetencyType6 {
competencyTypeId: string
companyId: string
edesc: string
tdesc: string
shortName: string
expectationLevel: string
weight: number
}
export interface CompetencyAssessment2 {
assessmentId: string
companyId: string
edesc: string
tdesc: string
shortName: string
}
export interface CompetencyBehavioral2 {
evaluationRoundId: string
scoreTopicExpectation: number
companyId: string
}
\ No newline at end of file
...@@ -6,6 +6,7 @@ import { AlertModel } from '../model/alert.model'; ...@@ -6,6 +6,7 @@ import { AlertModel } from '../model/alert.model';
import { EvaluationCycleModel } from '../model/evaluation-cycle.model'; import { EvaluationCycleModel } from '../model/evaluation-cycle.model';
import { AppraisalModel } from '../model/appraisal.model'; import { AppraisalModel } from '../model/appraisal.model';
import { AppraisalRoundModel } from '../model/appraisal-aps.model'; import { AppraisalRoundModel } from '../model/appraisal-aps.model';
import { EvaluationModal } from '../model/evaluation-form.modal';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -21,8 +22,8 @@ export class EvaluationAssessmentService { ...@@ -21,8 +22,8 @@ export class EvaluationAssessmentService {
getById(evaluationRoundId: string): Observable<any[]> { getById(evaluationRoundId: string): Observable<any[]> {
return this.http.get<any[]>(this.urlApi + "/" + evaluationRoundId) return this.http.get<any[]>(this.urlApi + "/" + evaluationRoundId)
} }
getApsassessy(evaluationRoundId: string,apsassessy:string): Observable<AppraisalModel[]> { getApsassessy(evaluationRoundId: string,apsassessy:string): Observable<EvaluationModal> {
return this.http.get<AppraisalModel[]>(this.urlApi + "/" + evaluationRoundId+"/"+apsassessy) return this.http.get<EvaluationModal>(this.urlApi + "/" + evaluationRoundId+"/"+apsassessy)
} }
getApsassessyMini(evaluationRoundId: string,apsassessy:string): Observable<AppraisalRoundModel[]> { getApsassessyMini(evaluationRoundId: string,apsassessy:string): Observable<AppraisalRoundModel[]> {
return this.http.get<AppraisalRoundModel[]>(this.urlApi + "/mini/" + evaluationRoundId+"/"+apsassessy) return this.http.get<AppraisalRoundModel[]>(this.urlApi + "/mini/" + evaluationRoundId+"/"+apsassessy)
...@@ -30,10 +31,10 @@ export class EvaluationAssessmentService { ...@@ -30,10 +31,10 @@ export class EvaluationAssessmentService {
getIndicators(plId: string): Observable<AppraisalRoundModel[]> { getIndicators(plId: string): Observable<AppraisalRoundModel[]> {
return this.http.get<AppraisalRoundModel[]>(this.urlApi + "/indicators/list/" + plId) return this.http.get<AppraisalRoundModel[]>(this.urlApi + "/indicators/list/" + plId)
} }
post(body: EvaluationCycleModel): Observable<AlertModel> { post(body: AppraisalModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body) return this.http.post<AlertModel>(this.urlApi, body)
} }
postList(body:any[]): Observable<AlertModel> { postList(body:any): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi+"/create-list", body) return this.http.post<AlertModel>(this.urlApi+"/create-list", body)
} }
delete(body: EvaluationCycleModel | EvaluationCycleModel[]): Observable<AlertModel> { delete(body: EvaluationCycleModel | EvaluationCycleModel[]): Observable<AlertModel> {
......
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