Commit 8126d549 by Nattana Chaiyamat

การประเมินผล > ประเมินตนเอง

parent d52fa175
...@@ -91,14 +91,14 @@ ...@@ -91,14 +91,14 @@
<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) * 10) : (((currentPage-1) * 10) + 10);let i = index">
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
{{item.masfromEvaluationRoundModel.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.apsassessy.pl.tdesc}}</td> <td class="text-center">{{item.apsassessy.pl.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" <i class="ti ti-edit cursor-pointer i-gray fs-xl px-1"
data-hs-overlay="#edit-define-document-form-table-modal-edit" data-hs-overlay="#edit-define-document-form-table-modal-edit"
(click)="openEdit(item.masfromEvaluationRoundModel.evaluationRoundId,item.apsassessy.employeeId)"></i> (click)="openEdit(item.masfromEvaluationRound.evaluationRoundId,item.apsassessy.employeeId)"></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>
......
...@@ -5,27 +5,25 @@ ...@@ -5,27 +5,25 @@
<ng-container *ngTemplateOutlet="currentTemplate"></ng-container> <ng-container *ngTemplateOutlet="currentTemplate"></ng-container>
</div> </div>
<ng-template #selfEvaluation1_2> <ng-template #selfEvaluation>
<div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem"> <div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem">
ประเมินผล ประจำปี 2024 ประเมินผล ประจำปี {{currentDate.getFullYear()}}
</div> </div>
<div class="pt-0.75rem"> <div class="pt-0.75rem">
<div class="border-b border-gray-200 dark:border-white/10 px-2rem"> <div class="border-b border-gray-200 dark:border-white/10 px-2rem">
<nav class=" flex space-x-2 rtl:space-x-reverse"> <nav class=" flex space-x-2 rtl:space-x-reverse">
<a class="border justify-center rounded-top-4px bg-primary text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 active" <a *ngFor="let item of appraisalCompentency.dataList; let i=index ; let f= first"
href="javascript:void(0);" id="card-type-item-1" data-hs-tab="#underline-1" class="border justify-center rounded-top-4px hs-tab-active:!bg-primary hs-tab-active:text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center hover:text-gray-900"
aria-controls="underline-1"> [class.active]="f" href="javascript:void(0);" id="card-type-item-1"
รอบการประเมินที่ 1/2 [attr.data-hs-tab]="'#underline-'+(i+1)" aria-controls="underline-1"
</a> (click)="selectAppraisalCompentency(item)">
<a class="border justify-center rounded-top-4px bg-primary text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center text-gray-600 active" รอบการประเมินที่ {{i+1}}/{{appraisalCompentency.dataList.length}}
href="javascript:void(0);" id="card-type-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1">
รอบการประเมินที่ 2/2
</a> </a>
</nav> </nav>
</div> </div>
<div class="pt-50px"> <div class="pt-50px">
<div id="underline-1" role="tabpanel" aria-labelledby="underline-item-1"> <div *ngFor="let item of appraisalCompentency.dataList; let i=index" [id]="'underline-'+(i+1)"
role="tabpanel">
<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">
...@@ -93,33 +91,34 @@ ...@@ -93,33 +91,34 @@
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="!appraisalCompentency.loading&&!appraisalCompentencyFilter().length"> <tbody *ngIf="!appraisalCompentency.loading&&!appraisalCompentencyFilter(i).length">
<tr> <tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล ไม่พบข้อมูล
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="!appraisalCompentency.loading&&appraisalCompentencyFilter().length"> <tbody *ngIf="!appraisalCompentency.loading&&appraisalCompentencyFilter(i).length">
<tr *ngFor="let item of appraisalCompentencyFilter();let i = index"> <tr
*ngFor="let masfromEvaluationRound of appraisalCompentencyFilter(i);let i = index">
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
{{item.data.masfromEvaluationRoundModel.evaluationRoundId}} {{masfromEvaluationRound.competencyType.shortName}}
</td> </td>
<td> <td>
{{item.data.masfromEvaluationRoundModel.tdesc}} {{masfromEvaluationRound.competencyType.tdesc}}
</td> </td>
<td> <td>
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodStart)}} {{convertDate(appraisalCompentency.select.masfromEvaluationRound.apsPeriodStart)}}
</td> </td>
<td> <td>
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodEnd)}} {{convertDate(appraisalCompentency.select.masfromEvaluationRound.apsPeriodEnd)}}
</td> </td>
<td> <td>
{{item.data.masfromStatusType.tdesc}} {{masfromEvaluationRound.masfromStatusType.tdesc}}
</td> </td>
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
<span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer" <span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer"
(click)="selectAppraisalCompentency(item.data);getAppraisalCompentencyForm();currentTemplate = selfEvaluation1_2Edit ; pathTitle = ['การประเมินผล', 'ประเมินผล']"> (click)="getAppraisalCompentencyForm(masfromEvaluationRound.competencyType.competencyTypeId);currentTemplate = selfEvaluationEdit ; pathTitle = ['การประเมินผล', 'ประเมินผล']">
ประเมิน ประเมิน
</span> </span>
</td> </td>
...@@ -168,18 +167,18 @@ ...@@ -168,18 +167,18 @@
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="!appraisalPms.loading&&appraisalPmsFilter().length"> <tbody *ngIf="!appraisalPms.loading&&appraisalPmsFilter().length">
<tr *ngFor="let item of appraisalPmsFilter();let i = index"> <!-- <tr *ngFor="let item of appraisalPmsFilter();let i = index">
<td class="flex justify-center items-center"> <td class="flex justify-center items-center">
{{item.data.masfromEvaluationRoundModel.evaluationRoundId}} {{item.data.masfromEvaluationRound.evaluationRoundId}}
</td> </td>
<td> <td>
{{item.data.masfromEvaluationRoundModel.tdesc}} {{item.data.masfromEvaluationRound.tdesc}}
</td> </td>
<td> <td>
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodStart)}} {{convertDate(item.data.masfromEvaluationRound.apsPeriodStart)}}
</td> </td>
<td> <td>
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodEnd)}} {{convertDate(item.data.masfromEvaluationRound.apsPeriodEnd)}}
</td> </td>
<td> <td>
{{item.data.masfromStatusType.tdesc}} {{item.data.masfromStatusType.tdesc}}
...@@ -189,7 +188,7 @@ ...@@ -189,7 +188,7 @@
ประเมิน ประเมิน
</span> </span>
</td> </td>
</tr> </tr> -->
</tbody> </tbody>
</table> </table>
</div> </div>
...@@ -201,11 +200,11 @@ ...@@ -201,11 +200,11 @@
<ng-template #selfEvaluation1_2Edit> <ng-template #selfEvaluationEdit>
<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"
(click)="currentTemplate = selfEvaluation1_2 ; pathTitle = ['การประเมินผล', 'ประเมินตนเอง']"> (click)="currentTemplate = selfEvaluation ; pathTitle = ['การประเมินผล', 'ประเมินตนเอง']">
<i class="ti ti-chevron-left"></i> <i class="ti ti-chevron-left"></i>
ย้อนกลับ ย้อนกลับ
</button> </button>
...@@ -242,28 +241,6 @@ ...@@ -242,28 +241,6 @@
<div class="text-gray-400">ระดับ 4 = สอนผู้อื่นได้ มีความคล่องตัว เชื่อมโยง ความรู้ในงานได้</div> <div class="text-gray-400">ระดับ 4 = สอนผู้อื่นได้ มีความคล่องตัว เชื่อมโยง ความรู้ในงานได้</div>
<div class="text-gray-400">ระดับ 5 = มีความชำนาญ เชี่ยวชาญ เป็นที่ยอมรับ ในองค์กร</div> <div class="text-gray-400">ระดับ 5 = มีความชำนาญ เชี่ยวชาญ เป็นที่ยอมรับ ในองค์กร</div>
</div> </div>
<!-- <div class="grid-cols-1">
<div class="text-gray-400 text-center">ระดับความคาดหวัง</div>
<div class="text-gray-400 text-center">1</div>
<div class="text-gray-400 text-center">2</div>
<div class="text-gray-400 text-center">3</div>
<div class="text-gray-400 text-center">4</div>
<div class="text-gray-400 text-center">5</div>
<div class="text-gray-400 text-center">6</div>
<div class="text-gray-400 text-center">7</div>
<div class="text-gray-400 text-center">8</div>
</div>
<div class="grid-cols-1">
<div class="text-gray-400 text-center">สำหรับพนักงานระดับ</div>
<div class="text-gray-400 text-center">O1 - O2</div>
<div class="text-gray-400 text-center">O3 - O4</div>
<div class="text-gray-400 text-center">S1 - S2</div>
<div class="text-gray-400 text-center">S3 - S4</div>
<div class="text-gray-400 text-center">M1 - M2</div>
<div class="text-gray-400 text-center">M3 - M4</div>
<div class="text-gray-400 text-center">E1 - E2</div>
<div class="text-gray-400 text-center">E3 - E4</div>
</div> -->
</div> </div>
</div> </div>
<div class="pb-2rem px-2rem"> <div class="pb-2rem px-2rem">
...@@ -583,5 +560,5 @@ ...@@ -583,5 +560,5 @@
<button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="save()"> <button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="save()">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
</div> </div>-->
</ng-template> </ng-template>
\ No newline at end of file
...@@ -31,15 +31,15 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -31,15 +31,15 @@ export class SelfEvaluationComponent implements OnInit {
score: ["หากได้คะแนน 90 - 100% ถือว่า Gap +1", "หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap", "หากได้คะแนน 60 - 79% ถือว่า Gap - 1", "หากได้คะแนน 40 - 59% ถือว่า Gap -2", "หากได้คะแนน 0 - 39% ถือว่า Gap - 3"], score: ["หากได้คะแนน 90 - 100% ถือว่า Gap +1", "หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap", "หากได้คะแนน 60 - 79% ถือว่า Gap - 1", "หากได้คะแนน 40 - 59% ถือว่า Gap -2", "หากได้คะแนน 0 - 39% ถือว่า Gap - 3"],
condition: ["1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1", "2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %", "3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"], condition: ["1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1", "2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %", "3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"],
}] }]
@ViewChild('selfEvaluation1_2', { static: true }) selfEvaluation1_2!: TemplateRef<any>; @ViewChild('selfEvaluation', { static: true }) selfEvaluation!: TemplateRef<any>;
@ViewChild('selfEvaluation1_2Edit', { static: true }) selfEvaluation1_2Edit!: TemplateRef<any>; @ViewChild('selfEvaluationEdit', { static: true }) selfEvaluationEdit!: TemplateRef<any>;
currentTemplate: TemplateRef<any> = this.selfEvaluation1_2 currentTemplate: TemplateRef<any> = this.selfEvaluation
appraisalCompentency: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] } appraisalCompentency: { loading: boolean, select: AppraisalModel, dataList: AppraisalModel[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
appraisalCompentencyForm: { loading: boolean, data: AppraisalFormModel } = { loading: false, data: new MyAppraisalFormModel() } appraisalCompentencyForm: { loading: boolean, data: AppraisalFormModel } = { loading: false, data: new MyAppraisalFormModel() }
appraisalPms: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] } appraisalPms: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
employee: { loading: boolean, data: EmployeeModel } = { loading: false, data: new MyEmployeeModel() } employee: { loading: boolean, data: EmployeeModel } = { loading: false, data: new MyEmployeeModel() }
setting: { loading: boolean, data: SettingAssessmentModel } = { loading: false, data: new MySettingAssessmentModel() } // setting: { loading: boolean, data: SettingAssessmentModel } = { loading: false, data: new MySettingAssessmentModel() }
currentDate = new Date() currentDate = new Date()
constructor(private appraisalService: AppraisalService, constructor(private appraisalService: AppraisalService,
private employeeService: EmployeeService, private employeeService: EmployeeService,
...@@ -48,26 +48,26 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -48,26 +48,26 @@ export class SelfEvaluationComponent implements OnInit {
) { ) {
} }
ngOnInit(): void { ngOnInit(): void {
this.currentTemplate = this.selfEvaluation1_2 this.currentTemplate = this.selfEvaluation
this.getProfile() this.getProfile()
this.getAppraisalCompentencyList() this.getAppraisalCompentencyList()
this.getSettingList() // this.getSettingList()
} }
getSettingList() { // getSettingList() {
this.setting.loading = true // this.setting.loading = true
this.settingAssessmentService.get().subscribe({ // this.settingAssessmentService.get().subscribe({
next: response => { // next: response => {
this.setting.data = new MySettingAssessmentModel(response) // this.setting.data = new MySettingAssessmentModel(response)
this.setting.loading = false // this.setting.loading = false
this.cdr.detectChanges() // this.cdr.detectChanges()
}, error: error => { // }, error: error => {
this.setting.loading = false // this.setting.loading = false
this.cdr.detectChanges() // this.cdr.detectChanges()
} // }
}) // })
} // }
getProfile() { getProfile() {
this.employee.loading = true this.employee.loading = true
this.employeeService.getProfile().subscribe({ this.employeeService.getProfile().subscribe({
...@@ -85,7 +85,10 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -85,7 +85,10 @@ export class SelfEvaluationComponent implements OnInit {
this.appraisalCompentency.loading = true this.appraisalCompentency.loading = true
this.appraisalService.getCompetencyList().subscribe({ this.appraisalService.getCompetencyList().subscribe({
next: response => { next: response => {
this.appraisalCompentency.dataList = response.map(x => ({ check: false, data: new MyAppraisalModel(x) })) this.appraisalCompentency.dataList = response.map(x => new MyAppraisalModel(x))
if (this.appraisalCompentency.dataList.length) {
this.selectAppraisalCompentency(this.appraisalCompentency.dataList[0])
}
this.appraisalCompentency.loading = false this.appraisalCompentency.loading = false
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
...@@ -94,22 +97,21 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -94,22 +97,21 @@ export class SelfEvaluationComponent implements OnInit {
} }
}) })
} }
appraisalCompentencyFilter() { appraisalCompentencyFilter(index: number) {
return this.appraisalCompentency.dataList return this.appraisalCompentency.dataList[index].masfromEvaluationAssessment1
} }
selectAppraisalCompentency(data: AppraisalModel) { selectAppraisalCompentency(data: AppraisalModel) {
this.appraisalCompentency.select = new MyAppraisalModel(data) this.appraisalCompentency.select = new MyAppraisalModel(data)
} }
getAppraisalCompentencyForm(typeId: string) {
getAppraisalCompentencyForm() {
this.appraisalCompentencyForm.loading = true this.appraisalCompentencyForm.loading = true
this.appraisalService.getFormCompentencyById(this.appraisalCompentency.select.masfromEvaluationRoundModel.evaluationRoundId, this.employee.data.employeeId).subscribe({ this.appraisalService.getFormCompentencyById(this.appraisalCompentency.select.masfromEvaluationRound.evaluationRoundId, this.employee.data.employeeId, typeId).subscribe({
next: response => { next: response => {
this.appraisalCompentencyForm.data = new MyAppraisalFormModel(response) console.log(" 🐒 response:", response)
this.appraisalCompentencyForm.data = response // this.appraisalCompentencyForm.data = new MyAppraisalFormModel(response)
this.calnumberCheck() // this.appraisalCompentencyForm.data = response
this.appraisalCompentencyForm.loading = false // this.calnumberCheck()
// this.appraisalCompentencyForm.loading = false
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
this.appraisalCompentencyForm.loading = false this.appraisalCompentencyForm.loading = false
...@@ -117,9 +119,10 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -117,9 +119,10 @@ export class SelfEvaluationComponent implements OnInit {
} }
}) })
} }
appraisalCompentencyFormFilter() {
return this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList // appraisalCompentencyFormFilter() {
} // return this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList
// }
appraisalPmsFilter() { appraisalPmsFilter() {
...@@ -291,76 +294,75 @@ export class SelfEvaluationComponent implements OnInit { ...@@ -291,76 +294,75 @@ export class SelfEvaluationComponent implements OnInit {
return date.toLocaleDateString('th-TH', { day: 'numeric', month: 'long', year: 'numeric' }); return date.toLocaleDateString('th-TH', { day: 'numeric', month: 'long', year: 'numeric' });
} }
calnumberCheck() { // calnumberCheck() {
this.appraisalCompentencyForm.data.numberCheck1 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 1).length).reduce((acc: any, num: any) => acc + num, 0) // this.appraisalCompentencyForm.data.numberCheck1 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 1).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyForm.data.numberCheck2 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 2).length).reduce((acc: any, num: any) => acc + num, 0) // this.appraisalCompentencyForm.data.numberCheck2 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 2).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyForm.data.numberCheck3 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 3).length).reduce((acc: any, num: any) => acc + num, 0) // this.appraisalCompentencyForm.data.numberCheck3 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 3).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyForm.data.numberCheck4 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 4).length).reduce((acc: any, num: any) => acc + num, 0) // this.appraisalCompentencyForm.data.numberCheck4 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 4).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyForm.data.numberCheck5 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 5).length).reduce((acc: any, num: any) => acc + num, 0) // this.appraisalCompentencyForm.data.numberCheck5 = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 5).length).reduce((acc: any, num: any) => acc + num, 0)
this.calWeightTotal() // this.calWeightTotal()
this.cdr.detectChanges() // this.cdr.detectChanges()
// }
} // calWeightScore(numberCheck: number) {
calWeightScore(numberCheck: number) { // switch (numberCheck) {
switch (numberCheck) { // case (1): {
case (1): { // return +(this.setting.data.settingScore1) * this.appraisalCompentencyForm.data.numberCheck1
return +(this.setting.data.settingScore1) * this.appraisalCompentencyForm.data.numberCheck1 // }
} // case (2): {
case (2): { // return +(this.setting.data.settingScore2) * this.appraisalCompentencyForm.data.numberCheck2
return +(this.setting.data.settingScore2) * this.appraisalCompentencyForm.data.numberCheck2 // }
} // case (3): {
case (3): { // return +(this.setting.data.settingScore3) * this.appraisalCompentencyForm.data.numberCheck3
return +(this.setting.data.settingScore3) * this.appraisalCompentencyForm.data.numberCheck3 // }
} // case (4): {
case (4): { // return +(this.setting.data.settingScore4) * this.appraisalCompentencyForm.data.numberCheck4
return +(this.setting.data.settingScore4) * this.appraisalCompentencyForm.data.numberCheck4 // }
} // case (5): {
case (5): { // return +(this.setting.data.settingScore5) * this.appraisalCompentencyForm.data.numberCheck5
return +(this.setting.data.settingScore5) * this.appraisalCompentencyForm.data.numberCheck5 // }
} // default: { return }
default: { return } // }
} // }
} // calWeightTotal() {
calWeightTotal() { // this.appraisalCompentencyForm.data.weightedTotal = 0
this.appraisalCompentencyForm.data.weightedTotal = 0 // this.appraisalCompentencyForm.data.weightedTotal = (this.calWeightScore(1) ?? 0) + (this.calWeightScore(2) ?? 0) + (this.calWeightScore(3) ?? 0) + (this.calWeightScore(4) ?? 0) + (this.calWeightScore(5) ?? 0)
this.appraisalCompentencyForm.data.weightedTotal = (this.calWeightScore(1) ?? 0) + (this.calWeightScore(2) ?? 0) + (this.calWeightScore(3) ?? 0) + (this.calWeightScore(4) ?? 0) + (this.calWeightScore(5) ?? 0) // this.cdr.detectChanges()
this.cdr.detectChanges() // this.calAverageScore()
this.calAverageScore() // }
} // calAverageScore() {
calAverageScore() { // const total = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.length).reduce((acc: any, num: any) => acc + num, 0) * 5
const total = this.appraisalCompentencyForm.data.masfromEvaluationAssessment1lList.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.length).reduce((acc: any, num: any) => acc + num, 0) * 5 // if (total) {
if (total) { // this.appraisalCompentencyForm.data.averageScore = 0
this.appraisalCompentencyForm.data.averageScore = 0 // this.appraisalCompentencyForm.data.averageScore = (this.appraisalCompentencyForm.data.weightedTotal / total) * 100
this.appraisalCompentencyForm.data.averageScore = (this.appraisalCompentencyForm.data.weightedTotal / total) * 100 // this.cdr.detectChanges()
this.cdr.detectChanges() // }
} // }
}
showNumber(text: number | string) { showNumber(text: number | string) {
const num = Number(text); const num = Number(text);
return isNaN(num) ? 0 : +num.toFixed(2); return isNaN(num) ? 0 : +num.toFixed(2);
} }
calGap(score: number | string) { // calGap(score: number | string) {
const roundedScore = this.showNumber(score) % 1 <= 0.5 ? Math.floor(this.showNumber(score)) : Math.round(this.showNumber(score)); // const roundedScore = this.showNumber(score) % 1 <= 0.5 ? Math.floor(this.showNumber(score)) : Math.round(this.showNumber(score));
if (roundedScore >= 90 && roundedScore <= 100) { // if (roundedScore >= 90 && roundedScore <= 100) {
if (this.appraisalCompentencyForm.data.numberCheck1 || this.appraisalCompentencyForm.data.numberCheck2 || this.appraisalCompentencyForm.data.numberCheck3) { // if (this.appraisalCompentencyForm.data.numberCheck1 || this.appraisalCompentencyForm.data.numberCheck2 || this.appraisalCompentencyForm.data.numberCheck3) {
return "-1"; // return "-1";
} // }
return "+1"; // return "+1";
} else if (roundedScore >= 80 && roundedScore <= 89) { // } else if (roundedScore >= 80 && roundedScore <= 89) {
if (this.appraisalCompentencyForm.data.numberCheck1 || this.appraisalCompentencyForm.data.numberCheck2 || this.appraisalCompentencyForm.data.numberCheck3) { // if (this.appraisalCompentencyForm.data.numberCheck1 || this.appraisalCompentencyForm.data.numberCheck2 || this.appraisalCompentencyForm.data.numberCheck3) {
return "-1"; // return "-1";
} // }
return "0"; // return "0";
} else if (roundedScore >= 60 && roundedScore <= 79) { // } else if (roundedScore >= 60 && roundedScore <= 79) {
return "-1"; // return "-1";
} else if (roundedScore >= 40 && roundedScore <= 59) { // } else if (roundedScore >= 40 && roundedScore <= 59) {
return "-2"; // return "-2";
} else { // } else {
return "-3"; // return "-3";
} // }
} // }
calAverage(score: number | string) { calAverage(score: number | string) {
const roundedScore = this.showNumber(score) % 1 <= 0.5 ? Math.floor(this.showNumber(score)) : Math.round(this.showNumber(score)); const roundedScore = this.showNumber(score) % 1 <= 0.5 ? Math.floor(this.showNumber(score)) : Math.round(this.showNumber(score));
if (roundedScore >= 90 && roundedScore <= 100) { if (roundedScore >= 90 && roundedScore <= 100) {
......
import { EmployeeModel, MyEmployeeModel } from "./employee.model" import { CompetencytypeModel, MyCompetencytypeModel } from "./competencytype.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model" import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model"
import { MasfromEvaluationAssessment1Model, MyMasfromEvaluationAssessment1Model } from "./masfrom-evaluation-assessment1.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface AppraisalFormModel { export interface AppraisalFormModel {
personalLevel: PLModel plId: string
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string companyId: string
fromDetail: string lineNo: number
apsassessy: EmployeeModel competencyType: CompetencytypeModel
apsassessyComment: string masfromStatusType: StatusCodeModel
apsapprove1: EmployeeModel currentStep: string
apsapprove2: EmployeeModel lastStep: string
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string apsassessyStatus: string
apsapprove1Status: string apsapprove1Status: string
apsapprove2Status: string apsapprove2Status: string
...@@ -28,28 +22,29 @@ export interface AppraisalFormModel { ...@@ -28,28 +22,29 @@ export interface AppraisalFormModel {
numberCheck5: number numberCheck5: number
weightedTotal: number weightedTotal: number
averageScore: number averageScore: number
apsassessyComment: string
apsapprove1Comment: string apsapprove1Comment: string
apsapprove2Comment: string apsapprove2Comment: string
apsapprove3Comment: string apsapprove3Comment: string
apsapprove4Comment: string apsapprove4Comment: string
apsapprove5Comment: string apsapprove5Comment: string
apsassessyDate: string
apsapprove1Date: string
apsapprove2Date: string
apsapprove3Date: string
apsapprove4Date: string
apsapprove5Date: string
evaluationResults: string evaluationResults: string
sumEvaluationResults: string sumEvaluationResults: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1Model[]
active: boolean
} }
export class MyAppraisalFormModel implements AppraisalFormModel { export class MyAppraisalFormModel implements AppraisalFormModel {
personalLevel: PLModel plId: string
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string companyId: string
fromDetail: string lineNo: number
apsassessy: EmployeeModel competencyType: CompetencytypeModel
apsassessyComment: string masfromStatusType: StatusCodeModel
apsapprove1: EmployeeModel currentStep: string
apsapprove2: EmployeeModel lastStep: string
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string apsassessyStatus: string
apsapprove1Status: string apsapprove1Status: string
apsapprove2Status: string apsapprove2Status: string
...@@ -63,27 +58,28 @@ export class MyAppraisalFormModel implements AppraisalFormModel { ...@@ -63,27 +58,28 @@ export class MyAppraisalFormModel implements AppraisalFormModel {
numberCheck5: number numberCheck5: number
weightedTotal: number weightedTotal: number
averageScore: number averageScore: number
apsassessyComment: string
apsapprove1Comment: string apsapprove1Comment: string
apsapprove2Comment: string apsapprove2Comment: string
apsapprove3Comment: string apsapprove3Comment: string
apsapprove4Comment: string apsapprove4Comment: string
apsapprove5Comment: string apsapprove5Comment: string
apsassessyDate: string
apsapprove1Date: string
apsapprove2Date: string
apsapprove3Date: string
apsapprove4Date: string
apsapprove5Date: string
evaluationResults: string evaluationResults: string
sumEvaluationResults: string sumEvaluationResults: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1Model[]
active: boolean
constructor(data?: Partial<AppraisalFormModel>) { constructor(data?: Partial<AppraisalFormModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel) this.plId = data?.plId || ""
this.masfromEvaluationRoundModel = new MyEvaluationCycleModel(data?.masfromEvaluationRoundModel)
this.companyId = data?.companyId || "" this.companyId = data?.companyId || ""
this.fromDetail = data?.fromDetail || "" this.lineNo = data?.lineNo ?? 0
this.apsassessyComment = data?.apsassessyComment || "" this.competencyType = new MyCompetencytypeModel(data?.competencyType)
this.apsassessy = new MyEmployeeModel(data?.apsassessy) this.masfromStatusType = new MyStatusCodeModel(data?.masfromStatusType)
this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1) this.currentStep = data?.currentStep || ""
this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2) this.lastStep = data?.lastStep || ""
this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3)
this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4)
this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5)
this.apsassessyStatus = data?.apsassessyStatus || "" this.apsassessyStatus = data?.apsassessyStatus || ""
this.apsapprove1Status = data?.apsapprove1Status || "" this.apsapprove1Status = data?.apsapprove1Status || ""
this.apsapprove2Status = data?.apsapprove2Status || "" this.apsapprove2Status = data?.apsapprove2Status || ""
...@@ -97,15 +93,20 @@ export class MyAppraisalFormModel implements AppraisalFormModel { ...@@ -97,15 +93,20 @@ export class MyAppraisalFormModel implements AppraisalFormModel {
this.numberCheck5 = data?.numberCheck5 ?? 0 this.numberCheck5 = data?.numberCheck5 ?? 0
this.weightedTotal = data?.weightedTotal ?? 0 this.weightedTotal = data?.weightedTotal ?? 0
this.averageScore = data?.averageScore ?? 0 this.averageScore = data?.averageScore ?? 0
this.apsassessyComment = data?.apsassessyComment || ""
this.apsapprove1Comment = data?.apsapprove1Comment || "" this.apsapprove1Comment = data?.apsapprove1Comment || ""
this.apsapprove2Comment = data?.apsapprove2Comment || "" this.apsapprove2Comment = data?.apsapprove2Comment || ""
this.apsapprove3Comment = data?.apsapprove3Comment || "" this.apsapprove3Comment = data?.apsapprove3Comment || ""
this.apsapprove4Comment = data?.apsapprove4Comment || "" this.apsapprove4Comment = data?.apsapprove4Comment || ""
this.apsapprove5Comment = data?.apsapprove5Comment || "" this.apsapprove5Comment = data?.apsapprove5Comment || ""
this.apsassessyDate = data?.apsassessyDate || ""
this.apsapprove1Date = data?.apsapprove1Date || ""
this.apsapprove2Date = data?.apsapprove2Date || ""
this.apsapprove3Date = data?.apsapprove3Date || ""
this.apsapprove4Date = data?.apsapprove4Date || ""
this.apsapprove5Date = data?.apsapprove5Date || ""
this.evaluationResults = data?.evaluationResults || "" this.evaluationResults = data?.evaluationResults || ""
this.sumEvaluationResults = data?.sumEvaluationResults || "" this.sumEvaluationResults = data?.sumEvaluationResults || ""
this.masfromEvaluationAssessment1lList = data?.masfromEvaluationAssessment1lList?.map(x => new MyMasfromEvaluationAssessment1Model(x)) || []
this.active = data?.active ?? false
} }
} }
import { AppraisalFormModel, MyAppraisalFormModel } from "./appraisal-form.model"
import { EmployeeModel, MyEmployeeModel } from "./employee.model" import { EmployeeModel, MyEmployeeModel } from "./employee.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model" import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model"
import { MyPLModel, PLModel } from "./pl.model" import { MyPLModel, PLModel } from "./pl.model"
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model"
export interface AppraisalModel { export interface AppraisalModel {
personalLevel: PLModel personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel masfromEvaluationRound: EvaluationCycleModel
companyId: string companyId: string
masfromStatusType: StatusCodeModel active: boolean
fromDetail: string
apsassessy: EmployeeModel apsassessy: EmployeeModel
apsapprove1: EmployeeModel apsapprove1: EmployeeModel
apsapprove2: EmployeeModel apsapprove2: EmployeeModel
apsapprove3: EmployeeModel apsapprove3: EmployeeModel
apsapprove4: EmployeeModel apsapprove4: EmployeeModel
apsapprove5: EmployeeModel apsapprove5: EmployeeModel
apsassessyStatus: string masfromEvaluationAssessment1: AppraisalFormModel[]
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
} }
export class MyAppraisalModel implements AppraisalModel { export class MyAppraisalModel implements AppraisalModel {
personalLevel: PLModel personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel masfromEvaluationRound: EvaluationCycleModel
companyId: string companyId: string
masfromStatusType: StatusCodeModel active: boolean
fromDetail: string
apsassessy: EmployeeModel apsassessy: EmployeeModel
apsapprove1: EmployeeModel apsapprove1: EmployeeModel
apsapprove2: EmployeeModel apsapprove2: EmployeeModel
apsapprove3: EmployeeModel apsapprove3: EmployeeModel
apsapprove4: EmployeeModel apsapprove4: EmployeeModel
apsapprove5: EmployeeModel apsapprove5: EmployeeModel
apsassessyStatus: string masfromEvaluationAssessment1: AppraisalFormModel[]
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
constructor(data?: Partial<AppraisalModel>) { constructor(data?: Partial<AppraisalModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel) this.personalLevel = new MyPLModel(data?.personalLevel)
this.masfromEvaluationRoundModel = new MyEvaluationCycleModel(data?.masfromEvaluationRoundModel) this.masfromEvaluationRound = new MyEvaluationCycleModel(data?.masfromEvaluationRound)
this.companyId = data?.companyId || "" this.companyId = data?.companyId || ""
this.masfromStatusType = new MyStatusCodeModel(data?.masfromStatusType) this.active = data?.active ?? false
this.fromDetail = data?.fromDetail || ""
this.apsassessy = new MyEmployeeModel(data?.apsassessy) this.apsassessy = new MyEmployeeModel(data?.apsassessy)
this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1) this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1)
this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2) this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2)
this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3) this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3)
this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4) this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4)
this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5) this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5)
this.apsassessyStatus = data?.apsassessyStatus || "" this.masfromEvaluationAssessment1 = data?.masfromEvaluationAssessment1?.map(x => new MyAppraisalFormModel(x)) || []
this.apsapprove1Status = data?.apsapprove1Status || ""
this.apsapprove2Status = data?.apsapprove2Status || ""
this.apsapprove3Status = data?.apsapprove3Status || ""
this.apsapprove4Status = data?.apsapprove4Status || ""
this.apsapprove5Status = data?.apsapprove5Status || ""
this.targetScore1 = data?.targetScore1 ?? 0
this.targetScore2 = data?.targetScore2 ?? 0
this.targetScore3 = data?.targetScore3 ?? 0
this.targetScore4 = data?.targetScore4 ?? 0
this.targetScore5 = data?.targetScore5 ?? 0
this.weightedTotal = data?.weightedTotal ?? 0
this.averageScore = data?.averageScore ?? 0
this.apsapprove1Comment = data?.apsapprove1Comment || ""
this.apsapprove2Comment = data?.apsapprove2Comment || ""
this.apsapprove3Comment = data?.apsapprove3Comment || ""
this.apsapprove4Comment = data?.apsapprove4Comment || ""
this.apsapprove5Comment = data?.apsapprove5Comment || ""
this.evaluationResults = data?.evaluationResults || ""
this.sumEvaluationResults = data?.sumEvaluationResults || ""
} }
} }
...@@ -15,13 +15,13 @@ export class MyCompetencytypeModel implements CompetencytypeModel { ...@@ -15,13 +15,13 @@ export class MyCompetencytypeModel implements CompetencytypeModel {
tdesc: string tdesc: string
shortName: string shortName: string
expectationLevel: string expectationLevel: string
constructor(data: Partial<CompetencytypeModel>) { constructor(data?: Partial<CompetencytypeModel>) {
this.competencyTypeId = data.competencyTypeId || "" this.competencyTypeId = data?.competencyTypeId || ""
this.companyId = data.companyId || "" this.companyId = data?.companyId || ""
this.edesc = data.edesc || "" this.edesc = data?.edesc || ""
this.tdesc = data.tdesc || "" this.tdesc = data?.tdesc || ""
this.shortName = data.shortName || "" this.shortName = data?.shortName || ""
this.expectationLevel = data.expectationLevel || "" this.expectationLevel = data?.expectationLevel || ""
} }
} }
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model"; import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model";
export interface EvaluationCycleModel { export interface EvaluationCycleModel {
evaluationRoundId: string; evaluationRoundId: string
tdesc: string; companyId: string
edesc: string; tdesc: string
apsyear: string; edesc: string
apsPeriodStart: string; apsyear: string
apsPeriodEnd: string; apsPeriodStart: string
statusCode: StatusCodeModel; apsPeriodEnd: string
statusCode: StatusCodeModel
} }
export class MyEvaluationCycleModel implements EvaluationCycleModel { export class MyEvaluationCycleModel implements EvaluationCycleModel {
evaluationRoundId: string; evaluationRoundId: string
tdesc: string; companyId: string
edesc: string; tdesc: string
apsyear: string; edesc: string
apsPeriodStart: string; apsyear: string
apsPeriodEnd: string; apsPeriodStart: string
statusCode: StatusCodeModel; apsPeriodEnd: string
statusCode: StatusCodeModel
constructor(data?: Partial<EvaluationCycleModel>) { constructor(data?: Partial<EvaluationCycleModel>) {
this.evaluationRoundId = data?.evaluationRoundId || ""; this.evaluationRoundId = data?.evaluationRoundId || "";
this.companyId = data?.companyId || "";
this.tdesc = data?.tdesc || ""; this.tdesc = data?.tdesc || "";
this.edesc = data?.edesc || ""; this.edesc = data?.edesc || "";
this.apsyear = data?.apsyear || ""; this.apsyear = data?.apsyear || "";
this.apsPeriodStart = data?.apsPeriodStart || ""; this.apsPeriodStart = data?.apsPeriodStart || "";
this.apsPeriodEnd = data?.apsPeriodEnd || ""; this.apsPeriodEnd = data?.apsPeriodEnd || "";
this.statusCode =new MyStatusCodeModel(data?.statusCode || {}) this.statusCode = new MyStatusCodeModel(data?.statusCode || {})
} }
} }
...@@ -2,7 +2,6 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; ...@@ -2,7 +2,6 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { PLModel } from '../model/pl.model';
import { AlertModel } from '../model/alert.model'; import { AlertModel } from '../model/alert.model';
import { AppraisalModel } from '../model/appraisal.model'; import { AppraisalModel } from '../model/appraisal.model';
import { AppraisalFormModel } from '../model/appraisal-form.model'; import { AppraisalFormModel } from '../model/appraisal-form.model';
...@@ -14,8 +13,8 @@ export class AppraisalService { ...@@ -14,8 +13,8 @@ export class AppraisalService {
urlApi = environment.baseUrl + this.api urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
getFormCompentencyById(evaluationRoundId: string, apsassessy: string): Observable<AppraisalFormModel> { getFormCompentencyById(evaluationRoundId: string, apsassessy: string, typeId: string): Observable<AppraisalFormModel> {
return this.http.get<AppraisalFormModel>(this.urlApi + "/competency/" + evaluationRoundId + "/" + apsassessy) return this.http.get<AppraisalFormModel>(this.urlApi + "/competency/" + evaluationRoundId + "/" + apsassessy + "/" + typeId)
} }
getCompetencyList(): Observable<AppraisalModel[]> { getCompetencyList(): Observable<AppraisalModel[]> {
return this.http.get<AppraisalModel[]>(this.urlApi + "/competency/emp") return this.http.get<AppraisalModel[]>(this.urlApi + "/competency/emp")
......
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