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
d552254c
Commit
d552254c
authored
Sep 08, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เพิ่มการเก็บระยะเวลาที่พัฒนา ในส่วน IDP
เพิ่มหน้า เมนู ปัจจัยการประเมินสมรรถนะ
parent
ec6babb4
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
349 additions
and
169 deletions
+349
-169
competency-define-evaluation-factors.component.html
...ctors/competency-define-evaluation-factors.component.html
+10
-10
competency-define-evaluation-factors.component.ts
...factors/competency-define-evaluation-factors.component.ts
+41
-44
edit-define-document-form.component.ts
...fine-document-form/edit-define-document-form.component.ts
+7
-6
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+7
-6
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+2
-2
pms-idp.component.html
...aluation/pms-form-employee/pms-idp/pms-idp.component.html
+21
-22
edit-evaluation-form.component.ts
...rm/edit-evaluation-form/edit-evaluation-form.component.ts
+5
-4
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+6
-4
define-evaluation-factors.component.html
...aluation-factors/define-evaluation-factors.component.html
+9
-9
define-evaluation-factors.component.ts
...evaluation-factors/define-evaluation-factors.component.ts
+31
-31
com-ealuation-factors.model.ts
src/app/shared/model/com-ealuation-factors.model.ts
+152
-0
competency.model.ts
src/app/shared/model/competency.model.ts
+3
-1
idp-form.model.ts
src/app/shared/model/idp-form.model.ts
+2
-0
pms-evaluation-factors.model.ts
src/app/shared/model/pms-evaluation-factors.model.ts
+4
-4
pms-evaluation-factors1.model.ts
src/app/shared/model/pms-evaluation-factors1.model.ts
+3
-3
com-evaluation-factors.service.ts
src/app/shared/services/com-evaluation-factors.service.ts
+23
-0
evaluation-assessment.service.ts
src/app/shared/services/evaluation-assessment.service.ts
+10
-10
pms-evaluation-assessment.service.ts
src/app/shared/services/pms-evaluation-assessment.service.ts
+10
-10
pms-evaluation-factors.service.ts
src/app/shared/services/pms-evaluation-factors.service.ts
+3
-3
No files found.
src/app/components/competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component.html
View file @
d552254c
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead
class=
"height-50px"
>
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<tr
class=
"font-size-12px"
>
<ng-container
*
ngFor=
"let item of
pmsE
aluationFactorsTableHeader; let f = first; let l = last"
>
<ng-container
*
ngFor=
"let item of
comEv
aluationFactorsTableHeader; let f = first; let l = last"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
"
>
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</ng-container>
</ng-container>
</tr>
</tr>
</thead>
</thead>
<tbody
*
ngIf=
"
pmsE
aluationFactors.loading"
>
<tbody
*
ngIf=
"
comEv
aluationFactors.loading"
>
<tr>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
...
@@ -72,27 +72,27 @@
...
@@ -72,27 +72,27 @@
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"!
pmsE
aluationFactors.loading&&!dataListFilter().length"
>
<tbody
*
ngIf=
"!
comEv
aluationFactors.loading&&!dataListFilter().length"
>
<tr>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
ไม่พบข้อมูล
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"!
pmsE
aluationFactors.loading&&dataListFilter().length"
>
<tbody
*
ngIf=
"!
comEv
aluationFactors.loading&&dataListFilter().length"
>
<tr
<tr
*
ngFor=
"let
pmsE
aluationFactors of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
*
ngFor=
"let
comEv
aluationFactors of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<span>
<span>
{{
pmsEaluationFactors.personalLeve
l.plId }}
{{
comEvaluationFactors.j
l.plId }}
</span>
</span>
</td>
</td>
<td
*
ngFor=
"let item of
pmsEaluationFactors.pmsEvaluationFactors1Model
List"
>
<td
*
ngFor=
"let item of
comEvaluationFactors.comEvaluationFactors
List"
>
<input
type=
"text"
class=
"ti-form-input"
oninput=
"this.value = this.value.replace(/\D/g, '')"
<input
type=
"text"
class=
"ti-form-input"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
item
.
pms
Score
"
>
[(
ngModel
)]="
item
.
com
Score
"
>
</td>
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
{{calPmsEaluationFactors1Total(
pmsEaluationFactors.pmsEvaluationFactors1Model
List) }}
</td>
{{calPmsEaluationFactors1Total(
comEvaluationFactors.comEvaluationFactors
List) }}
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
(
click
)="
save
PmsE
aluationFactors
()"
>
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
(
click
)="
save
ComEv
aluationFactors
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component.ts
View file @
d552254c
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyPmsEvaluationFactorsModel
,
PmsEvaluationFactorsModel
}
from
'src/app/shared/model/pms-ealuation-factors.model'
;
import
{
ComEvaluationFactorsDetailModel
,
ComEvaluationFactorsModel
,
MyComEvaluationFactorsDetailModel
,
MyComEvaluationFactorsModel
,
MyCompetencyTypeModel
}
from
'src/app/shared/model/com-ealuation-factors.model'
;
import
{
MyPmsEaluationFactors1Model
,
PmsEaluationFactors1Model
}
from
'src/app/shared/model/pms-ealuation-factors1.model'
;
import
{
ComEvaluationFactorsService
}
from
'src/app/shared/services/com-evaluation-factors.service'
;
import
{
MyPmstypeModel
}
from
'src/app/shared/model/pmstype.model'
;
import
{
PmsEaluationFactorsService
}
from
'src/app/shared/services/pms-ealuation-factors.service'
;
@
Component
({
@
Component
({
selector
:
'app-competency-define-evaluation-factors'
,
selector
:
'app-competency-define-evaluation-factors'
,
templateUrl
:
'./competency-define-evaluation-factors.component.html'
,
templateUrl
:
'./competency-define-evaluation-factors.component.html'
,
...
@@ -14,89 +11,89 @@ export class CompetencyDefineEvaluationFactorsComponent {
...
@@ -14,89 +11,89 @@ export class CompetencyDefineEvaluationFactorsComponent {
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
search
=
""
pmsEaluationFactors
:
{
loading
:
boolean
,
dataList
:
Pms
EvaluationFactorsModel
[]
}
=
{
loading
:
false
,
dataList
:
[]
}
comEvaluationFactors
:
{
loading
:
boolean
,
dataList
:
Com
EvaluationFactorsModel
[]
}
=
{
loading
:
false
,
dataList
:
[]
}
pmsE
aluationFactorsTableHeader
:
string
[]
=
[
'ลักษณะงาน'
]
comEv
aluationFactorsTableHeader
:
string
[]
=
[
'ลักษณะงาน'
]
constructor
(
private
pmsEaluationFactorsService
:
PmsE
aluationFactorsService
,
constructor
(
private
comEvaluationFactorsService
:
ComEv
aluationFactorsService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
get
PmsE
aluationFactorsList
()
this
.
get
ComEv
aluationFactorsList
()
}
}
get
PmsE
aluationFactorsList
()
{
get
ComEv
aluationFactorsList
()
{
this
.
pmsE
aluationFactors
.
loading
=
true
this
.
comEv
aluationFactors
.
loading
=
true
this
.
pmsE
aluationFactorsTableHeader
=
[
'ลักษณะงาน'
]
this
.
comEv
aluationFactorsTableHeader
=
[
'ลักษณะงาน'
]
this
.
pmsE
aluationFactorsService
.
getList
().
subscribe
({
this
.
comEv
aluationFactorsService
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
pmsEaluationFactors
.
dataList
=
response
.
map
(
x
=>
new
MyPms
EvaluationFactorsModel
(
x
))
this
.
comEvaluationFactors
.
dataList
=
response
.
map
(
x
=>
new
MyCom
EvaluationFactorsModel
(
x
))
this
.
pmsE
aluationFactors
.
loading
=
false
this
.
comEv
aluationFactors
.
loading
=
false
const
maxItem
=
this
.
pmsE
aluationFactors
.
dataList
.
reduce
((
max
,
item
)
=>
const
maxItem
=
this
.
comEv
aluationFactors
.
dataList
.
reduce
((
max
,
item
)
=>
item
.
pmsEvaluationFactors1ModelList
.
length
>
max
.
pmsEvaluationFactors1Model
List
.
length
?
item
:
max
,
item
.
comEvaluationFactorsList
.
length
>
max
.
comEvaluationFactors
List
.
length
?
item
:
max
,
this
.
pmsE
aluationFactors
.
dataList
[
0
]
this
.
comEv
aluationFactors
.
dataList
[
0
]
);
);
const
pmsTypeIds
=
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
pms
TypeId
)
||
[];
const
comTypeIds
=
maxItem
?.
comEvaluationFactorsList
.
map
(
x
=>
x
.
competencyType
.
competency
TypeId
)
||
[];
this
.
pmsEaluationFactorsTableHeader
=
this
.
pmsEaluationFactorsTableHeader
.
concat
(
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pms
Type
.
tdesc
)
||
[]).
concat
([
'รวม'
])
this
.
comEvaluationFactorsTableHeader
=
this
.
comEvaluationFactorsTableHeader
.
concat
(
maxItem
?.
comEvaluationFactorsList
.
map
(
x
=>
x
.
competency
Type
.
tdesc
)
||
[]).
concat
([
'รวม'
])
this
.
pmsE
aluationFactors
.
dataList
.
forEach
(
x
=>
{
this
.
comEv
aluationFactors
.
dataList
.
forEach
(
x
=>
{
while
(
x
.
pmsEvaluationFactors1Model
List
.
length
<
5
)
{
while
(
x
.
comEvaluationFactors
List
.
length
<
5
)
{
const
usedTypes
=
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
y
.
pmsType
.
pms
TypeId
);
const
usedTypes
=
x
.
comEvaluationFactorsList
.
map
(
y
=>
y
.
competencyType
.
competency
TypeId
);
const
remainingTypes
=
pms
TypeIds
.
filter
(
type
=>
!
usedTypes
.
includes
(
type
));
const
remainingTypes
=
com
TypeIds
.
filter
(
type
=>
!
usedTypes
.
includes
(
type
));
if
(
remainingTypes
.
length
===
0
)
{
break
}
if
(
remainingTypes
.
length
===
0
)
{
break
}
const
pms
TypeId
=
remainingTypes
[
0
];
const
competency
TypeId
=
remainingTypes
[
0
];
x
.
pmsEvaluationFactors1Model
List
.
push
(
x
.
comEvaluationFactors
List
.
push
(
new
My
PmsEaluationFactors1Model
({
pmsType
:
new
MyPmstypeModel
({
pms
TypeId
})
})
new
My
ComEvaluationFactorsDetailModel
({
competencyType
:
new
MyCompetencyTypeModel
({
competency
TypeId
})
})
)
)
}
}
x
.
pmsEvaluationFactors1ModelList
.
sort
((
a
,
b
)
=>
+
(
a
.
pmsType
.
pmsTypeId
)
-
+
(
b
.
pmsType
.
pms
TypeId
))
x
.
comEvaluationFactorsList
.
sort
((
a
,
b
)
=>
+
(
a
.
competencyType
.
competencyTypeId
)
-
+
(
b
.
competencyType
.
competency
TypeId
))
})
})
this
.
searchChange
()
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
pmsE
aluationFactors
.
loading
=
false
this
.
comEv
aluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
})
})
}
}
save
PmsE
aluationFactors
()
{
save
ComEv
aluationFactors
()
{
this
.
pmsE
aluationFactors
.
loading
=
true
this
.
comEv
aluationFactors
.
loading
=
true
const
body
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPms
EvaluationFactorsModel
({
const
body
=
this
.
comEvaluationFactors
.
dataList
.
map
(
x
=>
new
MyCom
EvaluationFactorsModel
({
...
x
,
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1
Model
({
comEvaluationFactorsList
:
x
.
comEvaluationFactorsList
.
map
(
y
=>
new
MyComEvaluationFactorsDetail
Model
({
...
y
,
...
y
,
pmsScore
:
+
(
y
.
pms
Score
)
comScore
:
+
(
y
.
com
Score
)
}))
}))
}))
}))
this
.
pmsE
aluationFactorsService
.
post
(
body
).
subscribe
({
this
.
comEv
aluationFactorsService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
get
PmsE
aluationFactorsList
()
this
.
get
ComEv
aluationFactorsList
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsE
aluationFactors
.
loading
=
false
this
.
comEv
aluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsE
aluationFactors
.
loading
=
false
this
.
comEv
aluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
})
})
}
}
clear
()
{
clear
()
{
this
.
pmsEaluationFactors
.
dataList
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPms
EvaluationFactorsModel
({
this
.
comEvaluationFactors
.
dataList
=
this
.
comEvaluationFactors
.
dataList
.
map
(
x
=>
new
MyCom
EvaluationFactorsModel
({
...
x
,
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1
Model
({
comEvaluationFactorsList
:
x
.
comEvaluationFactorsList
.
map
(
y
=>
new
MyComEvaluationFactorsDetail
Model
({
...
y
,
...
y
,
pms
Score
:
0
com
Score
:
0
}))
}))
}))
}))
}
}
calPmsEaluationFactors1Total
(
data
:
PmsEaluationFactors1
Model
[])
{
calPmsEaluationFactors1Total
(
data
:
ComEvaluationFactorsDetail
Model
[])
{
return
data
.
reduce
((
sum
,
num
)
=>
sum
+
+
(
num
.
pms
Score
),
0
);
return
data
.
reduce
((
sum
,
num
)
=>
sum
+
+
(
num
.
com
Score
),
0
);
}
}
dataListFilter
()
{
dataListFilter
()
{
return
this
.
pmsEaluationFactors
.
dataList
.
filter
(
x
=>
x
.
personalLeve
l
.
plId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
return
this
.
comEvaluationFactors
.
dataList
.
filter
(
x
=>
x
.
j
l
.
plId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
}
}
searchChange
()
{
searchChange
()
{
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.ts
View file @
d552254c
...
@@ -21,6 +21,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -21,6 +21,7 @@ export class EditDefineDocumentFormComponent {
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Input
()
evaluationRoundId
=
''
@
Input
()
evaluationRoundId
=
''
@
Input
()
apsyear
=
''
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
...
@@ -60,7 +61,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -60,7 +61,7 @@ export class EditDefineDocumentFormComponent {
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSizeIndicator
=
10
pageSizeIndicator
=
10
competencyTopicIds
:
string
[]
=
[]
competencyTopicIds
:
string
[]
=
[]
dialogRef
:
any
dialogRef
:
any
constructor
(
private
toastr
:
ToastrService
,
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
...
@@ -79,7 +80,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -79,7 +80,7 @@ export class EditDefineDocumentFormComponent {
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
},
10
);
},
10
);
if
(
this
.
evaluationRoundId
)
{
if
(
this
.
evaluationRoundId
&&
this
.
apsyear
)
{
this
.
getAssessmentId
();
this
.
getAssessmentId
();
this
.
getAssessmentList
();
this
.
getAssessmentList
();
}
}
...
@@ -99,7 +100,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -99,7 +100,7 @@ export class EditDefineDocumentFormComponent {
}
}
getAssessmentList
()
{
getAssessmentList
()
{
this
.
loadingAssessmentList
=
true
this
.
loadingAssessmentList
=
true
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
,
this
.
apsyear
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
assessmentList
=
response
this
.
searchChange
()
this
.
searchChange
()
...
@@ -124,7 +125,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -124,7 +125,7 @@ export class EditDefineDocumentFormComponent {
x
.
masfromEvaluationRound
.
evaluationRoundId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
masfromEvaluationRound
.
evaluationRoundId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
x
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
);
);
}
}
searchChange
()
{
searchChange
()
{
this
.
currentPage
=
1
;
this
.
currentPage
=
1
;
...
@@ -202,7 +203,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -202,7 +203,7 @@ export class EditDefineDocumentFormComponent {
}
}
getApsassessy
()
{
getApsassessy
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
,
this
.
apsyear
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
empassessmentList
=
response
this
.
empassessmentList
=
response
this
.
loading
=
false
this
.
loading
=
false
...
@@ -215,7 +216,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -215,7 +216,7 @@ export class EditDefineDocumentFormComponent {
})
})
}
}
getApsassessyMini
()
{
getApsassessyMini
()
{
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
,
this
.
apsyear
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
d552254c
...
@@ -103,8 +103,7 @@
...
@@ -103,8 +103,7 @@
[
ngClass
]="{'!
bg-input-readonly
'
:
modalStatus =
=
'
edit
'}"
[
readonly
]="
modalStatus =
=
'
edit
'"
>
[
ngClass
]="{'!
bg-input-readonly
'
:
modalStatus =
=
'
edit
'}"
[
readonly
]="
modalStatus =
=
'
edit
'"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ลักษณะงาน (JD)
</label>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ลักษณะงาน (JD)
</label>
<div
*
ngFor=
"let item of evaluation_cycle.jd;let i = index;let f=first;let l = last"
<div
*
ngFor=
"let item of evaluation_cycle.jd;let i = index;let f=first;let l = last"
class=
"grid grid-cols-2"
>
class=
"grid grid-cols-2"
>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<div
class=
"flex relative"
>
<div
class=
"flex relative"
>
<input
type=
"text"
class=
"ti-form-input pointer-events-none"
readonly
<input
type=
"text"
class=
"ti-form-input pointer-events-none"
readonly
...
@@ -118,8 +117,8 @@
...
@@ -118,8 +117,8 @@
[
ngClass
]="{'
input-list-f2
'
:
f
&&!
l
,
'
input-list-c2
'
:
!
f
&&!
l
,
'
input-list-l2
'
:
!
f
&&
l
,
'
input-list-fl2
'
:
f
&&
l
,'!
bg-input-readonly
'
:modalStatus =
=
'
edit
'}"
[
ngClass
]="{'
input-list-f2
'
:
f
&&!
l
,
'
input-list-c2
'
:
!
f
&&!
l
,
'
input-list-l2
'
:
!
f
&&
l
,
'
input-list-fl2
'
:
f
&&
l
,'!
bg-input-readonly
'
:modalStatus =
=
'
edit
'}"
[(
ngModel
)]="
item
.
tdesc
"
>
[(
ngModel
)]="
item
.
tdesc
"
>
<div
class=
"absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2"
>
<div
class=
"absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2"
>
<button
*
ngIf=
"item.jobCodeId && modalStatus !== 'edit'"
type=
"button"
class=
"flex items-center text-red-500"
<button
*
ngIf=
"item.jobCodeId && modalStatus !== 'edit'"
type=
"button"
(
click
)="
pl
.
selectIndex=
i;selectPl()"
>
class=
"flex items-center text-red-500"
(
click
)="
pl
.
selectIndex=
i;selectPl()"
>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
</button>
</button>
</div>
</div>
...
@@ -146,7 +145,8 @@
...
@@ -146,7 +145,8 @@
<ng-template
#
plSearchButton
>
<ng-template
#
plSearchButton
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary !m-0 h-full"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary !m-0 h-full"
style=
"height: 44.8px !important;"
(
click
)="
openDialogPL
();
PLsearchmodal
.
search=
''
;
searchModalChange
(
plListFilter
())"
>
style=
"height: 44.8px !important;"
(
click
)="
openDialogPL
();
PLsearchmodal
.
search=
''
;
searchModalChange
(
plListFilter
())"
>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
</button>
</button>
</ng-template>
</ng-template>
...
@@ -172,7 +172,8 @@
...
@@ -172,7 +172,8 @@
</h3>
</h3>
<mat-dialog-content>
<mat-dialog-content>
<app-edit-define-document-form
*
ngIf=
"evaluation_cycle?.evaluationRoundId"
<app-edit-define-document-form
*
ngIf=
"evaluation_cycle?.evaluationRoundId"
[
evaluationRoundId
]="
evaluation_cycle
.
evaluationRoundId
"
></app-edit-define-document-form>
[
evaluationRoundId
]="
evaluation_cycle
.
evaluationRoundId
"
[
apsyear
]="
evaluation_cycle
.
apsyear
"
></app-edit-define-document-form>
</mat-dialog-content>
</mat-dialog-content>
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
d552254c
...
@@ -138,7 +138,7 @@ import { PmstypeService } from 'src/app/shared/services/pmstype.service';
...
@@ -138,7 +138,7 @@ import { PmstypeService } from 'src/app/shared/services/pmstype.service';
import
{
PmstopicService
}
from
'src/app/shared/services/pmstopic.service'
;
import
{
PmstopicService
}
from
'src/app/shared/services/pmstopic.service'
;
import
{
PmsGroupAssessmentService
}
from
'src/app/shared/services/pms-group-assessment.service'
;
import
{
PmsGroupAssessmentService
}
from
'src/app/shared/services/pms-group-assessment.service'
;
import
{
PmsGroupApproveService
}
from
'src/app/shared/services/pms-group-approve.service'
;
import
{
PmsGroupApproveService
}
from
'src/app/shared/services/pms-group-approve.service'
;
import
{
PmsE
aluationFactorsService
}
from
'src/app/shared/services/pms-e
aluation-factors.service'
;
import
{
PmsE
valuationFactorsService
}
from
'src/app/shared/services/pms-ev
aluation-factors.service'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
import
{
PmsGroupGradeService
}
from
'src/app/shared/services/pms-group-grade.service'
;
import
{
PmsGroupGradeService
}
from
'src/app/shared/services/pms-group-grade.service'
;
import
{
PmsSettingAssessmentService
}
from
'src/app/shared/services/pms-setting-assessment.service'
;
import
{
PmsSettingAssessmentService
}
from
'src/app/shared/services/pms-setting-assessment.service'
;
...
@@ -414,7 +414,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
...
@@ -414,7 +414,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmstopicService
,
PmstopicService
,
PmsGroupAssessmentService
,
PmsGroupAssessmentService
,
PmsGroupApproveService
,
PmsGroupApproveService
,
PmsEaluationFactorsService
,
PmsE
v
aluationFactorsService
,
PmsMasfromEvaluationCycleService
,
PmsMasfromEvaluationCycleService
,
PmsGroupGradeService
,
PmsGroupGradeService
,
PmsSettingAssessmentService
,
PmsSettingAssessmentService
,
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-idp/pms-idp.component.html
View file @
d552254c
...
@@ -19,14 +19,16 @@
...
@@ -19,14 +19,16 @@
<i class="ri-draft-fill"></i>
<i class="ri-draft-fill"></i>
PDF
PDF
</button> -->
</button> -->
<button
class=
"ti-btn m-0 ti-btn-soft-warning"
data-html2canvas-ignore=
"true"
data-hide-in-pdf
(
click
)="
exportPdf
()"
>
<button
class=
"ti-btn m-0 ti-btn-soft-warning"
data-html2canvas-ignore=
"true"
data-hide-in-pdf
(
click
)="
exportPdf
()"
>
<i
class=
"ri-draft-fill"
></i>
PDF
<i
class=
"ri-draft-fill"
></i>
PDF
</button>
</button>
</div>
</div>
<div
class=
"pt-2 pb-2rem"
>
<div
class=
"pt-2 pb-2rem"
>
<div
class=
"flex flex-row gap-2 "
>
<div
class=
"flex flex-row gap-2 "
>
<div
class=
"w-1/2 border flex flex-col shadow"
style=
"border-radius: 20px;"
>
<div
class=
"w-1/2 border flex flex-col shadow"
style=
"border-radius: 20px;"
>
<div
class=
"w-full bg-soft-secondary text-primary p-3"
style=
"border-radius: 20px 20px 0 0;"
>
<div
class=
"w-full bg-soft-secondary text-primary p-3"
style=
"border-radius: 20px 20px 0 0;"
>
<span
class=
"font-size-18px font-weight-700"
>
ผู้ใต้บังคับบัญชา
</span>
<span
class=
"font-size-18px font-weight-700"
>
ผู้ใต้บังคับบัญชา
</span>
</div>
</div>
<div
class=
"w-full p-2"
>
<div
class=
"w-full p-2"
>
...
@@ -65,7 +67,8 @@
...
@@ -65,7 +67,8 @@
</div>
</div>
</div>
</div>
<div
class=
"w-1/2 border flex flex-col shadow"
style=
"border-radius: 20px;"
>
<div
class=
"w-1/2 border flex flex-col shadow"
style=
"border-radius: 20px;"
>
<div
class=
"w-full bg-soft-secondary text-primary p-3"
style=
"border-radius: 20px 20px 0 0;"
>
<div
class=
"w-full bg-soft-secondary text-primary p-3"
style=
"border-radius: 20px 20px 0 0;"
>
<span
class=
"font-size-18px font-weight-700"
>
ผู้บังคับบัญชา
</span>
<span
class=
"font-size-18px font-weight-700"
>
ผู้บังคับบัญชา
</span>
</div>
</div>
<div
class=
"w-full p-2"
>
<div
class=
"w-full p-2"
>
...
@@ -112,7 +115,8 @@
...
@@ -112,7 +115,8 @@
</div>
</div>
<div
class=
"pb-2"
>
<div
class=
"pb-2"
>
<div
class=
"py-2 grid grid-cols-6 gap-3"
>
<div
class=
"py-2 grid grid-cols-6 gap-3"
>
<div
class=
"col-span-6"
>
หมายเหตุ : กรณี HR จัดอบรมให้ต้องเป็นไปตามเกณฑ์ที่ส่วนกลางกำหนดขึ้น
</div>
<div
class=
"col-span-6"
>
หมายเหตุ : กรณี HR จัดอบรมให้ต้องเป็นไปตามเกณฑ์ที่ส่วนกลางกำหนดขึ้น
</div>
<div
class=
"col-span-6 grid grid-cols-6 gap-2"
>
<div
class=
"col-span-6 grid grid-cols-6 gap-2"
>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
...
@@ -240,7 +244,8 @@
...
@@ -240,7 +244,8 @@
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"appraisalIdp.competencyIndicatorsCourses1.length"
>
<tbody
*
ngIf=
"appraisalIdp.competencyIndicatorsCourses1.length"
>
<ng-container
*
ngFor=
" let data of appraisalIdp.competencyIndicatorsCourses1;let i = index"
>
<ng-container
*
ngFor=
" let data of appraisalIdp.competencyIndicatorsCourses1;let i = index"
>
<tr
(
mouseenter
)="
hoveredCode =
data.indicatorsCourses0.competencyTopic.competencyTopicId"
<tr
(
mouseenter
)="
hoveredCode =
data.indicatorsCourses0.competencyTopic.competencyTopicId"
(
mouseleave
)="
hoveredCode =
null"
(
mouseleave
)="
hoveredCode =
null"
[
ngClass
]="{
'
table-hover2
'
:
data
.
indicatorsCourses0
.
competencyTopic
.
competencyTopicId =
==
hoveredCode
}"
>
[
ngClass
]="{
'
table-hover2
'
:
data
.
indicatorsCourses0
.
competencyTopic
.
competencyTopicId =
==
hoveredCode
}"
>
...
@@ -331,9 +336,8 @@
...
@@ -331,9 +336,8 @@
</td>
</td>
<td
class=
"!p-0"
></td>
<td
class=
"!p-0"
></td>
<td
class=
"align-start text-center !white-space-normal"
<td
class=
"align-start text-center !white-space-normal"
[
class
.
bg-gray-200
]="!
appraisalIdp
.
masfromEvaluationRound
.
apsPeriodStart
&&!
appraisalIdp
.
masfromEvaluationRound
.
apsPeriodEnd
"
>
[
class
.
bg-gray-200
]="!
data
.
startDate
&&!
data
.
endDate
"
>
<ng-container
<ng-container
*
ngIf=
"data.startDate &&data.endDate"
>
*
ngIf=
"appraisalIdp.masfromEvaluationRound.apsPeriodStart &&appraisalIdp.masfromEvaluationRound.apsPeriodEnd"
>
จาก
จาก
</ng-container>
</ng-container>
...
@@ -341,35 +345,30 @@
...
@@ -341,35 +345,30 @@
<ng-container
<ng-container
*
ngIf=
"data.idpDevelopmentPlan&&data.idpDevelopmentPlan?.training && appraisalIdp.apsapprove1.employeeId == evaluaterId"
>
*
ngIf=
"data.idpDevelopmentPlan&&data.idpDevelopmentPlan?.training && appraisalIdp.apsapprove1.employeeId == evaluaterId"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input"
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input"
[(
ngModel
)]="
appraisalIdp
.
masfromEvaluationRound
.
apsPeriodStart
"
>
[(
ngModel
)]="
data
.
startDate
"
>
<ng-container
<ng-container
*
ngIf=
"data.startDate &&data.endDate"
>
*
ngIf=
"appraisalIdp.masfromEvaluationRound.apsPeriodStart &&appraisalIdp.masfromEvaluationRound.apsPeriodEnd"
>
<p></p>
ถึง
<p></p>
ถึง
</ng-container>
</ng-container>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input"
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input"
[(
ngModel
)]="
appraisalIdp
.
masfromEvaluationRound
.
apsPeriodEnd
"
>
[(
ngModel
)]="
data
.
endDate
"
>
</ng-container>
</ng-container>
<ng-container
<ng-container
*
ngIf=
"!(data.idpDevelopmentPlan&&data.idpDevelopmentPlan?.training) || appraisalIdp.apsapprove1.employeeId != evaluaterId"
>
*
ngIf=
"!(data.idpDevelopmentPlan&&data.idpDevelopmentPlan?.training) || appraisalIdp.apsapprove1.employeeId != evaluaterId"
>
{{convertDateFormat(appraisalIdp.masfromEvaluationRound.apsPeriodStart)}}
{{convertDateFormat(data.startDate)}}
<ng-container
<ng-container
*
ngIf=
"data.startDate &&data.endDate"
>
*
ngIf=
"appraisalIdp.masfromEvaluationRound.apsPeriodStart &&appraisalIdp.masfromEvaluationRound.apsPeriodEnd"
>
<p></p>
ถึง
<p></p>
ถึง
</ng-container>
</ng-container>
{{convertDateFormat(appraisalIdp.masfromEvaluationRound.apsPeriodEnd
)}}
{{convertDateFormat(data.endDate
)}}
</ng-container>
</ng-container>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"pdfPrintCheck != 0"
>
<ng-container
*
ngIf=
"pdfPrintCheck != 0"
>
{{convertDateFormat(appraisalIdp.masfromEvaluationRound.apsPeriodStart)}}
{{convertDateFormat(data.startDate)}}
<ng-container
<ng-container
*
ngIf=
"data.startDate &&data.endDate"
>
*
ngIf=
"appraisalIdp.masfromEvaluationRound.apsPeriodStart &&appraisalIdp.masfromEvaluationRound.apsPeriodEnd"
>
<p></p>
ถึง
<p></p>
ถึง
</ng-container>
</ng-container>
{{convertDateFormat(appraisalIdp.masfromEvaluationRound.apsPeriodEnd
)}}
{{convertDateFormat(data.endDate
)}}
</ng-container>
</ng-container>
</td>
</td>
</tr>
</tr>
</ng-container>
</ng-container>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.ts
View file @
d552254c
...
@@ -21,6 +21,7 @@ export class EditEvaluationFormComponent {
...
@@ -21,6 +21,7 @@ export class EditEvaluationFormComponent {
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Input
()
evaluationRoundId
=
''
@
Input
()
evaluationRoundId
=
''
@
Input
()
apsyear
=
''
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
...
@@ -78,7 +79,7 @@ export class EditEvaluationFormComponent {
...
@@ -78,7 +79,7 @@ export class EditEvaluationFormComponent {
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
},
10
);
},
10
);
if
(
this
.
evaluationRoundId
)
{
if
(
this
.
evaluationRoundId
&&
this
.
apsyear
)
{
this
.
getAssessmentId
();
this
.
getAssessmentId
();
this
.
getAssessmentList
();
this
.
getAssessmentList
();
}
}
...
@@ -97,7 +98,7 @@ export class EditEvaluationFormComponent {
...
@@ -97,7 +98,7 @@ export class EditEvaluationFormComponent {
}
}
getAssessmentList
()
{
getAssessmentList
()
{
this
.
pmsEvaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
this
.
pmsEvaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
,
this
.
apsyear
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
assessmentList
=
response
this
.
searchChange
()
this
.
searchChange
()
...
@@ -184,7 +185,7 @@ export class EditEvaluationFormComponent {
...
@@ -184,7 +185,7 @@ export class EditEvaluationFormComponent {
}
}
getApsassessy
()
{
getApsassessy
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
pmsEvaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
pmsEvaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
,
this
.
apsyear
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
empassessmentList
=
response
this
.
empassessmentList
=
response
this
.
loading
=
false
this
.
loading
=
false
...
@@ -197,7 +198,7 @@ export class EditEvaluationFormComponent {
...
@@ -197,7 +198,7 @@ export class EditEvaluationFormComponent {
})
})
}
}
getApsassessyMini
()
{
getApsassessyMini
()
{
this
.
pmsEvaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
pmsEvaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
,
this
.
apsyear
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
d552254c
...
@@ -138,8 +138,8 @@
...
@@ -138,8 +138,8 @@
[
ngClass
]="{'
input-list-f2
'
:
f
&&!
l
,
'
input-list-c2
'
:
!
f
&&!
l
,
'
input-list-l2
'
:
!
f
&&
l
,
'
input-list-fl2
'
:
f
&&
l
,'!
bg-input-readonly
'
:modalStatus =
=
'
edit
'}"
[
ngClass
]="{'
input-list-f2
'
:
f
&&!
l
,
'
input-list-c2
'
:
!
f
&&!
l
,
'
input-list-l2
'
:
!
f
&&
l
,
'
input-list-fl2
'
:
f
&&
l
,'!
bg-input-readonly
'
:modalStatus =
=
'
edit
'}"
[(
ngModel
)]="
item
.
tdesc
"
>
[(
ngModel
)]="
item
.
tdesc
"
>
<div
class=
"absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2"
>
<div
class=
"absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2"
>
<button
*
ngIf=
"item.jobCodeId && modalStatus !== 'edit'"
type=
"button"
class=
"flex items-center text-red-500"
<button
*
ngIf=
"item.jobCodeId && modalStatus !== 'edit'"
type=
"button"
(
click
)="
pl
.
selectIndex=
i;selectPl();"
>
class=
"flex items-center text-red-500"
(
click
)="
pl
.
selectIndex=
i;selectPl();"
>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
</button>
</button>
</div>
</div>
...
@@ -166,7 +166,8 @@
...
@@ -166,7 +166,8 @@
<ng-template
#
plSearchButton
>
<ng-template
#
plSearchButton
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary !m-0 h-full"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary !m-0 h-full"
style=
"height: 44.8px !important;"
(
click
)="
openPLDialog
();
PLsearchmodal
.
search=
''
;
searchModalChange
(
plListFilter
())"
>
style=
"height: 44.8px !important;"
(
click
)="
openPLDialog
();
PLsearchmodal
.
search=
''
;
searchModalChange
(
plListFilter
())"
>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
</button>
</button>
</ng-template>
</ng-template>
...
@@ -194,7 +195,8 @@
...
@@ -194,7 +195,8 @@
<!-- <app-edit-define-document-form *ngIf="pmsMasfromEvaluation.select.pmsEvaluationRoundId"
<!-- <app-edit-define-document-form *ngIf="pmsMasfromEvaluation.select.pmsEvaluationRoundId"
[evaluationRoundId]="pmsMasfromEvaluation.select.pmsEvaluationRoundId"></app-edit-define-document-form> -->
[evaluationRoundId]="pmsMasfromEvaluation.select.pmsEvaluationRoundId"></app-edit-define-document-form> -->
<app-edit-evaluation-form
*
ngIf=
"pmsMasfromEvaluation.select.pmsEvaluationRoundId"
<app-edit-evaluation-form
*
ngIf=
"pmsMasfromEvaluation.select.pmsEvaluationRoundId"
[
evaluationRoundId
]="
pmsMasfromEvaluation
.
select
.
pmsEvaluationRoundId
"
></app-edit-evaluation-form>
[
evaluationRoundId
]="
pmsMasfromEvaluation
.
select
.
pmsEvaluationRoundId
"
[
apsyear
]="
pmsMasfromEvaluation
.
select
.
apsyear
"
></app-edit-evaluation-form>
</mat-dialog-content>
</mat-dialog-content>
<mat-dialog-actions
align=
"end"
>
<mat-dialog-actions
align=
"end"
>
...
...
src/app/components/performance-management-evaluation/evaluation-factors/define-evaluation-factors/define-evaluation-factors.component.html
View file @
d552254c
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead
class=
"height-50px"
>
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<tr
class=
"font-size-12px"
>
<ng-container
*
ngFor=
"let item of pmsEaluationFactorsTableHeader; let f = first; let l = last"
>
<ng-container
*
ngFor=
"let item of pmsE
v
aluationFactorsTableHeader; let f = first; let l = last"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
"
>
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</ng-container>
</ng-container>
</tr>
</tr>
</thead>
</thead>
<tbody
*
ngIf=
"pmsEaluationFactors.loading"
>
<tbody
*
ngIf=
"pmsE
v
aluationFactors.loading"
>
<tr>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
...
@@ -72,27 +72,27 @@
...
@@ -72,27 +72,27 @@
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"!pmsEaluationFactors.loading&&!dataListFilter().length"
>
<tbody
*
ngIf=
"!pmsE
v
aluationFactors.loading&&!dataListFilter().length"
>
<tr>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
ไม่พบข้อมูล
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"!pmsEaluationFactors.loading&&dataListFilter().length"
>
<tbody
*
ngIf=
"!pmsE
v
aluationFactors.loading&&dataListFilter().length"
>
<tr
<tr
*
ngFor=
"let pmsEaluationFactors of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
*
ngFor=
"let pmsE
v
aluationFactors of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<span>
<span>
{{pmsEaluationFactors.personalLevel.plId }}
{{pmsE
v
aluationFactors.personalLevel.plId }}
</span>
</span>
</td>
</td>
<td
*
ngFor=
"let item of pmsEaluationFactors.pmsEvaluationFactors1ModelList"
>
<td
*
ngFor=
"let item of pmsE
v
aluationFactors.pmsEvaluationFactors1ModelList"
>
<input
type=
"text"
class=
"ti-form-input"
oninput=
"this.value = this.value.replace(/\D/g, '')"
<input
type=
"text"
class=
"ti-form-input"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
item
.
pmsScore
"
>
[(
ngModel
)]="
item
.
pmsScore
"
>
</td>
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
{{calPmsE
aluationFactors1Total(pmsE
aluationFactors.pmsEvaluationFactors1ModelList) }}
</td>
{{calPmsE
valuationFactors1Total(pmsEv
aluationFactors.pmsEvaluationFactors1ModelList) }}
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
(
click
)="
savePmsEaluationFactors
()"
>
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
(
click
)="
savePmsE
v
aluationFactors
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/evaluation-factors/define-evaluation-factors/define-evaluation-factors.component.ts
View file @
d552254c
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyPmsEvaluationFactorsModel
,
PmsEvaluationFactorsModel
}
from
'src/app/shared/model/pms-ealuation-factors.model'
;
import
{
MyPmsEvaluationFactorsModel
,
PmsEvaluationFactorsModel
}
from
'src/app/shared/model/pms-e
v
aluation-factors.model'
;
import
{
MyPmsE
aluationFactors1Model
,
PmsEaluationFactors1Model
}
from
'src/app/shared/model/pms-e
aluation-factors1.model'
;
import
{
MyPmsE
valuationFactors1Model
,
PmsEvaluationFactors1Model
}
from
'src/app/shared/model/pms-ev
aluation-factors1.model'
;
import
{
MyPmstypeModel
}
from
'src/app/shared/model/pmstype.model'
;
import
{
MyPmstypeModel
}
from
'src/app/shared/model/pmstype.model'
;
import
{
PmsE
aluationFactorsService
}
from
'src/app/shared/services/pms-e
aluation-factors.service'
;
import
{
PmsE
valuationFactorsService
}
from
'src/app/shared/services/pms-ev
aluation-factors.service'
;
@
Component
({
@
Component
({
selector
:
'app-define-evaluation-factors'
,
selector
:
'app-define-evaluation-factors'
,
...
@@ -14,36 +14,36 @@ export class DefineEvaluationFactorsComponent {
...
@@ -14,36 +14,36 @@ export class DefineEvaluationFactorsComponent {
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
search
=
""
pmsEaluationFactors
:
{
loading
:
boolean
,
dataList
:
PmsEvaluationFactorsModel
[]
}
=
{
loading
:
false
,
dataList
:
[]
}
pmsE
v
aluationFactors
:
{
loading
:
boolean
,
dataList
:
PmsEvaluationFactorsModel
[]
}
=
{
loading
:
false
,
dataList
:
[]
}
pmsEaluationFactorsTableHeader
:
string
[]
=
[
'ระดับพนักงาน'
]
pmsE
v
aluationFactorsTableHeader
:
string
[]
=
[
'ระดับพนักงาน'
]
constructor
(
private
pmsE
aluationFactorsService
:
PmsE
aluationFactorsService
,
constructor
(
private
pmsE
valuationFactorsService
:
PmsEv
aluationFactorsService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getPmsEaluationFactorsList
()
this
.
getPmsE
v
aluationFactorsList
()
}
}
getPmsEaluationFactorsList
()
{
getPmsE
v
aluationFactorsList
()
{
this
.
pmsEaluationFactors
.
loading
=
true
this
.
pmsE
v
aluationFactors
.
loading
=
true
this
.
pmsEaluationFactorsTableHeader
=
[
'ระดับพนักงาน'
]
this
.
pmsE
v
aluationFactorsTableHeader
=
[
'ระดับพนักงาน'
]
this
.
pmsEaluationFactorsService
.
getList
().
subscribe
({
this
.
pmsE
v
aluationFactorsService
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
pmsEaluationFactors
.
dataList
=
response
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
(
x
))
this
.
pmsE
v
aluationFactors
.
dataList
=
response
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
(
x
))
this
.
pmsEaluationFactors
.
loading
=
false
this
.
pmsE
v
aluationFactors
.
loading
=
false
const
maxItem
=
this
.
pmsEaluationFactors
.
dataList
.
reduce
((
max
,
item
)
=>
const
maxItem
=
this
.
pmsE
v
aluationFactors
.
dataList
.
reduce
((
max
,
item
)
=>
item
.
pmsEvaluationFactors1ModelList
.
length
>
max
.
pmsEvaluationFactors1ModelList
.
length
?
item
:
max
,
item
.
pmsEvaluationFactors1ModelList
.
length
>
max
.
pmsEvaluationFactors1ModelList
.
length
?
item
:
max
,
this
.
pmsEaluationFactors
.
dataList
[
0
]
this
.
pmsE
v
aluationFactors
.
dataList
[
0
]
);
);
const
pmsTypeIds
=
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
pmsTypeId
)
||
[];
const
pmsTypeIds
=
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
pmsTypeId
)
||
[];
this
.
pmsE
aluationFactorsTableHeader
=
this
.
pmsE
aluationFactorsTableHeader
.
concat
(
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
tdesc
)
||
[]).
concat
([
'รวม'
])
this
.
pmsE
valuationFactorsTableHeader
=
this
.
pmsEv
aluationFactorsTableHeader
.
concat
(
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
tdesc
)
||
[]).
concat
([
'รวม'
])
this
.
pmsEaluationFactors
.
dataList
.
forEach
(
x
=>
{
this
.
pmsE
v
aluationFactors
.
dataList
.
forEach
(
x
=>
{
while
(
x
.
pmsEvaluationFactors1ModelList
.
length
<
5
)
{
while
(
x
.
pmsEvaluationFactors1ModelList
.
length
<
5
)
{
const
usedTypes
=
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
y
.
pmsType
.
pmsTypeId
);
const
usedTypes
=
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
y
.
pmsType
.
pmsTypeId
);
const
remainingTypes
=
pmsTypeIds
.
filter
(
type
=>
!
usedTypes
.
includes
(
type
));
const
remainingTypes
=
pmsTypeIds
.
filter
(
type
=>
!
usedTypes
.
includes
(
type
));
if
(
remainingTypes
.
length
===
0
)
{
break
}
if
(
remainingTypes
.
length
===
0
)
{
break
}
const
pmsTypeId
=
remainingTypes
[
0
];
const
pmsTypeId
=
remainingTypes
[
0
];
x
.
pmsEvaluationFactors1ModelList
.
push
(
x
.
pmsEvaluationFactors1ModelList
.
push
(
new
MyPmsEaluationFactors1Model
({
pmsType
:
new
MyPmstypeModel
({
pmsTypeId
})
})
new
MyPmsE
v
aluationFactors1Model
({
pmsType
:
new
MyPmstypeModel
({
pmsTypeId
})
})
)
)
}
}
x
.
pmsEvaluationFactors1ModelList
.
sort
((
a
,
b
)
=>
+
(
a
.
pmsType
.
pmsTypeId
)
-
+
(
b
.
pmsType
.
pmsTypeId
))
x
.
pmsEvaluationFactors1ModelList
.
sort
((
a
,
b
)
=>
+
(
a
.
pmsType
.
pmsTypeId
)
-
+
(
b
.
pmsType
.
pmsTypeId
))
...
@@ -51,52 +51,52 @@ export class DefineEvaluationFactorsComponent {
...
@@ -51,52 +51,52 @@ export class DefineEvaluationFactorsComponent {
this
.
searchChange
()
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
pmsEaluationFactors
.
loading
=
false
this
.
pmsE
v
aluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
})
})
}
}
savePmsEaluationFactors
()
{
savePmsE
v
aluationFactors
()
{
this
.
pmsEaluationFactors
.
loading
=
true
this
.
pmsE
v
aluationFactors
.
loading
=
true
const
body
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
const
body
=
this
.
pmsE
v
aluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
...
x
,
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1Model
({
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsE
v
aluationFactors1Model
({
...
y
,
...
y
,
pmsScore
:
+
(
y
.
pmsScore
)
pmsScore
:
+
(
y
.
pmsScore
)
}))
}))
}))
}))
this
.
pmsEaluationFactorsService
.
post
(
body
).
subscribe
({
this
.
pmsE
v
aluationFactorsService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmsEaluationFactorsList
()
this
.
getPmsE
v
aluationFactorsList
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsEaluationFactors
.
loading
=
false
this
.
pmsE
v
aluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsEaluationFactors
.
loading
=
false
this
.
pmsE
v
aluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
})
})
}
}
clear
()
{
clear
()
{
this
.
pmsE
aluationFactors
.
dataList
=
this
.
pmsE
aluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
this
.
pmsE
valuationFactors
.
dataList
=
this
.
pmsEv
aluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
...
x
,
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1Model
({
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsE
v
aluationFactors1Model
({
...
y
,
...
y
,
pmsScore
:
0
pmsScore
:
0
}))
}))
}))
}))
}
}
calPmsE
aluationFactors1Total
(
data
:
PmsE
aluationFactors1Model
[])
{
calPmsE
valuationFactors1Total
(
data
:
PmsEv
aluationFactors1Model
[])
{
return
data
.
reduce
((
sum
,
num
)
=>
sum
+
+
(
num
.
pmsScore
),
0
);
return
data
.
reduce
((
sum
,
num
)
=>
sum
+
+
(
num
.
pmsScore
),
0
);
}
}
dataListFilter
()
{
dataListFilter
()
{
return
this
.
pmsEaluationFactors
.
dataList
.
filter
(
x
=>
x
.
personalLevel
.
plId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
return
this
.
pmsE
v
aluationFactors
.
dataList
.
filter
(
x
=>
x
.
personalLevel
.
plId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
}
}
searchChange
()
{
searchChange
()
{
...
...
src/app/shared/model/com-ealuation-factors.model.ts
0 → 100644
View file @
d552254c
export
interface
ComEvaluationFactorsModel
{
comEvaluationFactorsList
:
ComEvaluationFactorsDetailModel
[]
companyId
:
string
jl
:
JlModel
}
export
class
MyComEvaluationFactorsModel
implements
ComEvaluationFactorsModel
{
comEvaluationFactorsList
:
ComEvaluationFactorsDetailModel
[]
companyId
:
string
jl
:
JlModel
constructor
(
data
?:
Partial
<
ComEvaluationFactorsModel
>
)
{
this
.
jl
=
new
MyJlModel
(
data
?.
jl
)
this
.
companyId
=
data
?.
companyId
||
""
this
.
comEvaluationFactorsList
=
(
data
?.
comEvaluationFactorsList
||
[]).
map
(
x
=>
new
MyComEvaluationFactorsDetailModel
(
x
))
||
[]
}
}
export
interface
ComEvaluationFactorsDetailModel
{
companyId
:
string
competencyType
:
CompetencyTypeModel
comScore
:
number
}
export
class
MyComEvaluationFactorsDetailModel
implements
ComEvaluationFactorsDetailModel
{
companyId
:
string
competencyType
:
CompetencyTypeModel
comScore
:
number
constructor
(
data
?:
Partial
<
ComEvaluationFactorsDetailModel
>
)
{
this
.
companyId
=
data
?.
companyId
||
""
this
.
competencyType
=
new
MyCompetencyTypeModel
(
data
?.
competencyType
)
this
.
comScore
=
data
?.
comScore
??
0
}
}
export
interface
CompetencyTypeModel
{
companyId
:
string
competencyTypeId
:
string
edesc
:
string
expectationLevel
:
string
shortName
:
string
tdesc
:
string
weight
:
number
}
export
class
MyCompetencyTypeModel
implements
CompetencyTypeModel
{
companyId
:
string
competencyTypeId
:
string
edesc
:
string
expectationLevel
:
string
shortName
:
string
tdesc
:
string
weight
:
number
constructor
(
data
?:
Partial
<
CompetencyTypeModel
>
)
{
this
.
companyId
=
data
?.
companyId
||
""
this
.
competencyTypeId
=
data
?.
competencyTypeId
||
""
this
.
edesc
=
data
?.
edesc
||
""
this
.
expectationLevel
=
data
?.
expectationLevel
||
""
this
.
shortName
=
data
?.
shortName
||
""
this
.
tdesc
=
data
?.
tdesc
||
""
this
.
weight
=
data
?.
weight
??
0
}
}
export
interface
JlModel
{
companyId
:
string
edesc
:
string
grade
:
GradeModel
plId
:
string
tdesc
:
string
}
export
class
MyJlModel
implements
JlModel
{
companyId
:
string
edesc
:
string
grade
:
GradeModel
plId
:
string
tdesc
:
string
constructor
(
data
?:
Partial
<
JlModel
>
)
{
this
.
companyId
=
data
?.
companyId
||
""
this
.
edesc
=
data
?.
edesc
||
""
this
.
grade
=
new
MyGradeModel
(
data
?.
grade
)
this
.
plId
=
data
?.
plId
||
""
this
.
tdesc
=
data
?.
tdesc
||
""
}
}
export
interface
GradeModel
{
countAverage
:
string
countEmployee
:
string
countScore
:
string
gradeDetail
:
GradeDetailModel
[]
}
export
class
MyGradeModel
implements
GradeModel
{
countAverage
:
string
countEmployee
:
string
countScore
:
string
gradeDetail
:
GradeDetailModel
[]
constructor
(
data
?:
Partial
<
GradeModel
>
)
{
this
.
countAverage
=
data
?.
countAverage
||
""
this
.
countEmployee
=
data
?.
countEmployee
||
""
this
.
countScore
=
data
?.
countScore
||
""
this
.
gradeDetail
=
(
data
?.
gradeDetail
||
[]).
map
(
item
=>
new
MyGradeDetailModel
(
item
))
}
}
export
interface
GradeDetailModel
{
companyId
:
string
countAverage
:
string
countEmployee
:
string
countScore
:
string
edesc
:
string
gradeDetail
:
string
gradeId
:
string
gradeMaxScore
:
number
gradeMinScore
:
number
tdesc
:
string
weight
:
number
}
export
class
MyGradeDetailModel
implements
GradeDetailModel
{
companyId
:
string
countAverage
:
string
countEmployee
:
string
countScore
:
string
edesc
:
string
gradeDetail
:
string
gradeId
:
string
gradeMaxScore
:
number
gradeMinScore
:
number
tdesc
:
string
weight
:
number
constructor
(
data
?:
Partial
<
GradeDetailModel
>
)
{
this
.
companyId
=
data
?.
companyId
||
""
this
.
countAverage
=
data
?.
countAverage
||
""
this
.
countEmployee
=
data
?.
countEmployee
||
""
this
.
countScore
=
data
?.
countScore
||
""
this
.
edesc
=
data
?.
edesc
||
""
this
.
gradeDetail
=
data
?.
gradeDetail
||
""
this
.
gradeId
=
data
?.
gradeId
||
""
this
.
gradeMaxScore
=
data
?.
gradeMaxScore
??
0
this
.
gradeMinScore
=
data
?.
gradeMinScore
??
0
this
.
tdesc
=
data
?.
tdesc
||
""
this
.
weight
=
data
?.
weight
??
0
}
}
src/app/shared/model/competency.model.ts
View file @
d552254c
...
@@ -1722,7 +1722,9 @@ export interface CompetencyIndicatorsCourses1 {
...
@@ -1722,7 +1722,9 @@ export interface CompetencyIndicatorsCourses1 {
competencyCourse
:
CompetencyCourse
[]
competencyCourse
:
CompetencyCourse
[]
competencyCourseId
:
string
competencyCourseId
:
string
idpDevelopmentPlan
:
IdpDevelopmentPlan
|
null
idpDevelopmentPlan
:
IdpDevelopmentPlan
|
null
indicatorsCourses0
:
IndicatorsCourses0
indicatorsCourses0
:
IndicatorsCourses0
,
startDate
:
string
endDate
:
string
}
}
export
interface
BehavioralIndicator
{
export
interface
BehavioralIndicator
{
...
...
src/app/shared/model/idp-form.model.ts
View file @
d552254c
...
@@ -1464,6 +1464,8 @@ export interface CompetencyIndicatorsCourses1 {
...
@@ -1464,6 +1464,8 @@ export interface CompetencyIndicatorsCourses1 {
competencyCourse
:
CompetencyCourse
[]
competencyCourse
:
CompetencyCourse
[]
behavioralIndicators
:
BehavioralIndicator
[]
behavioralIndicators
:
BehavioralIndicator
[]
idpDevelopmentPlan
?:
IdpDevelopmentPlan
idpDevelopmentPlan
?:
IdpDevelopmentPlan
startDate
:
string
endDate
:
string
}
}
export
interface
IndicatorsCourses0
{
export
interface
IndicatorsCourses0
{
...
...
src/app/shared/model/pms-ealuation-factors.model.ts
→
src/app/shared/model/pms-e
v
aluation-factors.model.ts
View file @
d552254c
import
{
PLModel
,
MyPLModel
}
from
"./pl.model"
import
{
PLModel
,
MyPLModel
}
from
"./pl.model"
import
{
MyPmsE
aluationFactors1Model
,
PmsEaluationFactors1Model
}
from
"./pms-e
aluation-factors1.model"
import
{
MyPmsE
valuationFactors1Model
,
PmsEvaluationFactors1Model
}
from
"./pms-ev
aluation-factors1.model"
export
interface
PmsEvaluationFactorsModel
{
export
interface
PmsEvaluationFactorsModel
{
personalLevel
:
PLModel
personalLevel
:
PLModel
companyId
:
string
companyId
:
string
pmsEvaluationFactors1ModelList
:
PmsEaluationFactors1Model
[]
pmsEvaluationFactors1ModelList
:
PmsE
v
aluationFactors1Model
[]
}
}
export
class
MyPmsEvaluationFactorsModel
implements
PmsEvaluationFactorsModel
{
export
class
MyPmsEvaluationFactorsModel
implements
PmsEvaluationFactorsModel
{
personalLevel
:
PLModel
personalLevel
:
PLModel
companyId
:
string
companyId
:
string
pmsEvaluationFactors1ModelList
:
PmsEaluationFactors1Model
[]
pmsEvaluationFactors1ModelList
:
PmsE
v
aluationFactors1Model
[]
constructor
(
data
?:
Partial
<
PmsEvaluationFactorsModel
>
)
{
constructor
(
data
?:
Partial
<
PmsEvaluationFactorsModel
>
)
{
this
.
personalLevel
=
new
MyPLModel
(
data
?.
personalLevel
)
this
.
personalLevel
=
new
MyPLModel
(
data
?.
personalLevel
)
this
.
companyId
=
data
?.
companyId
||
""
this
.
companyId
=
data
?.
companyId
||
""
this
.
pmsEvaluationFactors1ModelList
=
data
?.
pmsEvaluationFactors1ModelList
?.
map
(
x
=>
new
MyPmsEaluationFactors1Model
(
x
))
||
[]
this
.
pmsEvaluationFactors1ModelList
=
data
?.
pmsEvaluationFactors1ModelList
?.
map
(
x
=>
new
MyPmsE
v
aluationFactors1Model
(
x
))
||
[]
}
}
}
}
src/app/shared/model/pms-ealuation-factors1.model.ts
→
src/app/shared/model/pms-e
v
aluation-factors1.model.ts
View file @
d552254c
import
{
MyPmstypeModel
,
PmstypeModel
}
from
"./pmstype.model"
;
import
{
MyPmstypeModel
,
PmstypeModel
}
from
"./pmstype.model"
;
export
interface
PmsEaluationFactors1Model
{
export
interface
PmsE
v
aluationFactors1Model
{
pmsType
:
PmstypeModel
pmsType
:
PmstypeModel
companyId
:
string
companyId
:
string
pmsScore
:
number
pmsScore
:
number
}
}
export
class
MyPmsE
aluationFactors1Model
implements
PmsE
aluationFactors1Model
{
export
class
MyPmsE
valuationFactors1Model
implements
PmsEv
aluationFactors1Model
{
pmsType
:
PmstypeModel
pmsType
:
PmstypeModel
companyId
:
string
companyId
:
string
pmsScore
:
number
pmsScore
:
number
constructor
(
data
?:
Partial
<
PmsEaluationFactors1Model
>
)
{
constructor
(
data
?:
Partial
<
PmsE
v
aluationFactors1Model
>
)
{
this
.
pmsType
=
new
MyPmstypeModel
(
data
?.
pmsType
)
this
.
pmsType
=
new
MyPmstypeModel
(
data
?.
pmsType
)
this
.
companyId
=
data
?.
companyId
||
""
this
.
companyId
=
data
?.
companyId
||
""
this
.
pmsScore
=
data
?.
pmsScore
??
0
this
.
pmsScore
=
data
?.
pmsScore
??
0
...
...
src/app/shared/services/com-evaluation-factors.service.ts
0 → 100644
View file @
d552254c
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
ComEvaluationFactorsModel
}
from
'../model/com-ealuation-factors.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
ComEvaluationFactorsService
{
api
=
"/com-evaluation-factors"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
ComEvaluationFactorsModel
[]
>
{
return
this
.
http
.
get
<
ComEvaluationFactorsModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
post
(
body
:
ComEvaluationFactorsModel
[]):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
}
\ No newline at end of file
src/app/shared/services/evaluation-assessment.service.ts
View file @
d552254c
...
@@ -19,14 +19,14 @@ export class EvaluationAssessmentService {
...
@@ -19,14 +19,14 @@ export class EvaluationAssessmentService {
getList
():
Observable
<
EvaluationCycleModel
[]
>
{
getList
():
Observable
<
EvaluationCycleModel
[]
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
[]
>
(
this
.
urlApi
+
"/lists"
)
return
this
.
http
.
get
<
EvaluationCycleModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
}
getById
(
evaluationRoundId
:
string
):
Observable
<
any
[]
>
{
getById
(
evaluationRoundId
:
string
,
apsyear
:
string
):
Observable
<
any
[]
>
{
return
this
.
http
.
get
<
any
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
return
this
.
http
.
get
<
any
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsyear
)
}
}
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
EvaluationModal
>
{
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
apsyear
:
string
):
Observable
<
EvaluationModal
>
{
return
this
.
http
.
get
<
EvaluationModal
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
return
this
.
http
.
get
<
EvaluationModal
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
+
"/"
+
apsyear
)
}
}
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
apsyear
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
+
"/"
+
apsyear
)
}
}
getIndicators
(
plId
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
getIndicators
(
plId
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/indicators/list/"
+
plId
)
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/indicators/list/"
+
plId
)
...
@@ -34,8 +34,8 @@ export class EvaluationAssessmentService {
...
@@ -34,8 +34,8 @@ export class EvaluationAssessmentService {
post
(
body
:
AppraisalModel
):
Observable
<
AlertModel
>
{
post
(
body
:
AppraisalModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
}
postList
(
body
:
any
):
Observable
<
AlertModel
>
{
postList
(
body
:
any
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/create-list"
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/create-list"
,
body
)
}
}
delete
(
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]):
Observable
<
AlertModel
>
{
delete
(
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]):
Observable
<
AlertModel
>
{
const
options
=
{
const
options
=
{
...
@@ -47,13 +47,13 @@ export class EvaluationAssessmentService {
...
@@ -47,13 +47,13 @@ export class EvaluationAssessmentService {
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
deletemMini
(
body
:
AppraisalRoundModel
[],
apsassessy
:
string
,
evaluationRoundId
:
string
):
Observable
<
AlertModel
>
{
deletemMini
(
body
:
AppraisalRoundModel
[],
apsassessy
:
string
,
evaluationRoundId
:
string
):
Observable
<
AlertModel
>
{
const
options
=
{
const
options
=
{
headers
:
new
HttpHeaders
({
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
}),
}),
body
:
body
body
:
body
};
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
+
'/delete-mini'
+
"/"
+
apsassessy
+
"/"
+
evaluationRoundId
,
options
)
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
+
'/delete-mini'
+
"/"
+
apsassessy
+
"/"
+
evaluationRoundId
,
options
)
}
}
}
}
src/app/shared/services/pms-evaluation-assessment.service.ts
View file @
d552254c
...
@@ -21,14 +21,14 @@ export class PmsEvaluationAssessmentService {
...
@@ -21,14 +21,14 @@ export class PmsEvaluationAssessmentService {
getList
():
Observable
<
EvaluationCycleModel
[]
>
{
getList
():
Observable
<
EvaluationCycleModel
[]
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
[]
>
(
this
.
urlApi
+
"/lists"
)
return
this
.
http
.
get
<
EvaluationCycleModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
}
getById
(
evaluationRoundId
:
string
):
Observable
<
PmsMasfromEvaluationFullModel
[]
>
{
getById
(
evaluationRoundId
:
string
,
apsyear
:
string
):
Observable
<
PmsMasfromEvaluationFullModel
[]
>
{
return
this
.
http
.
get
<
PmsMasfromEvaluationFullModel
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
return
this
.
http
.
get
<
PmsMasfromEvaluationFullModel
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsyear
)
}
}
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
EvaluationModal
>
{
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
apsyear
:
string
):
Observable
<
EvaluationModal
>
{
return
this
.
http
.
get
<
EvaluationModal
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
return
this
.
http
.
get
<
EvaluationModal
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
+
"/"
+
apsyear
)
}
}
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
MasfromEvaluationAssessment1lList
[]
>
{
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
apsyear
:
string
):
Observable
<
MasfromEvaluationAssessment1lList
[]
>
{
return
this
.
http
.
get
<
MasfromEvaluationAssessment1lList
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
return
this
.
http
.
get
<
MasfromEvaluationAssessment1lList
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
+
"/"
+
apsyear
)
}
}
getIndicators
(
plId
:
string
):
Observable
<
MasfromEvaluationAssessment1lList
[]
>
{
getIndicators
(
plId
:
string
):
Observable
<
MasfromEvaluationAssessment1lList
[]
>
{
return
this
.
http
.
get
<
MasfromEvaluationAssessment1lList
[]
>
(
this
.
urlApi
+
"/pms-topic/list/"
+
plId
)
return
this
.
http
.
get
<
MasfromEvaluationAssessment1lList
[]
>
(
this
.
urlApi
+
"/pms-topic/list/"
+
plId
)
...
@@ -36,8 +36,8 @@ export class PmsEvaluationAssessmentService {
...
@@ -36,8 +36,8 @@ export class PmsEvaluationAssessmentService {
post
(
body
:
PmsMasfromEvaluationFullModel
):
Observable
<
AlertModel
>
{
post
(
body
:
PmsMasfromEvaluationFullModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
}
postList
(
body
:
any
):
Observable
<
AlertModel
>
{
postList
(
body
:
any
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/create-list"
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/create-list"
,
body
)
}
}
delete
(
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]):
Observable
<
AlertModel
>
{
delete
(
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]):
Observable
<
AlertModel
>
{
const
options
=
{
const
options
=
{
...
@@ -49,13 +49,13 @@ export class PmsEvaluationAssessmentService {
...
@@ -49,13 +49,13 @@ export class PmsEvaluationAssessmentService {
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
deletemMini
(
body
:
AppraisalRoundModel
[],
apsassessy
:
string
,
evaluationRoundId
:
string
):
Observable
<
AlertModel
>
{
deletemMini
(
body
:
AppraisalRoundModel
[],
apsassessy
:
string
,
evaluationRoundId
:
string
):
Observable
<
AlertModel
>
{
const
options
=
{
const
options
=
{
headers
:
new
HttpHeaders
({
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
}),
}),
body
:
body
body
:
body
};
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
+
'/delete-mini'
+
"/"
+
apsassessy
+
"/"
+
evaluationRoundId
,
options
)
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
+
'/delete-mini'
+
"/"
+
apsassessy
+
"/"
+
evaluationRoundId
,
options
)
}
}
}
}
src/app/shared/services/pms-ealuation-factors.service.ts
→
src/app/shared/services/pms-e
v
aluation-factors.service.ts
View file @
d552254c
...
@@ -3,13 +3,13 @@ import { Injectable } from '@angular/core';
...
@@ -3,13 +3,13 @@ import { Injectable } from '@angular/core';
import
{
Observable
}
from
'rxjs'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
PmsEvaluationFactorsModel
}
from
'../model/pms-ealuation-factors.model'
;
import
{
PmsEvaluationFactorsModel
}
from
'../model/pms-e
v
aluation-factors.model'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'root'
providedIn
:
'root'
})
})
export
class
PmsEaluationFactorsService
{
export
class
PmsE
v
aluationFactorsService
{
api
=
"/pms-ealuation-factors"
api
=
"/pms-e
v
aluation-factors"
urlApi
=
environment
.
baseUrl
+
this
.
api
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
constructor
(
private
http
:
HttpClient
)
{
}
}
...
...
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