Commit 1e7036b4 by Nattana Chaiyamat

ประเมินตนเอง

parent 627fbca7
......@@ -59,12 +59,12 @@
<button
class="hs-accordion-toggle hs-accordion-active:text-white hs-accordion-active:bg-secondary group py-4 px-5 inline-flex items-center justify-between gap-x-3 w-full font-semibold text-start text-gray-800 transition hover:text-gray-500 dark:hs-accordion-active:text-white dark:text-gray-200 dark:hover:text-white/80"
aria-controls="hs-primary-collapse-1" type="button">
<svg *ngIf="onFormCompleted(item2)" class="flex-shrink-0 h-6 w-6 text-white" width="16"
height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
<svg class="flex-shrink-0 h-6 w-6 text-white" width="16" height="16" viewBox="0 0 16 16"
fill="none" xmlns="http://www.w3.org/2000/svg">
<path *ngIf="onFormCompleted(item2)"
d="M15.1965 7.85999C15.1965 3.71785 11.8387 0.359985 7.69653 0.359985C3.5544 0.359985 0.196533 3.71785 0.196533 7.85999C0.196533 12.0021 3.5544 15.36 7.69653 15.36C11.8387 15.36 15.1965 12.0021 15.1965 7.85999Z"
fill="currentColor" class="fill-green-500"></path>
<path
<path *ngIf="onFormCompleted(item2)"
d="M10.9295 4.88618C11.1083 4.67577 11.4238 4.65019 11.6343 4.82904C11.8446 5.00788 11.8702 5.32343 11.6914 5.53383L7.44139 10.5338C7.25974 10.7475 6.93787 10.77 6.72825 10.5837L4.47825 8.5837C4.27186 8.40024 4.25327 8.0842 4.43673 7.87781C4.62019 7.67142 4.93622 7.65283 5.14261 7.83629L7.01053 9.49669L10.9295 4.88618Z"
fill="currentColor"></path>
</svg>
......@@ -107,7 +107,7 @@
<div class="flex items-center justify-center">
<div id="stars-busytext">
<bar-rating [ngClass]="{ 'no-interaction': !canEdit }"
[ngStyle]="{'opacity':bi.competencyBehavioral.scoreTopicExpectation?1:0.6}"
[ngStyle]="{'opacity':bi.competencyBehavioral.scoreTopicExpectation?1:0.8}"
[rate]="bi.competencyBehavioral.scoreTopicExpectation" [max]="5"
[theme]="'square'"
[(ngModel)]="bi.competencyBehavioral.scoreTopicExpectation"
......
<app-page-header [pathTitle]="['ประเมินผล PMS']"></app-page-header>
<app-page-header *ngIf="evaluationForm=='sup'" [pathTitle]="['การประเมินผล', 'ประเมินโดยหัวหน้า']"></app-page-header>
<div class="bg-card-white">
</div>
<div class="block-main-content">
......@@ -6,7 +6,8 @@
</div>
<ng-template #evaluation>
<div class="pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center">
<div *ngIf="evaluationForm=='sup'"
class="pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center">
<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"
(click)="returnPath()">
......@@ -45,7 +46,7 @@
</div>
<div class="text-white">
<h2 class="text-base font-semibold">Anderson Itumay</h2>
<p class="text-xs text-white/50">andersonitumay@abc.com</p>
<p class="text-xs text-white/50">{{'andersonitumay@abc.com'}}</p>
</div>
<div class="flex space-x-2 rtl:space-x-reverse text-center justify-center">
<div id="stars-hover">
......@@ -280,7 +281,7 @@
fill="currentColor"></path>
</svg>
</button>
<button type="button" [class.active]="currentTap=='idp'"
<button *ngIf="evaluationForm=='sup'" type="button" [class.active]="currentTap=='idp'"
class="hs-tab-active:bg-primary hs-tab-active:border-primary hs-tab-active:text-white dark:hs-tab-active:bg-primary dark:hs-tab-active:border-primary dark:hs-tab-active:text-white py-2 px-3 inline-flex items-center w-full justify-center gap-2 text-sm font-medium text-center border text-gray-500 rounded-sm hover:text-gray-700 dark:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-gray-300"
id="profile-item-4" data-hs-tab="#profile-4" aria-controls="profile-4" role="tab">
แผนพัฒนาบุคคลากร
......
......@@ -12,6 +12,7 @@ export class PmsFormEmployeeComponent {
@Input() allCompetencyTypeId: TypeList[] = []
@Input() evaluateeId = ""
@Input() evaluaterId = ""
@Input() evaluationForm: 'self' | 'sup' = "self"
@Output() sendReturnPath: EventEmitter<any> = new EventEmitter<any>();
starRate = 5;
......
<ng-container *ngIf="!onEdit">
<app-page-header [pathTitle]="pathTitle"></app-page-header>
<div class="bg-card-white">
<ng-container *ngTemplateOutlet="newSelfEvaluation"></ng-container>
<!-- <div class="bg-card-white">
</div>
<div class="block-main-content">
<ng-container *ngTemplateOutlet="selfEvaluation"></ng-container>
</div>
</div> -->
</ng-container>
<ng-template #newSelfEvaluation>
<app-pms-form-employee *ngIf="appraisalCompentency.select&&allCompetencyTypeId.length" [evaluationForm]="'self'"
[evaluationRoundId]="appraisalCompentency.select.masfromEvaluationRound.evaluationRoundId"
[evaluaterId]="evaluatee.data.employeeId" [allCompetencyTypeId]="allCompetencyTypeId"
[evaluateeId]="evaluatee.data.employeeId"></app-pms-form-employee>
</ng-template>
<ng-template #selfEvaluation>
<div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem">
ประเมินผลประจำปี {{currentDate.getFullYear()}}
......
import { ChangeDetectorRef, Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { AppraisalCompentencyModel } from 'src/app/shared/model/appraisal-competency.model';
import { AppraisalPmsModel } from 'src/app/shared/model/appraisal-pms.model';
import { TypeList } from 'src/app/shared/model/appraisal-subordinate.model';
import { EmployeeModel, MyEmployeeModel } from 'src/app/shared/model/employee.model';
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
......@@ -32,6 +33,8 @@ export class SelfEvaluationComponent implements OnInit {
competencyTypeId = ""
onEdit = ''
allCompetencyTypeId = <TypeList[]>[]
constructor(private appraisalService: AppraisalService,
private employeeService: EmployeeService,
private cdr: ChangeDetectorRef
......@@ -82,6 +85,11 @@ export class SelfEvaluationComponent implements OnInit {
next: response => {
this.appraisalCompentency.dataList = JSON.parse(JSON.stringify(response))
if (this.appraisalCompentency.dataList.length) {
this.allCompetencyTypeId = this.appraisalCompentency.dataList[0].masfromEvaluationAssessment1.map(x => ({
statusType: "",
competencyTypeId: x.competencyType.competencyTypeId,
shortName: x.competencyType.shortName
}))
this.selectAppraisalCompentency(this.appraisalCompentency.dataList[0])
}
this.appraisalCompentency.loading = false
......
......@@ -249,7 +249,7 @@
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"></app-idp-evalution> -->
<app-pms-form-employee [currentTap]="'idp'"
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'idp'"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[allCompetencyTypeId]="formEvaluation.allCompetencyTypeId"
......@@ -260,7 +260,7 @@
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"></app-pms-evalution> -->
<app-pms-form-employee [currentTap]="'pms'"
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="'pms'"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"></app-pms-form-employee>
......@@ -271,7 +271,7 @@
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[evaluateeId]="formEvaluation.evaluateeId"
[competencyTypeId]="formEvaluation.competencyTypeId"></app-evaluation> -->
<app-pms-form-employee [currentTap]="pageEvalution"
<app-pms-form-employee [evaluationForm]="'sup'" [currentTap]="pageEvalution"
(sendReturnPath)="getBossList();pageEvalution='' ; pathTitle = ['การประเมินผล', 'ประเมินโดยหัวหน้า']"
[evaluationRoundId]="formEvaluation.evaluationRoundId" [evaluaterId]="formEvaluation.evaluaterId"
[allCompetencyTypeId]="formEvaluation.allCompetencyTypeId"
......
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