Commit 9724ea47 by Nattana Chaiyamat

แบบประเมินสมรรถนะ

parent 7961588b
......@@ -38,7 +38,6 @@ import { EvaluationFactorsComponent } from '../performance-management-evaluation
import { GradeRegistrationComponent } from '../competency-assessment/grade-registration/grade-registration.component';
import { SettingPerformanceEvalutionComponent } from '../performance-management-evaluation/setting-performance-evalution/setting-performance-evalution.component';
import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluation/self-evaluation.component';
import { IdpEvalutionComponent } from '../performance-evaluation/idp-evaluation/idp-evalution.component';
import { PmsGradeRegistrationComponent } from '../performance-management-evaluation/pms-grade-registration/pms-pms-grade-registration.component';
import { DayTypeRegistryComponent } from '../company-components/day-type-registry/day-type-registry.component';
import { TimeAttendanceComponent } from '../performance-management-evaluation/time-attendance/time-attendance.component';
......
......@@ -109,9 +109,7 @@ import { SettingPerformanceEvalutionComponent } from '../performance-management-
import { AssessmentSystemConfigurationComponent } from '../performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component';
import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluation/self-evaluation.component';
import { CompanyRegistrationPageComponent } from '../company-components/company-registration/company-registration-page/company-registration-page.component';
import { IdpEvalutionComponent } from '../performance-evaluation/idp-evaluation/idp-evalution.component';
import { PmsEvalutionComponent } from '../performance-evaluation/pms-evaluation/pms-evalution.component';
import { EvaluationComponent } from '../performance-evaluation/evaluation/evaluation.component';
import { CompanyService } from 'src/app/shared/services/company.service';
import { CompetencytypeService } from 'src/app/shared/services/competencytype.service';
import { CompetencytopicService } from 'src/app/shared/services/competencytopic.service';
......@@ -293,10 +291,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
SettingPerformanceEvalutionComponent,
AssessmentSystemConfigurationComponent,
SelfEvaluationComponent,
IdpEvalutionComponent,
CompanyRegistrationPageComponent,
PmsEvalutionComponent,
EvaluationComponent,
ManageUserComponent,
PmsGradeRegistrationComponent,
PmsGradeManagementComponent,
......
.ciricon {
height: 12px; /* กำหนดความสูงของวงกลม */
width: 12px; /* กำหนดความกว้างของวงกลม */
background-color: #ffffff;
font-weight: bold;
display: flex; /* ใช้ Flexbox */
justify-content: center; /* จัดตำแหน่งแนวนอนให้กึ่งกลาง */
align-items: center; /* จัดตำแหน่งแนวตั้งให้กึ่งกลาง */
border-radius: 2px; /* ทำให้เป็นวงกลม */
}
......@@ -13,7 +13,7 @@ import Swal from 'sweetalert2';
styleUrls: ['./pms-form-employee.component.scss']
})
export class PmsFormEmployeeComponent {
@Input() currentTap = ""
@Input() currentTap = "ข้อมูลการประเมิน"
@Input() evaluateeId = ""
@Input() evaluaterId = ""
@Input() evaluationForm: 'self' | 'sup' = "self"
......@@ -50,6 +50,28 @@ export class PmsFormEmployeeComponent {
currentDate = new Date()
comment = ""
currentStepText = () => {
if (this.compentency.data) {
if (this.compentency.data.apsassessy.employeeId == this.evaluaterId) {
return "ผู้รับการประเมิน"
} else if (this.compentency.data.apsapprove1.employeeId == this.evaluaterId) {
if (this.compentency.data.apsapprove2.employeeId) {
return "ผู้ประเมิน"
}
return "ผู้อนุมัติลำดับที่ 1"
} else if (this.compentency.data.apsapprove2.employeeId == this.evaluaterId) {
return "ผู้อนุมัติลำดับที่ 1"
} else if (this.compentency.data.apsapprove3.employeeId == this.evaluaterId) {
return "ผู้อนุมัติลำดับที่ 2"
} else if (this.compentency.data.apsapprove4.employeeId == this.evaluaterId) {
return "ผู้อนุมัติลำดับที่ 3"
} else if (this.compentency.data.apsapprove5.employeeId == this.evaluaterId) {
return "ผู้อนุมัติลำดับที่ 4"
}
}
return ""
}
statusCompetencyText = (status: string) => {
if (status === "no access") {
return "ยังไม่ถึงขั้นตอนดำเนินการ"
......@@ -65,7 +87,6 @@ export class PmsFormEmployeeComponent {
return ""
}
}
statusCompetencyClass = (status: string) => {
if (status === "no access") {
return "bg-mute"
......@@ -241,11 +262,15 @@ export class PmsFormEmployeeComponent {
}
selectDataList(data: CompetencyModel) {
this.compentency.data = data
this.compentency.data = JSON.parse(JSON.stringify(data))
if (this.compentency.data) {
this.currentTap = "ข้อมูลการประเมิน"
this.compentency.data.commentAll.sort((a, b) => new Date(b.commentDate).getTime() - new Date(a.commentDate).getTime());
this.canSave = this.compentency.data.statusType == "pending" || this.compentency.data.statusType == "evaluating"
this.canDraft = +this.compentency.data.currentStep <= 1 && (this.compentency.data.statusType == "pending" || this.compentency.data.statusType == "evaluating")
this.canEdit = +this.compentency.data.currentStep <= 1 && (this.compentency.data.statusType == "pending" || this.compentency.data.statusType == "evaluating")
this.cdr.detectChanges()
}
}
getEvaluatee() {
......@@ -263,11 +288,6 @@ export class PmsFormEmployeeComponent {
}
currentTapChange() {
if (this.compentency.data?.competency.length) {
this.currentTap = this.compentency.data?.competency[0].comType || ''
}
}
onSelectFile1(event: any) {
if (event.target && event.target.files && event.target.files[0]) {
const reader = new FileReader();
......
......@@ -3,111 +3,9 @@
<ng-template #pmsEvaluation>
<ng-container *ngIf="appraisalPms">
<div class="pb-2rem px-2rem">
<div class="font-size-18px font-weight-700 text-primary">
JOB PERFORMANCE EVALUATION FORM
</div>
</div>
<div class="pb-1rem px-2rem">
<div class="grid grid-cols-6">
<div class="col-span-6 grid grid-cols-6">
<div class="col-span-3 border p-2 pb-4">
<span>ผู้รับการประเมิน (Employee)</span>
</div>
<div class="col-span-3 border p-2 pb-4">
<span>ผู้ประเมิน (Evaluator)</span>
</div>
</div>
<div class="col-span-6 grid grid-cols-6">
<div class="col-span-3 grid grid-cols-4">
<div class="col-span-1 p-2 border pb-4">
<span>ชื่อ-สกุล</span>
</div>
<div class="col-span-3 p-2 border pb-4">
<span>
{{appraisalPms.apsassessy.prefix.tdesc || ""}}
{{appraisalPms.apsassessy.thFullName || ""}}</span>
</div>
</div>
<div class="col-span-3 grid grid-cols-4">
<div class="col-span-1 p-2 border pb-4">
<span>ชื่อ-สกุล</span>
</div>
<div class="col-span-3 p-2 border pb-4">
<span *ngIf="appraisalPms.apsapprove1.prefix">{{appraisalPms.apsapprove1.prefix.tdesc ||
""}}
{{appraisalPms.apsapprove1.thFullName || ""}}</span>
</div>
</div>
</div>
<div class="col-span-6 grid grid-cols-6">
<div class="col-span-3 grid grid-cols-4">
<div class="col-span-1 p-2 border pb-4">
<span>รหัส (ID)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>{{appraisalPms.apsassessy.employeeId || ""}}</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>ตำแหน่ง (Position)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>{{appraisalPms.apsassessy.position.tdesc || ""}}</span>
</div>
</div>
<div class="col-span-3 grid grid-cols-4">
<div class="col-span-1 p-2 border pb-4">
<span>รหัส (ID)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>{{appraisalPms.apsapprove1.employeeId || ""}}</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>ตำแหน่ง (Position)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span *ngIf="appraisalPms.apsapprove1.position">
{{appraisalPms.apsapprove1.position.tdesc || ""}}
</span>
</div>
</div>
</div>
<div class="col-span-6 grid grid-cols-6">
<div class="col-span-3 grid grid-cols-4">
<div class="col-span-1 p-2 border pb-4">
<span>ฝ่าย (Department)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>{{appraisalPms.apsassessy.bu1.tdesc || ""}}</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>แผนก (Section)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>{{appraisalPms.apsassessy.bu2.tdesc || ""}}</span>
</div>
</div>
<div class="col-span-3 grid grid-cols-4">
<div class="col-span-1 p-2 border pb-4">
<span>ฝ่าย (Department)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span *ngIf="appraisalPms.apsapprove1.bu1">{{appraisalPms.apsapprove1.bu1.tdesc ||
""}}</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span>แผนก (Section)</span>
</div>
<div class="col-span-1 p-2 border pb-4">
<span *ngIf="appraisalPms.apsapprove1.bu2">{{appraisalPms.apsapprove1.bu2.tdesc ||
""}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="pb-2rem px-2rem">
<div id="hs-tab-js-vertical-1" role="tabpanel" aria-labelledby="hs-tab-js-vertical-item-1">
<div class="hs-accordion-group w-full" data-hs-accordion-always-open>
<ng-container *ngIf="currentTap=='ประเมินผลการปฏิบัติงาน'">
<ng-container *ngIf="appraisalPms?.part1Detail?.length then part1 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.part2Detail?.length then part2 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.part3Detail?.length then part3 else noData"></ng-container>
......@@ -115,9 +13,12 @@
<ng-container *ngIf="appraisalPms?.part5Detail?.length then part5 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.part6Detail?.length then part6 else noData"></ng-container>
<ng-container *ngIf="appraisalPms?.part7Detail?.length then part7 else noData"></ng-container>
</ng-container>
<ng-container *ngIf="currentTap=='สรุปคะแนนและข้อเสนอแนะ'">
<ng-container *ngTemplateOutlet="part8"></ng-container>
<ng-container *ngTemplateOutlet="part9"></ng-container>
<ng-container *ngTemplateOutlet="part10"></ng-container>
</ng-container>
</div>
</div>
</div>
......@@ -1269,7 +1170,6 @@
</div>
</ng-template>
<ng-template #part7>
<div class="hs-accordion overflow-hidden bg-white border -mt-px first:rounded-t-sm last:rounded-b-sm dark:bg-bgdark dark:border-white/10"
id="hs-primary-heading-1">
......@@ -1473,6 +1373,11 @@
</ng-template>
<ng-template #noData>
</ng-template>
<ng-template #part8>
<div class="hs-accordion overflow-hidden bg-white border -mt-px first:rounded-t-sm last:rounded-b-sm dark:bg-bgdark dark:border-white/10"
id="hs-primary-heading-1">
......@@ -1712,3 +1617,7 @@
</div>
</div>
</ng-template>
<div class="hidden">
{{allFormRemain()}}
</div>
\ No newline at end of file
......@@ -92,8 +92,8 @@ export class PmsKpiComponent {
@Input() appraisalPms?: Pms
@Input() canEdit = false
@Input() currentStep = ""
@Input() currentTap = ""
@Input() dateIso = ""
@Output() sendReturnPath: EventEmitter<any> = new EventEmitter<any>();
@Output() kpiFormRemain: EventEmitter<any> = new EventEmitter<any>();
@Output() kpiForm: EventEmitter<any> = new EventEmitter<any>();
groupGrade: { loading: boolean, dataList: CompetencyGradeModel[] } = { loading: false, dataList: [] }
......@@ -201,9 +201,7 @@ export class PmsKpiComponent {
}
})
}
returnPath() {
this.sendReturnPath.emit()
}
calRawScore(data?: any) {
if (data) {
......
......@@ -236,30 +236,17 @@
</ng-container>
<ng-container *ngIf="pageEvalution=='idp'">
<!-- <app-idp-evalution [pathTitle]="['การประเมินผล', 'ประเมินโดยหัวหน้า','ประเมิน']"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"></app-idp-evalution> -->
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'idp'"
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'ข้อมูลการประเมิน'"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluaterId]="formEvaluation.evaluaterId" [evaluateeId]="formEvaluation.evaluateeId"></app-pms-form-employee>
</ng-container>
<ng-container *ngIf="pageEvalution=='pms'">
<!-- <app-pms-evalution [pathTitle]="['การประเมินผล', 'ประเมินโดยหัวหน้า','ประเมิน']"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"></app-pms-evalution> -->
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'pms'"
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'ข้อมูลการประเมิน'"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluaterId]="formEvaluation.evaluaterId" [evaluateeId]="formEvaluation.evaluateeId"></app-pms-form-employee>
</ng-container>
<ng-container *ngIf="pageEvalution!='idp'&&pageEvalution!='pms'&&pageEvalution!=''">
<!-- <app-evaluation [pathTitle]="['การประเมินผล', 'ประเมินโดยหัวหน้า','ประเมิน']"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"
[competencyTypeId]="formEvaluation.competencyTypeId"></app-evaluation> -->
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="pageEvalution"
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'ข้อมูลการประเมิน'"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluaterId]="formEvaluation.evaluaterId" [evaluateeId]="formEvaluation.evaluateeId"></app-pms-form-employee>
</ng-container>
\ No newline at end of file
......@@ -25066,3 +25066,75 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
.\!bg-mute {
background-color: #cccccc !important;
}
.text-warp {
white-space: normal;
word-wrap: break-word;
word-break: break-word;
}
.\!text-warp {
white-space: normal !important;
word-wrap: break-word !important;
word-break: break-word !important;
}
.-translate-y-1\/5 {
--tw-translate-y: -20%;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x))
skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.ti-btn-soft-primary {
background-color: rgb(var(--color-primary) / 0.1);
color: rgb(var(--color-primary));
--tw-ring-offset-color: #fff;
}
.\!text-primary {
color: rgb(var(--color-primary)) !important;
}
.text-soft-primary {
color: rgb(var(--color-primary) / 0.1);
}
.border-soft-primary {
border-color: rgb(var(--color-primary) / 0.1);
}
.border-soft-primary:hover {
border-color: rgb(var(--color-primary));
}
.text-soft-primary:hover {
color: rgb(var(--color-primary));
}
.text-soft-secondary {
color: rgb(var(--color-secondary) / 0.1);
}
.text-soft-secondary:hover {
color: rgb(var(--color-secondary));
}
.\!text-soft-secondary {
color: rgb(var(--color-secondary) / 0.1) !important;
}
.\!text-soft-secondary:hover {
color: rgb(var(--color-secondary)) !important;
}
.bg-white:hover {
--tw-bg-opacity: 1;
background-color: rgb(241 245 249 / var(--tw-bg-opacity));
}
.\!text-secondary {
color: rgb(var(--color-secondary));
}
.\!border-sort-secondary {
border-color: rgb(var(--color-secondary) / 0.1) !important;
}
\ No newline at end of file
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