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
bb71bec4
Commit
bb71bec4
authored
Mar 20, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ประเมินตนเอง
parent
d497e4ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
evaluation.component.html
...rformance-evaluation/evaluation/evaluation.component.html
+2
-1
evaluation.component.ts
...performance-evaluation/evaluation/evaluation.component.ts
+9
-9
No files found.
src/app/components/performance-evaluation/evaluation/evaluation.component.html
View file @
bb71bec4
...
...
@@ -209,7 +209,8 @@
<div
class=
"col-span-8"
>
คะแนนรวมหลังถ่วงน้ำ
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-5 text-center"
>
{{appraisalCompentency.data.masfromEvaluationAssessment1lList[0].weightedTotal}}
</div>
{{showNumber(appraisalCompentency.data.masfromEvaluationAssessment1lList[0].weightedTotal)}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
...
...
src/app/components/performance-evaluation/evaluation/evaluation.component.ts
View file @
bb71bec4
...
...
@@ -44,6 +44,7 @@ export class EvaluationComponent implements OnInit {
ngOnInit
():
void
{
this
.
getAppraisalCompentencyForm
()
this
.
getSettingList
()
this
.
getEvaluatee
()
}
getEvaluatee
()
{
...
...
@@ -156,19 +157,19 @@ export class EvaluationComponent implements OnInit {
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
switch
(
numberCheck
)
{
case
(
1
):
{
return
+
((
+
(
this
.
setting
.
data
.
settingScore1
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck1
).
toFixed
(
2
)
)
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore1
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck1
)
}
case
(
2
):
{
return
+
((
+
(
this
.
setting
.
data
.
settingScore2
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck2
).
toFixed
(
2
)
)
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore2
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck2
)
}
case
(
3
):
{
return
+
((
+
(
this
.
setting
.
data
.
settingScore3
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck3
).
toFixed
(
2
)
)
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore3
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck3
)
}
case
(
4
):
{
return
+
((
+
(
this
.
setting
.
data
.
settingScore4
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck4
).
toFixed
(
2
)
)
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore4
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck4
)
}
case
(
5
):
{
return
+
((
+
(
this
.
setting
.
data
.
settingScore5
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck5
).
toFixed
(
2
)
)
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore5
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck5
)
}
default
:
{
return
}
}
...
...
@@ -178,7 +179,7 @@ export class EvaluationComponent implements OnInit {
calWeightTotal
()
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
0
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
(
this
.
calWeightScore
(
1
)
??
0
)
+
(
this
.
calWeightScore
(
2
)
??
0
)
+
(
this
.
calWeightScore
(
3
)
??
0
)
+
(
this
.
calWeightScore
(
4
)
??
0
)
+
(
this
.
calWeightScore
(
5
)
??
0
)
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
+
(((
this
.
calWeightScore
(
1
)
??
0
)
+
(
this
.
calWeightScore
(
2
)
??
0
)
+
(
this
.
calWeightScore
(
3
)
??
0
)
+
(
this
.
calWeightScore
(
4
)
??
0
)
+
(
this
.
calWeightScore
(
5
)
??
0
)).
toFixed
(
2
)
)
this
.
cdr
.
detectChanges
()
this
.
calAverageScore
()
}
...
...
@@ -192,10 +193,9 @@ export class EvaluationComponent implements OnInit {
+
(
this
.
setting
.
data
.
settingScore2
),
+
(
this
.
setting
.
data
.
settingScore1
)])
const
total
=
length
*
max
console
.
log
(
length
)
if
(
total
)
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
0
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
(
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
*
100
)
/
total
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
this
.
showNumber
((
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
*
100
)
/
total
)
this
.
cdr
.
detectChanges
()
}
}
...
...
@@ -253,7 +253,7 @@ export class EvaluationComponent implements OnInit {
}
showNumber
(
text
:
number
|
string
)
{
const
num
=
Number
(
text
);
return
isNaN
(
num
)
?
0
:
+
num
.
toFixed
(
2
);
return
isNaN
(
num
)
?
0
:
+
(
+
num
.
toFixed
(
2
)
);
}
returnPath
()
{
this
.
sendReturnPath
.
emit
()
...
...
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