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
b0834f40
Commit
b0834f40
authored
May 07, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
แบบประเมิน
parent
57da5b5f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
9 deletions
+25
-9
pms-form-employee.component.ts
...aluation/pms-form-employee/pms-form-employee.component.ts
+21
-6
supervisor-evaluation.component.html
...upervisor-evaluation/supervisor-evaluation.component.html
+2
-2
competency.model.ts
src/app/shared/model/competency.model.ts
+1
-0
appraisal.service.ts
src/app/shared/services/appraisal.service.ts
+1
-1
No files found.
src/app/components/performance-evaluation/pms-form-employee/pms-form-employee.component.ts
View file @
b0834f40
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
HostListener
,
Input
,
Output
}
from
'@angular/core'
;
import
{
Router
}
from
'@angular/router'
;
import
{
th
}
from
'date-fns/locale'
;
import
{
CompetencyModel
}
from
'src/app/shared/model/competency.model'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
import
{
EmployeeService
}
from
'src/app/shared/services/employee.service'
;
import
{
TokenService
}
from
'src/app/shared/services/token.service'
;
import
Swal
from
'sweetalert2'
;
@
Component
({
...
...
@@ -187,7 +187,7 @@ export class PmsFormEmployeeComponent {
hasPushedState
=
false
;
companyId
=
""
handleBack
=
(
event
:
PopStateEvent
)
=>
{
this
.
returnPath
()
this
.
router
.
navigate
([
'/supervisor-evaluation'
]);
...
...
@@ -197,15 +197,18 @@ export class PmsFormEmployeeComponent {
private
router
:
Router
,
private
employeeService
:
EmployeeService
,
private
appraisalService
:
AppraisalService
,
private
cdr
:
ChangeDetectorRef
)
{
}
private
cdr
:
ChangeDetectorRef
,
private
tokenService
:
TokenService
)
{
}
ngOnDestroy
()
{
window
.
removeEventListener
(
'popstate'
,
this
.
handleBack
);
}
ngOnInit
()
{
this
.
companyId
=
this
.
tokenService
.
getUser
()?.
companyid
||
""
this
.
dateIso
=
this
.
currentDate
.
toISOString
();
this
.
getEvaluatee
()
this
.
getCompentencyAll
()
...
...
@@ -239,6 +242,7 @@ export class PmsFormEmployeeComponent {
selectDataList
(
data
:
CompetencyModel
)
{
this
.
compentency
.
data
=
data
this
.
compentency
.
data
.
commentAll
.
sort
((
a
,
b
)
=>
new
Date
(
b
.
commentDate
).
getTime
()
-
new
Date
(
a
.
commentDate
).
getTime
());
this
.
canSave
=
this
.
compentency
.
data
.
statusType
==
"pending"
||
this
.
compentency
.
data
.
statusType
==
"evaluating"
this
.
canDraft
=
+
this
.
compentency
.
data
.
currentStep
<=
1
&&
(
this
.
compentency
.
data
.
statusType
==
"pending"
||
this
.
compentency
.
data
.
statusType
==
"evaluating"
)
this
.
canEdit
=
+
this
.
compentency
.
data
.
currentStep
<=
1
&&
(
this
.
compentency
.
data
.
statusType
==
"pending"
||
this
.
compentency
.
data
.
statusType
==
"evaluating"
)
...
...
@@ -383,12 +387,13 @@ export class PmsFormEmployeeComponent {
type
StepKey
=
'apsassessy'
|
'apsapprove1'
|
'apsapprove2'
|
'apsapprove3'
|
'apsapprove4'
|
'apsapprove5'
;
const
steps
:
StepKey
[]
=
[
'apsassessy'
,
'apsapprove1'
,
'apsapprove2'
,
'apsapprove3'
,
'apsapprove4'
,
'apsapprove5'
];
const
stepIndex
=
parseInt
(
this
.
compentency
.
data
.
currentStep
,
10
);
const
updatedData
=
{
...
this
.
compentency
.
data
}
;
const
updatedData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
compentency
.
data
))
;
if
(
approveStatus
===
'3'
&&
stepIndex
>=
2
)
{
const
prevKey
:
StepKey
=
steps
[
stepIndex
-
1
];
updatedData
[
prevKey
]
=
{
...
updatedData
[
prevKey
],
status
:
'0'
,
stepReturn
:
stepIndex
};
}
const
currentKey
:
StepKey
=
steps
[
stepIndex
];
...
...
@@ -403,11 +408,21 @@ export class PmsFormEmployeeComponent {
statusType
=
"evaluating"
}
else
if
(
approveStatus
===
"2"
)
{
statusType
=
"completed"
for
(
let
i
=
stepIndex
+
1
;
i
<
steps
.
length
;
i
++
)
{
const
nextKey
:
StepKey
=
steps
[
i
];
if
(
updatedData
[
nextKey
]?.
status
===
'3'
)
{
updatedData
[
nextKey
]
=
{
...
updatedData
[
nextKey
],
status
:
'0'
,
};
}
}
}
else
if
(
approveStatus
===
"3"
)
{
statusType
=
"rejected"
}
updatedData
.
commentAll
.
push
({
commentDate
:
this
.
dateIso
,
companyId
:
this
.
companyId
,
currentStep
:
this
.
compentency
.
data
.
currentStep
,
statusType
:
statusType
,
comment
:
this
.
comment
,
...
...
src/app/components/performance-evaluation/supervisor-evaluation/supervisor-evaluation.component.html
View file @
b0834f40
...
...
@@ -108,7 +108,7 @@
<div
class=
"flex justify-center"
>
<button
type=
"button"
class=
"ti-btn rounded-sm "
*
ngFor=
"let type of item.typeList"
[
class
]="
statusButtonClass
(
item
.
statusPms
.
statusType
)"
[
class
]="
statusButtonClass
(
type
.
statusType
)"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(
click
)="
selectSubordinate
(
item
,
type
.
competencyTypeId
,
subordinate
.
select
?.
evaluationRoundId
);
pageEvalution=
type.shortName"
>
{{type.shortName}}
...
...
@@ -118,7 +118,7 @@
<td
class=
"text-center"
>
<div
class=
"flex justify-center"
>
<button
type=
"button"
class=
"ti-btn rounded-sm"
[
class
]="
statusButtonClass
(
item
.
status
Pms
.
statusType
)"
[
class
]="
statusButtonClass
(
item
.
status
Idp
.
statusType
)"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(
click
)="
selectSubordinate
(
item
,'',
subordinate
.
select
?.
evaluationRoundId
,
item
.
statusIdp
.
statusType
);
pageEvalution=
'idp'
"
>
IDP
...
...
src/app/shared/model/competency.model.ts
View file @
b0834f40
...
...
@@ -25,6 +25,7 @@ export interface ApsEmp {
}
export
interface
CommentAll
{
commentDate
:
string
companyId
:
string
currentStep
:
string
statusType
:
string
comment
:
string
...
...
src/app/shared/services/appraisal.service.ts
View file @
b0834f40
...
...
@@ -20,7 +20,7 @@ export class AppraisalService {
return
this
.
http
.
get
<
CompetencyModel
[]
>
(
this
.
urlApi
+
"/competencyAll/emp?apsassessy="
+
apsassessy
+
(
bossId
?
"&bossId="
+
bossId
:
''
))
}
postCompentencyAll
(
body
:
CompetencyModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/
appraisal
competencyAll/emp"
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/competencyAll/emp"
,
body
)
}
getFormCompentencyById
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
typeId
:
string
):
Observable
<
AppraisalCompentencyModel2
>
{
return
this
.
http
.
get
<
AppraisalCompentencyModel2
>
(
this
.
urlApi
+
"/competency/"
+
evaluationRoundId
+
"/"
+
apsassessy
+
"/"
+
typeId
)
...
...
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