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
92361e77
Commit
92361e77
authored
Mar 04, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
รอบการประเมิน competency pms
parent
a651bbec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
10 deletions
+118
-10
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+0
-0
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+61
-8
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+0
-0
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+57
-2
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
92361e77
This diff is collapsed.
Click to expand it.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
92361e77
...
@@ -4,6 +4,8 @@ import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/mod
...
@@ -4,6 +4,8 @@ import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/mod
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
MyPLModel
,
PLModel
}
from
'src/app/shared/model/pl.model'
;
export
interface
DataModel
{
export
interface
DataModel
{
evaluationRoundId
:
string
;
evaluationRoundId
:
string
;
...
@@ -14,7 +16,11 @@ export interface DataModel {
...
@@ -14,7 +16,11 @@ export interface DataModel {
apsPeriodEnd
:
string
;
apsPeriodEnd
:
string
;
statusCode
:
StatusCodeModel
;
statusCode
:
StatusCodeModel
;
}
}
export
interface
DataModal
{
search
:
string
,
currentPage
:
number
,
page
:
number
[]
}
@
Component
({
@
Component
({
selector
:
'app-evaluation-cycle'
,
selector
:
'app-evaluation-cycle'
,
templateUrl
:
'./evaluation-cycle.component.html'
,
templateUrl
:
'./evaluation-cycle.component.html'
,
...
@@ -40,26 +46,69 @@ export class EvaluationCycleComponent {
...
@@ -40,26 +46,69 @@ export class EvaluationCycleComponent {
evaluationRoundId
=
''
evaluationRoundId
=
''
private
unlisten
!
:
()
=>
void
;
private
unlisten
!
:
()
=>
void
;
modal
:
DataModal
=
{
search
:
""
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
}
pl
:
{
loading
:
boolean
,
selectList
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()],
selectIndex
:
-
1
,
dataList
:
[]
}
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
renderer
:
Renderer2
private
renderer
:
Renderer2
,
private
pLService
:
PLService
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getEvaluationCycleList
()
this
.
getEvaluationCycleList
()
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
this
.
evaluationRoundId
=
''
}
}
});
});
this
.
getPlList
()
}
}
ngOnDestroy
()
{
ngOnDestroy
()
{
if
(
this
.
unlisten
)
{
if
(
this
.
unlisten
)
{
this
.
unlisten
();
// เรียกใช้งานจริง ๆ เพื่อลบ event listener
this
.
unlisten
();
// เรียกใช้งานจริง ๆ เพื่อลบ event listener
}
}
}
}
getPlList
()
{
this
.
pl
.
loading
=
false
this
.
pLService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
pl
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyPLModel
(
x
))
this
.
pl
.
loading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
pl
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
plListFilter
()
{
return
this
.
pl
.
dataList
.
filter
(
x
=>
(
x
.
plId
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
&&
!
this
.
pl
.
selectList
.
some
(
y
=>
y
.
plId
==
x
.
plId
)
);
}
selectPl
(
data
?:
PLModel
)
{
if
(
!
data
)
{
this
.
pl
.
selectList
.
splice
(
this
.
pl
.
selectIndex
,
1
);
return
;
}
this
.
pl
.
selectList
[
this
.
pl
.
selectIndex
]
=
new
MyPLModel
(
data
);
if
(
this
.
pl
.
selectIndex
===
this
.
pl
.
selectList
.
length
-
1
)
{
this
.
pl
.
selectList
.
push
(
new
MyPLModel
());
}
}
getEvaluationCycleList
()
{
getEvaluationCycleList
()
{
this
.
dataLoading
=
true
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
getList
().
subscribe
({
this
.
evaluationCycleService
.
getList
().
subscribe
({
...
@@ -185,23 +234,27 @@ export class EvaluationCycleComponent {
...
@@ -185,23 +234,27 @@ export class EvaluationCycleComponent {
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
}))
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
}))
}
}
this
.
pl
.
selectList
=
[
new
MyPLModel
()]
}
}
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
this
.
evaluationRoundId
=
''
this
.
evaluationRoundId
=
''
if
(
id
==
'evaluation-cycle-person-modal'
)
{
if
(
id
==
'evaluation-cycle-person-modal'
)
{
this
.
evaluationRoundId
=
evaluationRoundId
this
.
evaluationRoundId
=
evaluationRoundId
this
.
evaluationRoundIdChange
.
emit
(
evaluationRoundId
)
this
.
evaluationRoundIdChange
.
emit
(
evaluationRoundId
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
);
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
);
},
10
);
},
10
);
}
}
}
}
searchModalChange
(
dataList
:
any
[])
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
}
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
92361e77
This diff is collapsed.
Click to expand it.
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
92361e77
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
PLModel
,
MyPLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
MyPmsMasfromEvaluationModel
,
PmsMasfromEvaluationModel
}
from
'src/app/shared/model/pms-masfrom-evaluation.model'
;
import
{
MyPmsMasfromEvaluationModel
,
PmsMasfromEvaluationModel
}
from
'src/app/shared/model/pms-masfrom-evaluation.model'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
export
interface
DataModal
{
search
:
string
,
currentPage
:
number
,
page
:
number
[]
}
@
Component
({
@
Component
({
selector
:
'app-management-evaluation-cycle'
,
selector
:
'app-management-evaluation-cycle'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
...
@@ -25,13 +31,56 @@ export class ManagementCycleComponent {
...
@@ -25,13 +31,56 @@ export class ManagementCycleComponent {
isDataListCheckedAll
=
false
isDataListCheckedAll
=
false
numDataListChecked
=
0
numDataListChecked
=
0
modal
:
DataModal
=
{
search
:
""
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
}
pl
:
{
loading
:
boolean
,
selectList
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()],
selectIndex
:
-
1
,
dataList
:
[]
}
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
,
private
pLService
:
PLService
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getPmsMasfromEvaluationCycleList
()
this
.
getPmsMasfromEvaluationCycleList
()
this
.
getPlList
()
}
getPlList
()
{
this
.
pl
.
loading
=
false
this
.
pLService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
pl
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyPLModel
(
x
))
this
.
pl
.
loading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
pl
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
plListFilter
()
{
return
this
.
pl
.
dataList
.
filter
(
x
=>
(
x
.
plId
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
&&
!
this
.
pl
.
selectList
.
some
(
y
=>
y
.
plId
==
x
.
plId
)
);
}
selectPl
(
data
?:
PLModel
)
{
if
(
!
data
)
{
this
.
pl
.
selectList
.
splice
(
this
.
pl
.
selectIndex
,
1
);
return
;
}
this
.
pl
.
selectList
[
this
.
pl
.
selectIndex
]
=
new
MyPLModel
(
data
);
if
(
this
.
pl
.
selectIndex
===
this
.
pl
.
selectList
.
length
-
1
)
{
this
.
pl
.
selectList
.
push
(
new
MyPLModel
());
}
}
}
getPmsMasfromEvaluationCycleList
()
{
getPmsMasfromEvaluationCycleList
()
{
...
@@ -142,6 +191,12 @@ export class ManagementCycleComponent {
...
@@ -142,6 +191,12 @@ export class ManagementCycleComponent {
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
dataSelect
.
pmsEvaluationRoundId
}))
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
dataSelect
.
pmsEvaluationRoundId
}))
}
}
this
.
pl
.
selectList
=
[
new
MyPLModel
()]
}
searchModalChange
(
dataList
:
any
[])
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
}
}
...
...
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