Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mySkill-x
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
mySkill-x
Commits
f7aee2de
Commit
f7aee2de
authored
Mar 03, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การจัดการรอบการประเมิน รอบการประเมิน
parent
8ff65caf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1262 additions
and
144 deletions
+1262
-144
evaluation-cycle-manager.component.html
...ion-cycle-manager/evaluation-cycle-manager.component.html
+2
-2
edit-evaluation-form.component.html
.../edit-evaluation-form/edit-evaluation-form.component.html
+65
-55
edit-evaluation-form.component.ts
...rm/edit-evaluation-form/edit-evaluation-form.component.ts
+154
-83
evaluation-form.modal.ts
src/app/shared/model/evaluation-form.modal.ts
+1036
-0
evaluation-assessment.service.ts
src/app/shared/services/evaluation-assessment.service.ts
+5
-4
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle-manager.component.html
View file @
f7aee2de
...
...
@@ -14,12 +14,12 @@
(
click
)="
activeTab=
'underline-1'
;
pathTitle =
['การประเมินสมรรถนะ',
'การจัดการรอบการประเมิน',
'รอบการประเมิน']"
>
รอบการประเมิน
</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"
aria-controls="underline-2"
(click)="activeTab='underline-2';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'กำหนดฟอร์มเอกสาร']">
กำหนดฟอร์มเอกสาร
</a>
</a>
-->
</nav>
</div>
<div
class=
"px-2rem"
[
ngClass
]="{'
pt-50px
'
:
groupShow
!==
'
2
'}"
>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.html
View file @
f7aee2de
...
...
@@ -27,7 +27,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<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;"
>
<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"
>
...
...
@@ -72,14 +72,14 @@
</thead>
<tbody>
<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"
>
{{item.masfromEvaluationRound.evaluationRoundId}}
</td>
<td>
{{item.apsassessy.fname}} {{item.apsassessy.lname}}
</td>
<td
class=
"text-center"
>
{{item.apsassessy.position.tdesc}}
</td>
<td
class=
"text-center"
>
{{item.personalLevel.tdesc}}
</td>
<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
"
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>
...
...
@@ -91,42 +91,49 @@
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<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"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<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"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</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
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{assessmentListFilter().length
<10
?
assessmentListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
assessmentListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
assessmentListFilter
().
length
}}
items
</
span
>
<span>
Show {{((currentPage-1) * pageSize)+1}} to {{(assessmentListFilter().length
<
pageSize
)
?
assessmentListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
pageSize
)
-
((
currentPage
*
pageSize
)
-
assessmentListFilter
().
length
)
)
:
(
currentPage
*
pageSize
)
)
}}
of
{{
assessmentListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</nav>
</div>
...
...
@@ -200,7 +207,7 @@
<div
class=
"relative shadow-md"
>
<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
"
style=
"height: 40px;"
[(
ngModel
)]="
searchRound
"
(
ngModelChange
)="
searchChange
()"
>
placeholder=
"Search"
style=
"height: 40px;"
[(
ngModel
)]="
searchRound
"
(
ngModelChange
)="
searchChange
()"
>
<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"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -208,14 +215,14 @@
</div>
</div>
<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>
Add
</button>
</div>
<div
class=
"px-1"
>
<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>
Delete
</button>
...
...
@@ -256,8 +263,8 @@
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"empassessmentListFilter().length > 0"
>
<tr
*
ngFor=
"let item of empassessmentListFilter() | slice:((currentPageRound-1) *
10) : (((currentPageRound-1) * 10) + 10
);let i = index"
>
<tbody
*
ngIf=
"
!loading&&
empassessmentListFilter().length > 0"
>
<tr
*
ngFor=
"let item of empassessmentListFilter() | slice:((currentPageRound-1) *
pageSizeRound) : (((currentPageRound-1) * pageSizeRound) + pageSizeRound
);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
[(
ngModel
)]="
item
.
checkbox
"
(
change
)="
checkempassessmentRoundListCheckbox
()"
>
...
...
@@ -269,7 +276,7 @@
<td
>
{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</td>
<td
class=
"!text-center"
>
{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}
</td>
<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>
</tr>
...
...
@@ -310,9 +317,9 @@
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPageRound-1) *
10)+1}} to {{empassessmentListFilter().length
<10
?
empassessmentListFilter
().
length:
(
currentPageRound=
=pageRound.length
?
((
currentPageRound
*
10
)
-
((
currentPageRound
*
10
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPageRound
*
10
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
<span>
Show {{((currentPageRound-1) *
pageSizeRound)+1}} to {{empassessmentListFilter().length
<
pageSizeRound
?
empassessmentListFilter
().
length:
(
currentPageRound=
=pageRound.length
?
((
currentPageRound
*
pageSizeRound
)
-
((
currentPageRound
*
pageSizeRound
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPageRound
*
pageSizeRound
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
...
...
@@ -323,7 +330,7 @@
(
click
)="
closeModalClass
('
form-pm-emp
')"
>
ย้อนกลับ
</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>
</div>
...
...
@@ -356,7 +363,7 @@
<div
class=
"relative shadow-md"
>
<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
"
style=
"height: 40px;"
[(
ngModel
)]="
searchIndicator
"
(
ngModelChange
)="
searchIndicatorsChange
()"
>
placeholder=
"Search"
style=
"height: 40px;"
[(
ngModel
)]="
searchIndicator
"
(
ngModelChange
)="
searchIndicatorsChange
()"
>
<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"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -374,7 +381,7 @@
<thead>
<tr>
<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"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
...
...
@@ -401,16 +408,16 @@
</tr>
</thead>
<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.tdesc}}
</td>
<td
class=
"!text-center"
>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}
</td>
<td
class=
"flex justify-center"
>
<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"
>
<i
class=
"ri-add-line"
></i>
Select
เพิ่มรายการ
</button>
</div>
</td>
...
...
@@ -452,9 +459,9 @@
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPageIndicator-1) *
10)+1}} to {{empassessmentListFilter().length
<10
?
empassessmentListFilter
().
length:
(
currentPageIndicator=
=pageIndicator.length
?
((
currentPageIndicator
*
10
)
-
((
currentPageIndicator
*
10
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPageIndicator
*
10
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
<span>
Show {{((currentPageIndicator-1) *
pageSizeIndicator)+1}} to {{filterIndicators().length
<
pageSizeIndicator
?
filterIndicators
().
length:
(
currentPageIndicator=
=pageIndicator.length
?
((
currentPageIndicator
*
pageSizeIndicator
)
-
((
currentPageIndicator
*
pageSizeIndicator
)
-
filterIndicators
().
length
)
)
:
(
currentPageIndicator
*
pageSizeIndicator
)
)
}}
of
{{
filterIndicators
().
length
}}
items
</
span
>
</ul>
</nav>
...
...
@@ -502,7 +509,10 @@
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='addForm'"
(
click
)="
saveAssessmentList
();
closeModalClass
('
modal-alert
')"
>
บันทึกข้อมูล
</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>
</div>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.ts
View file @
f7aee2de
...
...
@@ -4,6 +4,7 @@ import { AppraisalRoundModel, MyAppraisalRoundModel } from 'src/app/shared/model
import
{
AppraisalFormModel
}
from
'src/app/shared/model/appraisal-form.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.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
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
...
...
@@ -21,6 +22,7 @@ export class EditEvaluationFormComponent {
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSize
=
10
search
=
""
assessmentList
:
AppraisalModel
[]
=
[]
...
...
@@ -30,13 +32,15 @@ export class EditEvaluationFormComponent {
isChecked
:
boolean
=
false
;
apsassessy
=
""
empassessmentList
:
AppraisalModel
[]
=
[]
empassessmentList
?:
EvaluationModal
searchEmp
=
""
empassessmentRoundList
:
AppraisalRoundModel
[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
currentPageRound
=
1
pageRound
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSizeRound
=
10
searchRound
=
""
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
numDataListChecked
=
0
...
...
@@ -47,10 +51,13 @@ export class EditEvaluationFormComponent {
loading
=
false
indicatorsList
:
AppraisalRoundModel
[]
=
[]
indicatorsList
:
AppraisalRoundModel
[]
=
[]
indicatorsListShow
:
AppraisalRoundModel
[]
=
[]
searchIndicator
=
""
currentPageIndicator
=
1
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSizeIndicator
=
10
competencyTopicIds
:
string
[]
=
[]
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
...
...
@@ -72,8 +79,8 @@ export class EditEvaluationFormComponent {
this
.
getAssessmentId
();
this
.
getAssessmentList
();
}
}
//############################# เเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
getAssessmentId
()
{
this
.
evaluationCycleService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
...
...
@@ -90,6 +97,7 @@ export class EditEvaluationFormComponent {
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
searchChange
()
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
...
...
@@ -110,39 +118,9 @@ export class EditEvaluationFormComponent {
searchChange
()
{
this
.
currentPage
=
1
;
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
()
{
let
body
=
this
.
assessmentList
.
filter
(
x
=>
x
.
active
==
true
)
...
...
@@ -160,46 +138,39 @@ export class EditEvaluationFormComponent {
this
.
showAlert
(
'ไม่พบรายการ'
,
'error'
)
}
}
//############################# ปิดเเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
this
.
selectEmp
=
item
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ openAddRoundModel ~ this.selectEmp:"
,
this
.
selectEmp
)
this
.
openModalClass
(
model
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
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
);
// ############################# Modal 2 #############################
saveIndicators
()
{
if
(
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
).
length
>
0
)
{
if
(
this
.
empassessmentList
)
{
this
.
empassessmentList
.
masfromTopic
=
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
)
as
any
;
}
})
}
filterIndicators
()
{
return
this
.
indicatorsList
.
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
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
evaluationAssessmentService
.
postList
([
this
.
empassessmentList
]).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getApsassessy
();
this
.
getApsassessyMini
();
this
.
cdr
.
detectChanges
();
}
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
else
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
);
}
}
getApsassessy
()
{
this
.
loading
=
true
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
empassessmentList
=
response
this
.
cdr
.
detectChanges
();
this
.
loading
=
false
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
this
.
loading
=
false
...
...
@@ -212,6 +183,8 @@ export class EditEvaluationFormComponent {
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
checkTopic
();
this
.
searchEmpassessmentListFilterChange
()
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
...
...
@@ -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
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
))
}
searchEmpassessmentListFilterChange
()
{
this
.
currentPageRound
=
1
;
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
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
...
...
@@ -239,32 +219,83 @@ export class EditEvaluationFormComponent {
checkempassessmentRoundListCheckbox
()
{
this
.
numDataListChecked
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
length
this
.
isChecked
=
this
.
numDataListChecked
?
true
:
false
}
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
()
{
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
)
if
(
this
.
typeForm
==
'deleteFormOne'
)
{
body
=
[
this
.
selectData
]
deleteAssessmentList
()
{
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
);
if
(
body
.
length
===
0
)
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
);
return
;
}
if
(
body
.
length
==
0
)
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
)
return
}
this
.
evaluationAssessmentService
.
deletemMini
(
body
,
this
.
selectEmp
.
apsassessy
.
employeeId
,
this
.
selectEmp
.
masfromEvaluationRound
.
evaluationRoundId
).
subscribe
({
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
!
x
.
checkbox
);
this
.
checkTopic
();
this
.
indicatorChange
();
this
.
searchEmpassessmentListFilterChange
();
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
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getApsassessyMini
();
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
}
this
.
indicatorsList
=
response
this
.
indicatorChange
()
this
.
searchIndicatorsChange
()
this
.
cdr
.
detectChanges
();
},
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'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
...
...
@@ -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
();
}
...
...
src/app/shared/model/evaluation-form.modal.ts
0 → 100644
View file @
f7aee2de
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
src/app/shared/services/evaluation-assessment.service.ts
View file @
f7aee2de
...
...
@@ -6,6 +6,7 @@ import { AlertModel } from '../model/alert.model';
import
{
EvaluationCycleModel
}
from
'../model/evaluation-cycle.model'
;
import
{
AppraisalModel
}
from
'../model/appraisal.model'
;
import
{
AppraisalRoundModel
}
from
'../model/appraisal-aps.model'
;
import
{
EvaluationModal
}
from
'../model/evaluation-form.modal'
;
@
Injectable
({
providedIn
:
'root'
...
...
@@ -21,8 +22,8 @@ export class EvaluationAssessmentService {
getById
(
evaluationRoundId
:
string
):
Observable
<
any
[]
>
{
return
this
.
http
.
get
<
any
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
}
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalModel
[]
>
{
return
this
.
http
.
get
<
AppraisalModel
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
EvaluationModal
>
{
return
this
.
http
.
get
<
EvaluationModal
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
...
...
@@ -30,10 +31,10 @@ export class EvaluationAssessmentService {
getIndicators
(
plId
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/indicators/list/"
+
plId
)
}
post
(
body
:
EvaluationCycle
Model
):
Observable
<
AlertModel
>
{
post
(
body
:
Appraisal
Model
):
Observable
<
AlertModel
>
{
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
)
}
delete
(
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]):
Observable
<
AlertModel
>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment