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
493dc671
Commit
493dc671
authored
Jun 06, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
part4 part5
parent
5c96d334
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
17 deletions
+53
-17
pms-form-employee.component.html
...uation/pms-form-employee/pms-form-employee.component.html
+10
-5
pms-information.component.html
...m-employee/pms-information/pms-information.component.html
+1
-1
pms-kpi.component.html
...aluation/pms-form-employee/pms-kpi/pms-kpi.component.html
+10
-6
pms-kpi.component.ts
...evaluation/pms-form-employee/pms-kpi/pms-kpi.component.ts
+31
-4
navservice.ts
src/app/shared/services/navservice.ts
+1
-1
Report.png
src/assets/img/icons-menu/Report.png
+0
-0
No files found.
src/app/components/performance-evaluation/pms-form-employee/pms-form-employee.component.html
View file @
493dc671
...
...
@@ -422,9 +422,14 @@
<div
class=
"box-header"
>
<div
class=
"flex flex-row gap-2"
>
<ng-container
*
ngFor=
"let item of ['ข้อมูลการประเมิน','แบบประเมินสมรรถนะ','ประเมินผลการปฏิบัติงาน','สรุปคะแนนและข้อเสนอแนะ','แผนพัฒนาบุคลากร']"
>
*
ngFor=
"let item of ['ข้อมูลการประเมิน'+
currentPart,'แบบประเมินสมรรถนะ'+
currentPart,'ประเมินผลการปฏิบัติงาน'+
currentPart,'สรุปคะแนนและข้อเสนอแนะ'+
currentPart,'แผนพัฒนาบุคลากร'+currentPart]"
>
<button
type=
"button"
class=
"flex-1 flex flex-row border bg-white p-2 justify-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
item"
style=
"border-radius:20px"
(
click
)="
currentTap=
item;(currentTap=='ประเมินผลการปฏิบัติงาน'||currentTap=='สรุปคะแนนและข้อเสนอแนะ'?currentPart='':null)"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
=item}"
>
<span
class=
"overflow-hidden text-ellipsis whitespace-nowrap align-center"
>
{{item}}
...
...
@@ -477,11 +482,11 @@
<div
class=
"min-height: calc(100vh - 406px);"
[
class
.
hidden
]="
currentTap
!='ประเมินผลการปฏิบัติงาน'&&
currentTap
!='สรุปคะแนนและข้อเสนอแนะ'"
>
<app-pms-kpi
[
canSave
]="
canSave
"
[
appraisalPms
]="
compentency
.
data
.
pms
"
[
currentTap
]="
currentTap
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
canEdit
]="
canEdit
"
[
currentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
[
currentPart
]="
currentTap
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
c
anEdit
]="
canEdit
"
[
c
urrentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
(
kpiFormRemain
)="
kpiFormRemain=
$event"
(
scorePart
)="
kpiScorePart=
$event"
(
kpiForm
)="
compentency
.
data
.
pms=
$event"
(
scrollToMenuId
)="
scrollToMenu
($
event
)"
[
compentencyFormRemain
]="
compentencyFormRemain
"
></app-pms-kpi>
[
inforWeight
]="
inforWeight
"
[
compentencyFormRemain
]="
compentencyFormRemain
"
></app-pms-kpi>
</div>
<div
class=
"min-height: calc(100vh - 406px);"
[
class
.
hidden
]="
currentTap
!='แผนพัฒนาบุคลากร'"
>
<app-pms-idp
[
currentTap
]="
currentTap
"
[
canSave
]="
canSave
"
[
appraisalIdp
]="
compentency
.
data
.
idp
"
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-information/pms-information.component.html
View file @
493dc671
...
...
@@ -31,7 +31,7 @@
{{formatThaiDate(item.masfromEvaluationRound.apsPeriodEnd)}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{inforWeight.get(item.comType) !=='null'?inforWeight.get(item.comType): ''}}
{{inforWeight.get(item.comType) !=='null'?inforWeight.get(item.comType): '
0
'}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{inforGap.get(item.comType)!=='null'?inforGap.get(item.comType): ''}}
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-kpi/pms-kpi.component.html
View file @
493dc671
...
...
@@ -632,10 +632,11 @@
<ng-container
*
ngFor=
"let item2 of [5,4,3,2,1];let f = first"
>
<button
type=
"button"
class=
"h-12 w-12 p-0 shadow border text-soft-secondary-no-hover bg-white pointer-events-none"
style=
"border-radius:5px"
[
ngClass
]="{
'!
border-secondary
'
:
calAverage
(
item
.
averageScore
)
>
=item2 ,
'!text-secondary': calAverage(item.averageScore)>item2,
'!text-white !bg-secondary':calAverage(item.averageScore)==item2}">
style=
"border-radius:5px"
[
ngClass
]="{
'!
border-secondary
'
:
calAverage
(
convertToNumber
(
inforWeight
.
get
(
item
.
competencyType
.
shortName
)
!=='
null
'?
inforWeight
.
get
(
item
.
competencyType
.
shortName
)
:
'
0
'))
>
=item2 ,
'!text-secondary': calAverage(convertToNumber(inforWeight.get(item.competencyType.shortName) !=='null'?inforWeight.get(item.competencyType.shortName): '0'))>item2,
'!text-white !bg-secondary':calAverage(convertToNumber(inforWeight.get(item.competencyType.shortName) !=='null'?inforWeight.get(item.competencyType.shortName): '0'))==item2}">
{{item2}}
</button>
</ng-container>
...
...
@@ -643,13 +644,16 @@
<div
style=
"height: 20px;"
>
<span
class=
"text-indigo-600"
>
<ng-container>
{{item.averageScore}}
{{convertToNumber(inforWeight.get(item.competencyType.shortName)
!=='null'?inforWeight.get(item.competencyType.shortName): '0')}}
</ng-container>
</span>
</div>
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{numberFixed2(item.competencyType.weight * calAverage(item.averageScore))}}
{{numberFixed2(item.competencyType.weight *
calAverage(convertToNumber(inforWeight.get(item.competencyType.shortName)
!=='null'?inforWeight.get(item.competencyType.shortName): '0')))}}
</td>
</tr>
</ng-container>
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-kpi/pms-kpi.component.ts
View file @
493dc671
...
...
@@ -28,6 +28,7 @@ export interface LevelStarModel {
})
export
class
PmsKpiComponent
{
@
Input
()
canSave
=
false
@
Input
()
inforWeight
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
data8List
:
Part8Model
[]
=
[{
id
:
1
,
evaluationFactor
:
"Part 1 : ประเมินผลการปฏิบัติงานตามนโยบายบริษัท (Corporate KPI)"
,
...
...
@@ -139,6 +140,9 @@ export class PmsKpiComponent {
this
.
allFormRemain
()
this
.
sendScorePart
()
}
if
(
changes
[
'currentPart'
]?.
currentValue
)
{
this
.
currentPart
=
''
}
}
getAppraisalPmsForm
()
{
this
.
data8List
.
forEach
((
x
,
i
)
=>
{
...
...
@@ -332,8 +336,10 @@ export class PmsKpiComponent {
return
3
;
}
else
if
(
roundedScore
>=
40
&&
roundedScore
<=
59
)
{
return
2
;
}
else
{
}
else
if
(
roundedScore
>=
1
&&
roundedScore
<=
39
)
{
return
1
;
}
else
{
return
0
;
}
}
...
...
@@ -352,13 +358,15 @@ export class PmsKpiComponent {
}
calExpectationScorePart4
(
data
?:
any
)
{
if
(
data
)
{
return
data
.
reduce
((
sum
:
number
,
item
:
any
)
=>
sum
+
this
.
calAverage
(
item
.
averageScore
),
0
).
toFixed
(
2
);
return
data
.
reduce
((
sum
:
number
,
item
:
any
)
=>
sum
+
this
.
calAverage
(
this
.
convertToNumber
(
this
.
inforWeight
.
get
(
item
.
competencyType
.
shortName
)
!==
'null'
?
this
.
inforWeight
.
get
(
item
.
competencyType
.
shortName
)
:
'0'
)),
0
).
toFixed
(
2
);
}
return
"0.00"
}
calExpectationTotalScorePart4
(
data
?:
any
)
{
if
(
data
)
{
return
data
.
reduce
((
sum
:
number
,
item
:
any
)
=>
sum
+
(
item
.
competencyType
.
weight
*
this
.
calAverage
(
item
.
averageScore
)),
0
).
toFixed
(
2
);
return
data
.
reduce
((
sum
:
number
,
item
:
any
)
=>
sum
+
(
item
.
competencyType
.
weight
*
this
.
calAverage
(
this
.
convertToNumber
(
this
.
inforWeight
.
get
(
item
.
competencyType
.
shortName
)
!==
'null'
?
this
.
inforWeight
.
get
(
item
.
competencyType
.
shortName
)
:
'0'
))),
0
).
toFixed
(
2
);
}
return
"0.00"
}
...
...
@@ -490,7 +498,7 @@ export class PmsKpiComponent {
part5Remain
()
{
if
(
this
.
appraisalPms
?.
part5Detail
.
length
)
{
const
remain
=
this
.
appraisalPms
.
part5Detail
.
filter
(
x
=>
x
.
pmsWorkingTimScore
==
null
&&
x
.
pmsWorkingTimScoreBoss
==
null
x
.
pmsWorkingTimScore
==
0
&&
x
.
pmsWorkingTimScoreBoss
==
0
).
length
return
remain
}
...
...
@@ -545,4 +553,23 @@ export class PmsKpiComponent {
scrollToMenu
(
id
:
string
)
{
this
.
scrollToMenuId
.
emit
(
id
);
}
convertToNumber
(
value
:
any
):
number
{
if
(
value
===
null
||
value
===
undefined
)
{
return
0
;
}
// ถ้า value เป็น string ที่เป็นตัวเลขล้วน เช่น "123", "45.6"
if
(
typeof
value
===
'string'
&&
!
isNaN
(
Number
(
value
.
trim
())))
{
return
Number
(
value
);
}
// ถ้าเป็น number อยู่แล้ว
if
(
typeof
value
===
'number'
)
{
return
value
;
}
// ถ้าอย่างอื่นที่ไม่ใช่ตัวเลข
return
0
;
}
}
src/app/shared/services/navservice.ts
View file @
493dc671
...
...
@@ -234,7 +234,7 @@ export class NavService implements OnDestroy {
path
:
''
,
id
:
'm6'
,
show
:
true
,
icon
:
'assets/img/icons-menu/
com-self
.png'
,
icon
:
'assets/img/icons-menu/
Report
.png'
,
children
:
[
{
id
:
'm61'
,
path
:
'admin/report-com-1'
,
title
:
'รายงาน Competency 1'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm62'
,
path
:
'admin/report-com-2'
,
title
:
'รายงาน Competency 2'
,
type
:
'link'
,
show
:
true
},
...
...
src/assets/img/icons-menu/Report.png
0 → 100644
View file @
493dc671
9.48 KB
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