Commit 21dfbf99 by Nattana Chaiyamat

ประเมิน pms

parent 962ed626
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, Output, SimpleChanges } from '@angular/core';
import { AppraisalPmsFormModel } from 'src/app/shared/model/appraisal-pms-form.model'; import { AppraisalPmsFormModel } from 'src/app/shared/model/appraisal-pms-form.model';
import { CompetencyGradeModel, MyCompetencyGradeModel } from 'src/app/shared/model/competency-grades.model'; import { CompetencyGradeModel, MyCompetencyGradeModel } from 'src/app/shared/model/competency-grades.model';
import { AppraisalService } from 'src/app/shared/services/appraisal.service'; import { AppraisalService } from 'src/app/shared/services/appraisal.service';
...@@ -46,21 +46,21 @@ export class PmsEvalutionComponent { ...@@ -46,21 +46,21 @@ export class PmsEvalutionComponent {
netScore: 0, netScore: 0,
}, { }, {
id: 2, id: 2,
evaluationFactor: "Part 2 : ประเมินผลการปฏิบัติงานประจำ(Department KPI)", evaluationFactor: "Part 2 : ประเมินผลการปฏิบัติงานประจำ (Department KPI)",
rawScore: 100, rawScore: 100,
factors: 0, factors: 0,
scoreObtained: 0, scoreObtained: 0,
netScore: 0, netScore: 0,
}, { }, {
id: 3, id: 3,
evaluationFactor: "Part 3 : ประเมินผลการปฏิบัติงานประจำ(Individual KPI)", evaluationFactor: "Part 3 : ประเมินผลการปฏิบัติงานประจำ (Individual KPI)",
rawScore: 100, rawScore: 100,
factors: 0, factors: 0,
scoreObtained: 0, scoreObtained: 0,
netScore: 0, netScore: 0,
}, { }, {
id: 4, id: 4,
evaluationFactor: "Part 4 : ประเมินผลสมรรถนะที่สนับสนุนการปฏิบัติงาน(Competency)", evaluationFactor: "Part 4 : ประเมินผลสมรรถนะที่สนับสนุนการปฏิบัติงาน (Competency)",
rawScore: 100, rawScore: 100,
factors: 0, factors: 0,
scoreObtained: 0, scoreObtained: 0,
...@@ -74,14 +74,14 @@ export class PmsEvalutionComponent { ...@@ -74,14 +74,14 @@ export class PmsEvalutionComponent {
netScore: 0, netScore: 0,
}, { }, {
id: 6, id: 6,
evaluationFactor: "Part 6: งานที่ได้รับมอบหมายเพิ่มเติม ( Cross Functional Project Assignment)", evaluationFactor: "Part 6 : งานที่ได้รับมอบหมายเพิ่มเติม (Cross Functional Project Assignment)",
rawScore: 100, rawScore: 100,
factors: 0, factors: 0,
scoreObtained: 0, scoreObtained: 0,
netScore: 0, netScore: 0,
}, { }, {
id: 7, id: 7,
evaluationFactor: "Part 7: กิจกรรมพิเศษ( Special Activities)", evaluationFactor: "Part 7 : กิจกรรมพิเศษ (Special Activities)",
rawScore: 100, rawScore: 100,
factors: 0, factors: 0,
scoreObtained: 0, scoreObtained: 0,
...@@ -108,6 +108,11 @@ export class PmsEvalutionComponent { ...@@ -108,6 +108,11 @@ export class PmsEvalutionComponent {
private settingAssessmentService: SettingAssessmentService private settingAssessmentService: SettingAssessmentService
) { ) {
} }
ngOnChanges(changes: SimpleChanges): void {
if (changes['evaluateeId'].currentValue || changes['evaluaterId'].currentValue) {
this.toggleAllParts(this.evaluateeId == this.evaluaterId)
}
}
ngOnInit(): void { ngOnInit(): void {
this.getPmsGroupGradeList() this.getPmsGroupGradeList()
this.getAppraisalPmsForm() this.getAppraisalPmsForm()
...@@ -588,4 +593,17 @@ export class PmsEvalutionComponent { ...@@ -588,4 +593,17 @@ export class PmsEvalutionComponent {
} }
}) })
} }
toggleAllParts(check: boolean) {
this.part1show = check
this.part2show = check
this.part3show = check
this.part4show = check
this.part5show = check
this.part6show = check
this.part7show = check
this.part8show = check
this.part9show = check
this.part10show = check
}
} }
\ 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