Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
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
myAppraisal
Commits
f89fa9a1
Commit
f89fa9a1
authored
Feb 24, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
จัดกลุ่มสมรรถนะ
parent
07a28b2d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
54 deletions
+61
-54
edit-group-competencies.component.html
...group-competencies/edit-group-competencies.component.html
+16
-14
edit-group-competencies.component.ts
...t-group-competencies/edit-group-competencies.component.ts
+3
-2
self-evaluation.component.html
...evaluation/self-evaluation/self-evaluation.component.html
+8
-7
self-evaluation.component.ts
...e-evaluation/self-evaluation/self-evaluation.component.ts
+16
-16
appraisal-form.model.ts
src/app/shared/model/appraisal-form.model.ts
+18
-15
No files found.
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.html
View file @
f89fa9a1
...
...
@@ -305,7 +305,7 @@
</tbody>
<tbody
*
ngIf=
"!dataLoading&&dataListModalFilter().length"
>
<tr
*
ngFor=
"let item of dataListModalFilter()| slice:((currentPage
-1) * 10) : (((currentPage
-1) * 10) + 10);let i = index"
>
*
ngFor=
"let item of dataListModalFilter()| slice:((currentPage
Modal-1) * 10) : (((currentPageModal
-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
{{item.data.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</td>
...
...
@@ -330,27 +330,29 @@
</table>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page
Modal
.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage
=
(currentPage
-1
||
1
)"
>
(
click
)="
currentPage
Modal =
(currentPageModal
-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"
>
<li
*
ngFor=
"let item of pageModal;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPageModal!=1&¤tPageModal!=2&¤tPageModal!=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}}
<ng-container
*
ngIf=
"(f||l)||(item==currentPageModal-1||item==currentPageModal||item==currentPageModal+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageModal"
(
click
)="
currentPageModal=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page
.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page
.length-2"
>
*
ngIf=
"item==page
Modal.length-2&¤tPageModal!=pageModal.length&¤tPageModal!=pageModal.length-1&¤tPageModal!=pageModal
.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
...
...
@@ -358,16 +360,16 @@
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage
=
(currentPage
>
page.length-1 ? currentPage: currentPage
+1 )">
(
click
)="
currentPage
Modal =
(currentPageModal
>
pageModal.length-1 ? currentPageModal: currentPageModal
+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{dataListModalFilter().length
<10
?
dataListModalFilter
().
length:
(
currentPage
=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListModalFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListModalFilter
().
length
}}
items
</
span
>
<span>
Show {{((currentPage
Modal
-1) * 10)+1}} to {{dataListModalFilter().length
<10
?
dataListModalFilter
().
length:
(
currentPage
Modal=
=pageModal.length
?
((
currentPageModal
*
10
)
-
((
currentPageModal
*
10
)
-
dataListModalFilter
().
length
)
)
:
(
currentPageModal
*
10
)
)
}}
of
{{
dataListModalFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
...
...
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.ts
View file @
f89fa9a1
...
...
@@ -26,6 +26,7 @@ export class EditGroupCompetenciesComponent {
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
searchModal
=
""
currentPageModal
=
1
pageModal
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
dataLoading
=
false
dataModalLoading
=
false
...
...
@@ -122,9 +123,9 @@ export class EditGroupCompetenciesComponent {
}
searchModalChange
()
{
this
.
currentPage
=
1
;
this
.
currentPage
Modal
=
1
;
const
filteredData
=
this
.
dataListModalFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
page
Modal
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
dataListModalFilter
()
{
...
...
src/app/components/performance-evaluation/self-evaluation/self-evaluation.component.html
View file @
f89fa9a1
...
...
@@ -344,7 +344,7 @@
<input
type=
"radio"
[
name
]="'
radio
'+
i
+''+
i2
"
class=
"ti-form-radio cursor-pointer"
[
id
]="'
radio
'+
i
+''+
i2
+''+
i3
"
[
value
]="
value
"
[(
ngModel
)]="
bi
.
competencyBehavioral
.
scoreTopicExpectation
"
(
ngModelChange
)="
cal
targetScore
()"
>
(
ngModelChange
)="
cal
numberCheck
()"
>
</td>
</tr>
</ng-container>
...
...
@@ -363,11 +363,11 @@
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
รวมจำนวนเครื่องหมายแต่ละช่อง (1)
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
targetScore
5}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
targetScore
4}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
targetScore
3}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
targetScore
2}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
targetScore
1}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
numberCheck
5}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
numberCheck
4}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
numberCheck
3}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
numberCheck
2}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentencyForm.data.
numberCheck
1}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
...
...
@@ -472,7 +472,8 @@
<label
for=
"hs-basic-usage1"
class=
"sr-only"
>
ยืนยันผล
</label>
</div>
<div
class=
"col-span-2"
>
<textarea
type=
"text"
rows=
"2"
class=
"ti-form-input mb-2"
placeholder=
"ใส่ Comment ที่นี่"
></textarea>
<textarea
type=
"text"
rows=
"2"
class=
"ti-form-input mb-2"
placeholder=
"ใส่ Comment ที่นี่"
[(
ngModel
)]="
appraisalCompentencyForm
.
data
.
apsassessyComment
"
></textarea>
<span
class=
"pt-2"
>
วันที่ : {{convertDate(currentDate)}}
</span>
...
...
src/app/components/performance-evaluation/self-evaluation/self-evaluation.component.ts
View file @
f89fa9a1
...
...
@@ -107,7 +107,7 @@ export class SelfEvaluationComponent implements OnInit {
this
.
appraisalService
.
getFormCompentencyById
(
this
.
appraisalCompentency
.
select
.
masfromEvaluationRoundModel
.
evaluationRoundId
,
this
.
employee
.
data
.
employeeId
).
subscribe
({
next
:
response
=>
{
this
.
appraisalCompentencyForm
.
data
=
new
MyAppraisalFormModel
(
response
)
this
.
cal
targetScore
()
this
.
cal
numberCheck
()
this
.
appraisalCompentencyForm
.
loading
=
false
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
...
...
@@ -290,32 +290,32 @@ export class SelfEvaluationComponent implements OnInit {
return
date
.
toLocaleDateString
(
'th-TH'
,
{
day
:
'numeric'
,
month
:
'long'
,
year
:
'numeric'
});
}
cal
targetScore
()
{
this
.
appraisalCompentencyForm
.
data
.
targetScore
1
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
1
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
targetScore
2
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
2
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
targetScore
3
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
3
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
targetScore
4
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
4
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
targetScore
5
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
5
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
cal
numberCheck
()
{
this
.
appraisalCompentencyForm
.
data
.
numberCheck
1
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
1
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
numberCheck
2
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
2
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
numberCheck
3
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
3
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
numberCheck
4
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
4
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
appraisalCompentencyForm
.
data
.
numberCheck
5
=
this
.
appraisalCompentencyForm
.
data
.
masfromEvaluationAssessment1lList
.
map
(
x
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
filter
(
y
=>
y
.
competencyBehavioral
.
scoreTopicExpectation
==
5
).
length
).
reduce
((
acc
,
num
)
=>
acc
+
num
,
0
)
this
.
calWeightTotal
()
this
.
cdr
.
detectChanges
()
}
calWeightScore
(
targetScore
:
number
)
{
switch
(
targetScore
)
{
calWeightScore
(
numberCheck
:
number
)
{
switch
(
numberCheck
)
{
case
(
1
):
{
return
+
(
this
.
setting
.
data
.
settingScore1
)
*
this
.
appraisalCompentencyForm
.
data
.
targetScore
1
return
+
(
this
.
setting
.
data
.
settingScore1
)
*
this
.
appraisalCompentencyForm
.
data
.
numberCheck
1
}
case
(
2
):
{
return
+
(
this
.
setting
.
data
.
settingScore2
)
*
this
.
appraisalCompentencyForm
.
data
.
targetScore
2
return
+
(
this
.
setting
.
data
.
settingScore2
)
*
this
.
appraisalCompentencyForm
.
data
.
numberCheck
2
}
case
(
3
):
{
return
+
(
this
.
setting
.
data
.
settingScore3
)
*
this
.
appraisalCompentencyForm
.
data
.
targetScore
3
return
+
(
this
.
setting
.
data
.
settingScore3
)
*
this
.
appraisalCompentencyForm
.
data
.
numberCheck
3
}
case
(
4
):
{
return
+
(
this
.
setting
.
data
.
settingScore4
)
*
this
.
appraisalCompentencyForm
.
data
.
targetScore
4
return
+
(
this
.
setting
.
data
.
settingScore4
)
*
this
.
appraisalCompentencyForm
.
data
.
numberCheck
4
}
case
(
5
):
{
return
+
(
this
.
setting
.
data
.
settingScore5
)
*
this
.
appraisalCompentencyForm
.
data
.
targetScore
5
return
+
(
this
.
setting
.
data
.
settingScore5
)
*
this
.
appraisalCompentencyForm
.
data
.
numberCheck
5
}
default
:
{
return
}
}
...
...
@@ -343,12 +343,12 @@ export class SelfEvaluationComponent implements OnInit {
calGap
(
score
:
number
|
string
)
{
const
roundedScore
=
this
.
showNumber
(
score
)
%
1
<=
0.5
?
Math
.
floor
(
this
.
showNumber
(
score
))
:
Math
.
round
(
this
.
showNumber
(
score
));
if
(
roundedScore
>=
90
&&
roundedScore
<=
100
)
{
if
(
this
.
appraisalCompentencyForm
.
data
.
targetScore1
||
this
.
appraisalCompentencyForm
.
data
.
targetScore2
||
this
.
appraisalCompentencyForm
.
data
.
targetScore
3
)
{
if
(
this
.
appraisalCompentencyForm
.
data
.
numberCheck1
||
this
.
appraisalCompentencyForm
.
data
.
numberCheck2
||
this
.
appraisalCompentencyForm
.
data
.
numberCheck
3
)
{
return
"-1"
;
}
return
"+1"
;
}
else
if
(
roundedScore
>=
80
&&
roundedScore
<=
89
)
{
if
(
this
.
appraisalCompentencyForm
.
data
.
targetScore1
||
this
.
appraisalCompentencyForm
.
data
.
targetScore2
||
this
.
appraisalCompentencyForm
.
data
.
targetScore
3
)
{
if
(
this
.
appraisalCompentencyForm
.
data
.
numberCheck1
||
this
.
appraisalCompentencyForm
.
data
.
numberCheck2
||
this
.
appraisalCompentencyForm
.
data
.
numberCheck
3
)
{
return
"-1"
;
}
return
"0"
;
...
...
src/app/shared/model/appraisal-form.model.ts
View file @
f89fa9a1
...
...
@@ -9,6 +9,7 @@ export interface AppraisalFormModel {
companyId
:
string
fromDetail
:
string
apsassessy
:
EmployeeModel
apsassessyComment
:
string
apsapprove1
:
EmployeeModel
apsapprove2
:
EmployeeModel
apsapprove3
:
EmployeeModel
...
...
@@ -20,11 +21,11 @@ export interface AppraisalFormModel {
apsapprove3Status
:
string
apsapprove4Status
:
string
apsapprove5Status
:
string
targetScore
1
:
number
targetScore
2
:
number
targetScore
3
:
number
targetScore
4
:
number
targetScore
5
:
number
numberCheck
1
:
number
numberCheck
2
:
number
numberCheck
3
:
number
numberCheck
4
:
number
numberCheck
5
:
number
weightedTotal
:
number
averageScore
:
number
apsapprove1Comment
:
string
...
...
@@ -42,6 +43,7 @@ export class MyAppraisalFormModel implements AppraisalFormModel {
companyId
:
string
fromDetail
:
string
apsassessy
:
EmployeeModel
apsassessyComment
:
string
apsapprove1
:
EmployeeModel
apsapprove2
:
EmployeeModel
apsapprove3
:
EmployeeModel
...
...
@@ -53,11 +55,11 @@ export class MyAppraisalFormModel implements AppraisalFormModel {
apsapprove3Status
:
string
apsapprove4Status
:
string
apsapprove5Status
:
string
targetScore
1
:
number
targetScore
2
:
number
targetScore
3
:
number
targetScore
4
:
number
targetScore
5
:
number
numberCheck
1
:
number
numberCheck
2
:
number
numberCheck
3
:
number
numberCheck
4
:
number
numberCheck
5
:
number
weightedTotal
:
number
averageScore
:
number
apsapprove1Comment
:
string
...
...
@@ -73,6 +75,7 @@ export class MyAppraisalFormModel implements AppraisalFormModel {
this
.
masfromEvaluationRoundModel
=
new
MyEvaluationCycleModel
(
data
?.
masfromEvaluationRoundModel
)
this
.
companyId
=
data
?.
companyId
||
""
this
.
fromDetail
=
data
?.
fromDetail
||
""
this
.
apsassessyComment
=
data
?.
apsassessyComment
||
""
this
.
apsassessy
=
new
MyEmployeeModel
(
data
?.
apsassessy
)
this
.
apsapprove1
=
new
MyEmployeeModel
(
data
?.
apsapprove1
)
this
.
apsapprove2
=
new
MyEmployeeModel
(
data
?.
apsapprove2
)
...
...
@@ -85,11 +88,11 @@ export class MyAppraisalFormModel implements AppraisalFormModel {
this
.
apsapprove3Status
=
data
?.
apsapprove3Status
||
""
this
.
apsapprove4Status
=
data
?.
apsapprove4Status
||
""
this
.
apsapprove5Status
=
data
?.
apsapprove5Status
||
""
this
.
targetScore1
=
data
?.
targetScore
1
??
0
this
.
targetScore2
=
data
?.
targetScore
2
??
0
this
.
targetScore3
=
data
?.
targetScore
3
??
0
this
.
targetScore4
=
data
?.
targetScore
4
??
0
this
.
targetScore5
=
data
?.
targetScore
5
??
0
this
.
numberCheck1
=
data
?.
numberCheck
1
??
0
this
.
numberCheck2
=
data
?.
numberCheck
2
??
0
this
.
numberCheck3
=
data
?.
numberCheck
3
??
0
this
.
numberCheck4
=
data
?.
numberCheck
4
??
0
this
.
numberCheck5
=
data
?.
numberCheck
5
??
0
this
.
weightedTotal
=
data
?.
weightedTotal
??
0
this
.
averageScore
=
data
?.
averageScore
??
0
this
.
apsapprove1Comment
=
data
?.
apsapprove1Comment
||
""
...
...
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