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
9b4fec34
Commit
9b4fec34
authored
Feb 22, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compentency pms
parent
a19d8b26
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
589 additions
and
522 deletions
+589
-522
edit-group-competencies.component.ts
...t-group-competencies/edit-group-competencies.component.ts
+1
-1
grade-management.component.html
...stration/grade-management/grade-management.component.html
+7
-7
grade-management.component.ts
...gistration/grade-management/grade-management.component.ts
+25
-21
group-grade.component.html
...n/grade-management/group-grade/group-grade.component.html
+6
-5
group-grade.component.ts
...ion/grade-management/group-grade/group-grade.component.ts
+8
-1
sub-grade-registration.component.html
...-grade-registration/sub-grade-registration.component.html
+18
-14
sub-grade-registration.component.ts
...ub-grade-registration/sub-grade-registration.component.ts
+49
-20
grade-registration.component.ts
...ssment/grade-registration/grade-registration.component.ts
+0
-1
evaluation-cycle-performance.component.html
...e-performance/evaluation-cycle-performance.component.html
+3
-6
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+136
-89
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+133
-78
define-evaluation-factors.component.html
...aluation-factors/define-evaluation-factors.component.html
+18
-4
define-evaluation-factors.component.ts
...evaluation-factors/define-evaluation-factors.component.ts
+4
-2
assessment-system-configuration.component.html
...figuration/assessment-system-configuration.component.html
+120
-31
assessment-system-configuration.component.scss
...figuration/assessment-system-configuration.component.scss
+0
-152
assessment-system-configuration.component.ts
...onfiguration/assessment-system-configuration.component.ts
+49
-78
setting-performance-evalution.component.html
...ce-evalution/setting-performance-evalution.component.html
+3
-3
competency-grades.model.ts
src/app/shared/model/competency-grades.model.ts
+9
-9
No files found.
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.ts
View file @
9b4fec34
...
...
@@ -129,7 +129,7 @@ export class EditGroupCompetenciesComponent {
dataListModalFilter
()
{
return
this
.
dataListModal
.
filter
(
x
=>
{
const
data
=
x
.
data
if
(
this
.
dataList
.
some
(
y
=>
y
.
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
expectation
==
data
.
competencyIndicatorsCourses0
.
expectation
))
{
if
(
this
.
dataList
.
some
(
y
=>
y
.
data
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
==
data
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
))
{
return
}
const
match
=
data
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
.
toLowerCase
().
includes
(
this
.
searchModal
.
toLowerCase
())
||
...
...
src/app/components/competency-assessment/grade-registration/grade-management/grade-management.component.html
View file @
9b4fec34
<ng-container
*
ngIf=
"!typeTab"
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex pr-2"
>
<div
class=
"flex"
>
<div
class=
"flex items-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox pointer-events-none"
id=
"hs-default-checkbox"
[(
ngModel
)]="
isDataListChecked
"
>
<label
for=
"hs-default-checkbox"
class=
"text-sm text-gray-500 mx-2 pointer-events-none"
>
{{numDataListChecked}} Selected
</label>
</div>
<div
class=
"mx-1 flex items-center"
>
<button
(
click
)="
dataListCheckAll
()"
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;
dataListCheckAll()"
class=
"focus:ring-2 focus:ring-primary rounded-sm flex item-center"
>
<i
class=
"fs-l transition-all duration-200"
[
ngClass
]="{'
ri-checkbox-multiple-line
text-gray-500
'
:
!
isDataListCheckedAll
,
'
ri-checkbox-multiple-fill
text-primary
'
:
isDataListCheckedAll
}"
></i>
</button>
<label
class=
"text-sm text-gray-500 ml-2"
(
click
)="
dataListCheckAll
()"
>
Select All
</label>
</div>
<label
class=
"text-sm text-gray-500 ml-2"
>
Select All
</label>
</div>
</div>
<div
class=
"flex justify-end"
>
...
...
@@ -156,7 +156,7 @@
data-hs-overlay=
"#grade-management-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-
success
"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-
danger
"
href=
"javascript:void(0);"
data-hs-overlay=
"#grade-management-alert-delete-modal"
(
click
)="
deleteCompetencyGroupGradeList
();"
>
ลบข้อมูล
...
...
@@ -170,8 +170,8 @@
<ng-container
*
ngIf=
"typeTab"
>
<app-group-grade
[
dataSelect
]="
dataSelect
"
[
typeTab
]="
typeTab
"
(
send
BackTab
)="
pathTitleChange
($
event
)"
(
send
DataList
)="
dataList=
$event"
></app-group-grade>
<app-group-grade
[
dataSelect
]="
dataSelect
"
[
typeTab
]="
typeTab
"
(
sendBackTab
)="
pathTitleChange
($
event
)"
(
sendDataList
)="
dataList=
$event"
></app-group-grade>
</ng-container>
<!-- <ng-container *ngIf="editTab">
...
...
src/app/components/competency-assessment/grade-registration/grade-management/grade-management.component.ts
View file @
9b4fec34
...
...
@@ -22,8 +22,9 @@ export class GradeManagementComponent {
typeTab
:
""
|
"add"
|
"edit"
=
""
;
currentPage
=
1
;
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
numDataListChecked
=
0
;
isDataListCheckedAll
=
false
;
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
search
=
''
;
dataList
:
DataModel
[]
=
[];
...
...
@@ -46,8 +47,10 @@ export class GradeManagementComponent {
this
.
competencyGroupGradeService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
code
:
x
.
groupGradeId
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
competencyGrades
:
x
.
competencyGrades
}))
this
.
dataLoading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
()
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
dataLoading
=
false
...
...
@@ -76,33 +79,16 @@ export class GradeManagementComponent {
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
()
}
dataListFilter
()
{
return
this
.
dataList
.
filter
((
x
)
=>
{
const
match
=
x
.
code
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
if
(
!
match
)
x
.
check
=
false
;
return
match
;
});
}
dataListCheck
()
{
const
dataCheck
=
this
.
dataListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
((
x
)
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
dataCheck
.
filter
((
x
)
=>
x
.
check
).
length
;
}
dataListCheckAll
()
{
this
.
isDataListCheckedAll
=
!
this
.
isDataListCheckedAll
;
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
dataList
=
this
.
dataList
.
filter
((
x
)
=>
{
const
match
=
x
.
code
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
if
(
!
match
)
x
.
check
=
false
;
return
match
;
}).
map
((
x
)
=>
({
...
x
,
check
:
selectAll
}));
this
.
dataListCheck
();
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
...
...
@@ -112,6 +98,7 @@ export class GradeManagementComponent {
deleteCompetencyGroupGradeList
()
{
const
body
=
this
.
dataSelect
.
code
?
new
MyCompetencyGroupGradeModel
({
groupGradeId
:
this
.
dataSelect
.
code
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
})
:
this
.
dataList
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyCompetencyGroupGradeModel
({
groupGradeId
:
x
.
code
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
}))
this
.
dataLoading
=
true
this
.
competencyGroupGradeService
.
delete
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -119,10 +106,27 @@ export class GradeManagementComponent {
this
.
getCompetencyGroupGradeList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
dataListCheckAll
()
{
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
dataListFilter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
dataListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
dataList
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
src/app/components/competency-assessment/grade-registration/grade-management/group-grade/group-grade.component.html
View file @
9b4fec34
...
...
@@ -14,8 +14,8 @@
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-10 m-0 shadow-md"
[
ngClass
]="{'
ti-btn-disabled
'
:
!
dataSelect
.
code
}"
data-hs-overlay=
"#add-group-grade-alert-add-modal
"
[
disabled
]="!
dataSelect
.
code
"
>
[
ngClass
]="{'
ti-btn-disabled
'
:
!
dataSelect
.
code
||!
dataSelect
.
tdesc
}
"
data-hs-overlay=
"#add-group-grade-alert-add-modal"
[
disabled
]="!
dataSelect
.
code
||!
dataSelect
.
tdesc
"
>
<i
class=
"ri-save-3-line"
></i>
Save
</button>
...
...
@@ -65,8 +65,9 @@
<div
class=
"pt-50px"
>
<div
*
ngIf=
"currentTab==1"
id=
"card-type-1"
role=
"tabpanel"
aria-labelledby=
"card-type-item-1"
>
<div
class=
"page px-rem"
>
<label
for=
"input-label"
class=
"ti-form-label"
>
กำหนดรหัสกลุ่มเกรด
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/4"
[(
ngModel
)]="
dataSelect
.
code
"
>
<label
for=
"input-label"
class=
"ti-form-label"
>
กำหนดรหัสกลุ่มเกรด*
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/4"
[
readonly
]="
typeTab =
=
'
edit
'"
[
class
.
bg-input-readonly
]="
typeTab =
=
'
edit
'"
[(
ngModel
)]="
dataSelect
.
code
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (ไทย)*
</label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
...
...
@@ -111,7 +112,7 @@
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#add-group-grade-alert-add-modal"
(
click
)="
postCompetencyGroupGrade
()"
>
เพิ่ม
ข้อมูล
บันทึก
ข้อมูล
</a>
</div>
</div>
...
...
src/app/components/competency-assessment/grade-registration/grade-management/group-grade/group-grade.component.ts
View file @
9b4fec34
...
...
@@ -30,12 +30,19 @@ export class GroupGradeComponent implements OnInit {
this
.
dataOriginal
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataSelect
||
{
check
:
false
,
code
:
''
,
tdesc
:
''
,
edesc
:
''
,
competencyGrades
:
[]
}))
}
clear
()
{
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataOriginal
||
{
check
:
false
,
code
:
''
,
tdesc
:
''
,
edesc
:
''
,
competencyGrades
:
[]
}))
if
(
this
.
typeTab
==
'add'
)
{
this
.
dataSelect
=
{
check
:
false
,
code
:
''
,
tdesc
:
''
,
edesc
:
''
,
competencyGrades
:
[]
}
this
.
cdr
.
detectChanges
()
}
else
if
(
this
.
typeTab
==
'edit'
)
{
this
.
dataSelect
=
{
check
:
false
,
code
:
this
.
dataOriginal
.
code
,
tdesc
:
''
,
edesc
:
''
,
competencyGrades
:
[]
}
this
.
cdr
.
detectChanges
()
}
}
backTab
()
{
this
.
sendBackTab
.
emit
();
}
postCompetencyGroupGrade
()
{
console
.
log
(
this
.
dataSelect
)
this
.
competencyGroupGradeService
.
post
(
new
MyCompetencyGroupGradeModel
({
groupGradeId
:
this
.
dataSelect
.
code
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
competencyGrades
:
this
.
dataSelect
.
competencyGrades
})).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
src/app/components/competency-assessment/grade-registration/grade-management/sub-grade-registration/sub-grade-registration.component.html
View file @
9b4fec34
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex pr-2"
>
<div
class=
"flex"
>
<div
class=
"flex items-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox pointer-events-none"
id=
"hs-default-checkbox"
[(
ngModel
)]="
isDataListChecked
"
>
<label
for=
"hs-default-checkbox"
class=
"text-sm text-gray-500 mx-2 pointer-events-none"
>
{{numDataListChecked}} Selected
</label>
</div>
<div
class=
"mx-1 flex items-center"
>
<button
(
click
)="
dataListCheckAll
()"
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;
dataListCheckAll()"
class=
"focus:ring-2 focus:ring-primary rounded-sm flex item-center"
>
<i
class=
"fs-l transition-all duration-200"
[
ngClass
]="{'
ri-checkbox-multiple-line
text-gray-500
'
:
!
isDataListCheckedAll
,
'
ri-checkbox-multiple-fill
text-primary
'
:
isDataListCheckedAll
}"
></i>
</button>
<label
class=
"text-sm text-gray-500 ml-2"
(
click
)="
dataListCheckAll
()"
>
Select All
</label>
</div>
<label
class=
"text-sm text-gray-500 ml-2"
>
Select All
</label>
</div>
</div>
<div
class=
"flex justify-end"
>
...
...
@@ -38,7 +38,7 @@
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
data-hs-overlay=
"#sub-grade-registration-alert-delete-modal"
(
click
)="
selectData
();
modalStatus=
'delete'
"
>
(
click
)="
selectData
();
modalStatus=
'delete
Group
'
"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</button>
...
...
@@ -158,7 +158,7 @@
<div
class=
"ti-modal-center"
>
<div
class=
"flex justify-end"
style=
"padding-right: 1rem;"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clear
()"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
...
...
@@ -220,9 +220,10 @@
<div
class=
"w-1/2 pl-2"
>
<label
class=
"ti-form-label"
>
น้ำหนัก
</label>
<div
class=
"relative flex rounded-md"
>
<input
type=
"
number
"
id=
"hs-leading-button-add-on-with-icon-and-button"
<input
type=
"
text
"
id=
"hs-leading-button-add-on-with-icon-and-button"
name=
"hs-leading-button-add-on-with-icon-and-button"
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
competencyGrade
.
select
.
weight
"
>
</div>
</div>
...
...
@@ -231,18 +232,20 @@
<div
class=
"w-1/2 pr-2"
>
<label
class=
"ti-form-label"
>
คะแนนต่ำสุด *
</label>
<div
class=
"relative flex rounded-md"
>
<input
type=
"
number
"
id=
"hs-leading-button-add-on-with-icon-and-button"
<input
type=
"
text
"
id=
"hs-leading-button-add-on-with-icon-and-button"
name=
"hs-leading-button-add-on-with-icon-and-button"
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
competencyGrade
.
select
.
gradeMinScore
"
>
</div>
</div>
<div
class=
"w-1/2 pl-2"
>
<label
class=
"ti-form-label"
>
คะแนนสูงสุด *
</label>
<div
class=
"relative flex rounded-md"
>
<input
type=
"
number
"
id=
"hs-leading-button-add-on-with-icon-and-button"
<input
type=
"
text
"
id=
"hs-leading-button-add-on-with-icon-and-button"
name=
"hs-leading-button-add-on-with-icon-and-button"
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
competencyGrade
.
select
.
gradeMaxScore
"
>
</div>
</div>
...
...
@@ -253,11 +256,12 @@
data-hs-overlay=
"#sub-grade-registration-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-grade-registration-alert-modal"
>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#sub-grade-registration-alert-modal"
[
class
.
ti-btn-disabled
]="!
competencyGrade
.
select
.
gradeId
||!
competencyGrade
.
select
.
tdesc
||!
competencyGrade
.
select
.
gradeDetail
||
checkNumberEmpty
(
competencyGrade
.
select
.
gradeMinScore
)||
checkNumberEmpty
(
competencyGrade
.
select
.
gradeMaxScore
)"
[
disabled
]="!
competencyGrade
.
select
.
gradeId
||!
competencyGrade
.
select
.
tdesc
||!
competencyGrade
.
select
.
gradeDetail
||
checkNumberEmpty
(
competencyGrade
.
select
.
gradeMinScore
)||
checkNumberEmpty
(
competencyGrade
.
select
.
gradeMaxScore
)"
>
บันทึกข้อมูล
</a>
</button>
</div>
</div>
</div>
...
...
@@ -325,7 +329,7 @@
data-hs-overlay=
"#sub-grade-registration-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-
success
"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-
danger
"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-grade-registration-alert-delete-modal"
(
click
)="
updateCompetencyGroupGrade
()"
>
ลบข้อมูล
...
...
src/app/components/competency-assessment/grade-registration/grade-management/sub-grade-registration/sub-grade-registration.component.ts
View file @
9b4fec34
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
,
SimpleChanges
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
CompetencyGradeModel
,
MyCompetencyGradeModel
}
from
'src/app/shared/model/competency-grades.model'
;
import
{
MyCompetencyGroupGradeModel
}
from
'src/app/shared/model/competency-group-grade.model'
;
...
...
@@ -23,10 +23,11 @@ export class SubGradeRegistrationComponent {
competencyGrade
:
{
select
:
CompetencyGradeModel
,
dataList
:
{
check
:
boolean
,
data
:
CompetencyGradeModel
}[]
}
=
{
select
:
new
MyCompetencyGradeModel
({}),
dataList
:
[]
}
currentPage
=
1
;
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
numDataListChecked
=
0
;
isDataListCheckedAll
=
false
;
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
search
=
''
;
modalStatus
:
'add'
|
'edit'
|
'delete'
=
'add'
modalStatus
:
'add'
|
'edit'
|
'delete'
|
'deleteGroup'
=
'add'
constructor
(
private
toastr
:
ToastrService
,
private
competencyGroupGradeService
:
CompetencyGroupGradeService
,
private
cdr
:
ChangeDetectorRef
...
...
@@ -36,10 +37,20 @@ export class SubGradeRegistrationComponent {
this
.
competencyGrade
.
dataList
=
this
.
dataSelect
.
competencyGrades
.
map
(
x
=>
({
check
:
false
,
data
:
x
}))
this
.
searchChange
()
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
changes
)
{
this
.
competencyGrade
.
dataList
=
changes
[
'dataSelect'
].
currentValue
.
competencyGrades
.
map
((
x
:
CompetencyGradeModel
)
=>
({
check
:
false
,
data
:
x
}))
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
()
}
}
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
();
}
selectData
(
data
?:
{
check
:
boolean
,
data
:
CompetencyGradeModel
})
{
...
...
@@ -50,28 +61,22 @@ export class SubGradeRegistrationComponent {
return
this
.
competencyGrade
.
dataList
.
filter
((
x
)
=>
{
const
data
=
x
.
data
const
match
=
data
.
gradeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
if
(
!
match
)
x
.
check
=
false
;
return
match
;
});
}
dataListCheck
()
{
const
dataCheck
=
this
.
dataListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
dataCheck
.
filter
((
x
)
=>
x
.
check
).
length
;
}
dataListCheckAll
()
{
this
.
isDataListCheckedAll
=
!
this
.
isDataListCheckedAll
;
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
competencyGrade
.
dataList
=
this
.
competencyGrade
.
dataList
.
filter
((
x
)
=>
{
const
data
=
x
.
data
const
match
=
data
.
gradeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
if
(
!
match
)
x
.
check
=
false
;
return
match
;
}).
map
(
x
=>
({
...
x
,
check
:
selectAll
}));
this
.
dataListFilter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
dataListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
competencyGrade
.
dataList
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
updateCompetencyGroupGrade
()
{
switch
(
this
.
modalStatus
)
{
case
'add'
:
{
...
...
@@ -85,12 +90,17 @@ export class SubGradeRegistrationComponent {
break
}
case
'delete'
:
{
this
.
competencyGrade
.
dataList
=
this
.
competencyGrade
.
select
.
gradeId
?
this
.
competencyGrade
.
dataList
.
filter
(
x
=>
x
.
data
.
gradeId
!=
this
.
competencyGrade
.
select
.
gradeId
)
:
this
.
competencyGrade
.
dataList
.
filter
(
x
=>
!
x
.
check
)
this
.
competencyGrade
.
dataList
=
this
.
competencyGrade
.
dataList
.
filter
(
x
=>
this
.
competencyGrade
.
select
.
gradeId
!=
x
.
data
.
gradeId
)
this
.
cdr
.
detectChanges
()
break
}
case
'deleteGroup'
:
{
this
.
competencyGrade
.
dataList
=
this
.
competencyGrade
.
dataList
.
filter
(
x
=>
!
x
.
check
)
this
.
cdr
.
detectChanges
()
break
}
}
this
.
sendDataSelect
.
emit
({
...
this
.
dataSelect
,
competencyGrades
:
this
.
competencyGrade
.
dataList
.
map
(
x
=>
x
.
data
)
})
this
.
sendDataSelect
.
emit
({
...
this
.
dataSelect
,
competencyGrades
:
this
.
competencyGrade
.
dataList
.
map
(
x
=>
({
...
x
.
data
,
weight
:
+
(
x
.
data
.
weight
||
'0'
),
gradeMinScore
:
+
(
x
.
data
.
gradeMinScore
||
'0'
),
gradeMaxScore
:
+
(
x
.
data
.
gradeMaxScore
||
'0'
)
})
)
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
...
...
@@ -99,5 +109,24 @@ export class SubGradeRegistrationComponent {
});
}
clear
()
{
if
(
this
.
modalStatus
==
'add'
)
{
this
.
competencyGrade
.
select
=
new
MyCompetencyGradeModel
({})
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
competencyGrade
.
select
=
new
MyCompetencyGradeModel
({
gradeId
:
this
.
competencyGrade
.
select
.
gradeId
})
}
}
checkNumberEmpty
(
data
:
any
)
{
if
(
typeof
(
data
)
==
'number'
)
{
if
(
data
==
0
)
{
return
false
}
}
else
{
if
(
data
==
null
||
data
==
undefined
||
data
==
""
)
{
return
true
}
}
return
false
}
}
src/app/components/competency-assessment/grade-registration/grade-registration.component.ts
View file @
9b4fec34
...
...
@@ -7,5 +7,4 @@ import { Component } from '@angular/core';
})
export
class
GradeRegistrationComponent
{
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'ทะเบียนเกรด'
,
'การจัดการเกรด'
]
groupShow
=
'1'
}
src/app/components/performance-management-evaluation/evaluation-cycle-performance/evaluation-cycle-performance.component.html
View file @
9b4fec34
...
...
@@ -8,14 +8,13 @@
<div
class=
"page pt-0.75rem"
>
<div
class=
"border-b border-gray-200 dark:border-white/10 px-2rem"
>
<nav
class=
"-mb-0.5 flex space-x-6 rtl:space-x-reverse"
>
<a
class=
"
text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70
hover:text-secondary active"
<a
class=
"
font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500
hover:text-secondary active"
href=
"javascript:void(0);"
id=
"underline-item-1"
data-hs-tab=
"#underline-1"
aria-controls=
"underline-1"
(
click
)="
activeTab=
'underline-1'
;
pathTitle =
['การประเมินจัดการประสิทธิภาพ','รอบประเมิน','รอบการประเมิน']"
>
รอบการประเมิน
</a>
<!-- <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary"
<!-- <a class="font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary"
href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2"
aria-controls="underline-2"
(click)="activeTab='underline-2';pathTitle = ['การประเมินจัดการประสิทธิภาพ','รอบประเมิน','กำหนดฟอร์มเอกสาร']">
...
...
@@ -23,7 +22,7 @@
</a> -->
</nav>
</div>
<div
class=
"px-2rem
pt-50px
"
>
<div
class=
"px-2rem
"
[
ngClass
]="{'
pt-50px
'
:
groupShow
!==
'
2
'}
"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
*
ngIf=
"activeTab === 'underline-1'"
>
<app-management-evaluation-cycle></app-management-evaluation-cycle>
...
...
@@ -35,7 +34,6 @@
<app-edit-evaluation-form
*
ngIf=
"groupShow=='2'"
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-edit-evaluation-form>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
9b4fec34
...
...
@@ -9,12 +9,12 @@
{{numDataListChecked}} Selected
</label>
</div>
<div
class=
"mx-1 flex items-center"
>
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;dataListCheckAll()"
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;dataListCheckAll()"
id=
"check-boxall"
class=
"focus:ring-2 focus:ring-primary rounded-sm flex item-center"
>
<i
class=
"fs-l transition-all duration-200"
[
ngClass
]="{'
ri-checkbox-multiple-line
text-gray-500
'
:
!
isDataListCheckedAll
,
'
ri-checkbox-multiple-fill
text-primary
'
:
isDataListCheckedAll
}"
></i>
</button>
<label
class=
"text-sm text-gray-500 ml-2"
>
Select All
</label>
<label
class=
"text-sm text-gray-500 ml-2"
for=
"check-boxall"
>
Select All
</label>
</div>
</div>
</div>
...
...
@@ -23,7 +23,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
style=
"height: 40px;"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -31,21 +31,21 @@
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-
45
px m-0 shadow-md"
(
click
)="
modalStatus=
'add'
;
dataListSelect
()"
data-hs-overlay=
"#evaluation-cycle-modal
"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-
20
px m-0 shadow-md"
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
(
click
)="
modalStatus=
'add'
;
setData
()
"
>
<i
class=
"ri-add-line"
></i>
Add
</button>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-
45
px m-0 shadow-md"
data-hs-overlay=
"#
evaluation-cycle-delete-modal
"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-
20
px m-0 shadow-md"
data-hs-overlay=
"#
management-evaluation-cycle-page-alert-modal"
(
click
)="
modalStatus=
'deleteGroup'
;
setData
()
"
>
<i
class=
"ti ti-trash fs-l"
></i>
Delete
</button>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-
45
px m-0 shadow-md"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-
20
px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
...
...
@@ -60,55 +60,73 @@
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<ng-container
*
ngFor=
"let item of ['
รหัส','รายละเอียด','รอบปีการประเมิน','วันที่เริ่มต้น','วันที่สิ้นสุด','สถานะ','Action
']; let f = first; let l = last"
>
*
ngFor=
"let item of ['
','รหัส','รายละเอียด','รอบปีการประเมิน','วันที่เริ่มต้น','วันที่สิ้นสุด','สถานะ','การจัดการ
']; let f = first; let l = last"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l"
>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!
f&&!
l"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"!dataListFilter().length"
>
<tbody
*
ngIf=
"dataLoading"
>
<tr>
<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"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&!evaluation_cycleListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"
data
ListFilter().length"
>
<tbody
*
ngIf=
"
!dataLoading&&evaluation_cycle
ListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"flex justify-around"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
<label>
{{item.code}}
</label>
*
ngFor=
"let item of evaluation_cycleListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.data.evaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
</td>
<td>
{{item.period}}
</td>
<td>
{{item.year}}
</td>
<td>
{{item.startDate}}
</td>
<td>
{{item.endDate}}
</td>
<td>
<label
for=
"checkbox-{{item.data.evaluationRoundId}}"
>
{{item.data.evaluationRoundId}}
</label>
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.apsyear}}
</td>
<td>
{{item.data.apsPeriodStart}}
</td>
<td>
{{item.data.apsPeriodEnd}}
</td>
<td>
<span
class=
"flex justify-center items-center rounded-full h-5 w-5 text-white"
[
ngClass
]="{'
bg-success
'
:item
.
status=
='1','bg-warning':item.status=='2','bg-gray-400':item.status=='3
'}"
>
<ng-container
[
ngSwitch
]="
item
.
status
"
>
[
ngClass
]="{'
bg-success
'
:item
.
data
.
statusCode
.
code=
='0','bg-warning':item.data.statusCode.code=='1','bg-gray-400':item.data.statusCode.code=='2
'}"
>
<ng-container
[
ngSwitch
]="
item
.
data
.
statusCode
.
code
"
>
<span
class=
"hs-tooltip ti-main-tooltip flex items-center"
>
<i
*
ngSwitchCase=
"'1'"
class=
"ti ti-clock hs-tooltip-toggle"
></i>
<span
class=
"hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700"
role=
"tooltip"
>
กำลังดำเนินการประเมิน
<i
*
ngSwitchCase=
"'0'"
class=
"ti ti-clock hs-tooltip-toggle"
></i>
<span
class=
"hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700"
role=
"tooltip"
>
{{item.data.statusCode.tdesc}}
</span>
</span>
<span
class=
"hs-tooltip ti-main-tooltip flex items-center"
>
<i
*
ngSwitchCase=
"'2'"
class=
"ti ti-hourglass-empty hs-tooltip-toggle"
></i>
<span
class=
"hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700"
role=
"tooltip"
>
รอดำเนินการ
<i
*
ngSwitchCase=
"'1'"
class=
"ti ti-hourglass-empty hs-tooltip-toggle"
></i>
<span
class=
"hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700"
role=
"tooltip"
>
{{item.data.statusCode.tdesc}}
</span>
</span>
<span
class=
"hs-tooltip ti-main-tooltip flex items-center"
>
<i
*
ngSwitchCase=
"'3'"
class=
"ti ti-check hs-tooltip-toggle"
></i>
<span
class=
"hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700"
role=
"tooltip"
>
สิ้นสุดช่วงเวลาประเมิน
<i
*
ngSwitchCase=
"'2'"
class=
"ti ti-check hs-tooltip-toggle"
></i>
<span
class=
"hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700"
role=
"tooltip"
>
{{item.data.statusCode.tdesc}}
</span>
</span>
<span
*
ngSwitchDefault
></span>
...
...
@@ -116,12 +134,32 @@
</span>
</td>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
dataListSelect
(
item
)"
data-hs-overlay=
"#evaluation-cycle-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-delete-modal"
></i>
<span
class=
"badge text-white m-1"
[
ngClass
]="{'
bg-primary
'
:item
.
status=
='1','bg-gray-400':item.status!='1'}"
>
ปิดรอบประเมิน
</span>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#management-evaluation-cycle-person-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
></i>
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
[ngClass]="{'bg-primary':item.data.statusCode.code=='1','bg-gray-400':item.data.statusCode.code!='3'}">ปิดรอบประเมิน</span>
<span class="badge text-white m-1 bg-secondary" *ngIf="item.data.statusCode.code=='0'">สร้างแบบฟอร์ม</span> -->
<span
class=
"badge text-white m-1"
*
ngIf=
"item.data.statusCode.code == '0'"
[
ngClass
]="{
'
bg-primary
'
:
item
.
data
.
statusCode
.
code =
=
'
0
',
'
text-white
'
:
item
.
data
.
statusCode
.
code =
=
'
0
'
}"
>
ปิดรอบประเมิน
</span>
<span
class=
"badge text-white m-1"
*
ngIf=
"item.data.statusCode.code == '1'"
[
ngClass
]="{
'
bg-secondary
'
:
item
.
data
.
statusCode
.
code =
=
'
1
',
'
text-white
'
:
item
.
data
.
statusCode
.
code =
=
'
1
'
}"
>
สร้างแบบฟอร์ม
</span>
<span
class=
"badge text-white m-1"
*
ngIf=
"item.data.statusCode.code == '2'"
[
ngClass
]="{
'
bg-gray-400
'
:
item
.
data
.
statusCode
.
code =
=
'
2
',
'
text-white
'
:
item
.
data
.
statusCode
.
code =
=
'
2
'
}"
>
ปิดรอบประเมิน
</span>
</td>
</tr>
</tbody>
...
...
@@ -158,11 +196,16 @@
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{evaluation_cycleListFilter().length
<10
?
evaluation_cycleListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
evaluation_cycleListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
evaluation_cycleListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
<div
id=
"evaluation-cycle-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"management-evaluation-cycle-page-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -171,7 +214,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#
evaluation-cycl
e-modal"
>
data-hs-overlay=
"#
management-evaluation-cycle-pag
e-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -205,35 +248,45 @@
</div>
</div>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัส รอบการประเมิน
*
</label>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัส รอบการประเมิน*
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
code
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย) *
</label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
period
"
>
[(
ngModel
)]="
dataSelect
.
evaluationRoundId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)*
</label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ปีการประเมิน
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
year
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ช่วงเวลารอบการประเมิน
</label>
<input
type=
"text"
name=
"daterange"
id=
"inlinetime"
ngxDaterangepickerMd
class=
"form-control ti-form-input focus:z-10 flatpickr-input"
readonly
/>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
edesc
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ปีการประเมิน*
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
dataSelect
.
apsyear
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
เริ่มวันที่*
</label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
apsPeriodStart
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
สิ้นสุดวันที่*
</label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
apsPeriodEnd
"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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 dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#
evaluation-cycl
e-modal"
>
data-hs-overlay=
"#
management-evaluation-cycle-pag
e-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
[
disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
บันทึกข้อมูล
</
a
>
</
button
>
</div>
</div>
</div>
</div>
</div>
<div
id=
"
evaluation-cycl
e-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"
management-evaluation-cycle-pag
e-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -241,68 +294,62 @@
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#evaluation-cycl
e-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-pag
e-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</ng-container>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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 dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#evaluation-cycl
e-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-pag
e-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
(
click
)="
addevaluation_cycle
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"evaluation-cycle-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#evaluation-cycle-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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 dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#evaluation-cycle-delete
-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-page-alert
-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#evaluation-cycle-delete-modal"
>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
(
click
)="
deleteevaluation_cycle
()"
>
ลบข้อมูล
</a>
</ng-container>
</div>
</div>
</div>
</div>
</div>
<div
id=
"evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"
management-
evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -311,7 +358,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#evaluation-cycle-person-modal"
>
data-hs-overlay=
"#
management-
evaluation-cycle-person-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
9b4fec34
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
export
interface
DataModel
{
check
:
boolean
,
code
:
string
,
period
:
string
,
year
:
string
,
startDate
:
string
,
endDate
:
string
,
status
:
string
evaluationRoundId
:
string
;
tdesc
:
string
;
edesc
:
string
;
apsyear
:
string
;
apsPeriodStart
:
string
;
apsPeriodEnd
:
string
;
status
Code
:
StatusCodeModel
;
}
@
Component
({
selector
:
'app-management-evaluation-cycle'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
styleUrls
:
[
'./management-evaluation-cycle.component.scss'
]
})
export
class
ManagementCycleComponent
{
apsPeriodStart
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
numDataListChecked
=
0
modalStatus
=
'add'
evaluation_cyclelist
:
{
check
:
boolean
,
data
:
DataModel
}[]
=
[]
evaluation_cycle
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
({})
dataLoading
=
false
dataSelect
:
DataModel
=
{
evaluationRoundId
:
""
,
tdesc
:
""
,
edesc
:
""
,
apsyear
:
""
,
apsPeriodStart
:
""
,
apsPeriodEnd
:
""
,
statusCode
:
new
MyStatusCodeModel
({})
}
itemToDelete
:
EvaluationCycleModel
|
null
=
null
;
isDataListChecked
=
false
isDataListCheckedAll
=
false
dataList
:
DataModel
[]
=
[
{
check
:
false
,
code
:
"Y67P2"
,
period
:
"ช่วงเวลาที่ 2"
,
year
:
"2567"
,
startDate
:
"01-07-2567"
,
endDate
:
"31-12-2567"
,
status
:
"1"
},
{
check
:
false
,
code
:
"Y68P1"
,
period
:
"ช่วงเวลาที่ 1"
,
year
:
"2568"
,
startDate
:
"01-01-2568"
,
endDate
:
"30-06-2568"
,
status
:
"2"
},
{
check
:
false
,
code
:
"Y67P1"
,
period
:
"ช่วงเวลาที่ 1"
,
year
:
"2567"
,
startDate
:
"01-01-2567"
,
endDate
:
"30-06-2567"
,
status
:
"3"
}
]
numDataListChecked
=
0
dataSelect
:
DataModel
=
{
check
:
false
,
code
:
""
,
period
:
""
,
year
:
""
,
startDate
:
""
,
endDate
:
""
,
status
:
""
,
}
modalStatus
:
"add"
|
"edit"
=
"add"
constructor
(
private
cdr
:
ChangeDetectorRef
)
{
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
)
{
}
ngOnInit
():
void
{
this
.
getEvaluationCycleList
()
}
dataListSelect
(
data
?:
DataModel
)
{
this
.
dataSelect
=
data
||
{
getEvaluationCycleList
()
{
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
evaluation_cyclelist
=
response
.
map
(
x
=>
({
check
:
false
,
code
:
""
,
period
:
""
,
year
:
""
,
startDate
:
""
,
endDate
:
""
,
status
:
""
,
}
this
.
cdr
.
detectChanges
(
)
data
:
{
evaluationRoundId
:
x
.
evaluationRoundId
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
apsyear
:
x
.
apsyear
,
apsPeriodStart
:
x
.
apsPeriodStart
,
apsPeriodEnd
:
x
.
apsPeriodEnd
,
statusCode
:
new
MyStatusCodeModel
(
x
.
statusCode
||
{}
)
}
}));
dataListFilter
()
{
return
this
.
dataList
.
filter
(
x
=>
{
const
match
=
x
.
code
.
includes
(
this
.
search
)
||
x
.
period
.
includes
(
this
.
search
);
if
(
!
match
)
x
.
check
=
false
;
return
match
;
});
this
.
dataLoading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
();
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
dataListFilter
();
this
.
isDataListChecked
=
dataCheck
.
some
(
x
=>
x
.
check
);
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
dataCheck
.
filter
(
x
=>
x
.
check
).
length
;
});
}
dataListCheckAll
()
{
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
dataList
.
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
evaluation_cycleListFilter
()
.
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
evaluation_cycleListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
evaluation_cyclelist
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
();
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
evaluation_cycleListFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
()
}
evaluation_cycleListFilter
()
{
return
this
.
evaluation_cyclelist
.
filter
(
x
=>
{
const
data
=
x
.
data
const
match
=
data
.
evaluationRoundId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
return
match
;
});
}
setData
(
data
?:
DataModel
)
{
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{
evaluationRoundId
:
""
,
tdesc
:
""
,
edesc
:
""
,
apsyear
:
""
,
apsPeriodStart
:
""
,
apsPeriodEnd
:
""
,
statusCode
:
new
MyStatusCodeModel
({})
}));
}
addevaluation_cycle
()
{
const
body
=
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
apsyear
:
this
.
dataSelect
.
apsyear
,
apsPeriodStart
:
this
.
dataSelect
.
apsPeriodStart
,
apsPeriodEnd
:
this
.
dataSelect
.
apsPeriodEnd
,
statusCode
:
this
.
dataSelect
.
statusCode
})
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getEvaluationCycleList
()
}
else
{
this
.
dataLoading
=
false
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
deleteevaluation_cycle
()
{
let
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]
=
[]
if
(
this
.
dataSelect
.
evaluationRoundId
)
{
body
=
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
apsyear
:
this
.
dataSelect
.
apsyear
,
apsPeriodStart
:
this
.
dataSelect
.
apsPeriodStart
,
apsPeriodEnd
:
this
.
dataSelect
.
apsPeriodEnd
,
statusCode
:
this
.
dataSelect
.
statusCode
})
}
else
{
body
=
this
.
evaluation_cyclelist
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyEvaluationCycleModel
({
evaluationRoundId
:
x
.
data
.
evaluationRoundId
,
tdesc
:
x
.
data
.
tdesc
,
edesc
:
x
.
data
.
edesc
,
apsyear
:
x
.
data
.
apsyear
,
apsPeriodStart
:
x
.
data
.
apsPeriodStart
,
apsPeriodEnd
:
x
.
data
.
apsPeriodEnd
,
statusCode
:
x
.
data
.
statusCode
}))
}
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
delete
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getEvaluationCycleList
()
}
else
{
this
.
dataLoading
=
false
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
src/app/components/performance-management-evaluation/evaluation-factors/define-evaluation-factors/define-evaluation-factors.component.html
View file @
9b4fec34
...
...
@@ -62,21 +62,29 @@
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"!dataListFilter().length"
>
<tbody
*
ngIf=
"data.loading"
>
<tr>
<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"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!data.loading&&!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"dataListFilter().length"
>
<tbody
*
ngIf=
"
!data.loading&&
dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"flex justify-center items-center"
>
<span>
{{item.employee }}
</span>
</td>
<td>
...
...
@@ -133,5 +141,10 @@
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
\ No newline at end of file
src/app/components/performance-management-evaluation/evaluation-factors/define-evaluation-factors/define-evaluation-factors.component.ts
View file @
9b4fec34
...
...
@@ -20,7 +20,8 @@ export class DefineEvaluationFactorsComponent {
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
dataList
:
DataModel
[]
=
[
data
:
{
loading
:
boolean
,
dataList
:
DataModel
[]
}
=
{
loading
:
false
,
dataList
:
[
{
"employee"
:
"01-02"
,
"hoshin"
:
"0"
,
...
...
@@ -102,9 +103,10 @@ export class DefineEvaluationFactorsComponent {
"total"
:
"100"
}
]
}
dataListFilter
()
{
return
this
.
data
List
.
filter
(
x
=>
x
.
employee
.
includes
(
this
.
search
))
return
this
.
data
.
dataList
.
filter
(
x
=>
x
.
employee
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()
))
}
searchChange
()
{
...
...
src/app/components/performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component.html
View file @
9b4fec34
<div
class=
"header-title-type"
>
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
<button
type=
"button
"
class=
"ti-btn ti-btn-soft-success h-10 m-0 shadow-md
"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-10 m-0 shadow-md
"
data-hs-overlay=
"#assessment-system-configurtion-alert-modal
"
>
<i
class=
"ri-save-3-line"
></i>
Save
</button>
...
...
@@ -17,7 +17,7 @@
</div>
<div
class=
"body-content"
>
<div
class=
"page"
>
<div
class=
"page"
>
<div
class=
"grid grid-cols-3 gap-6"
>
<div
class=
"col-span-1"
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
ปีการประเมิน *
</label>
...
...
@@ -25,54 +25,142 @@
</div>
<div
class=
"grid grid-cols-3 gap-6"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-2/3 pr-10"
value=
"2567"
>
<input
type=
"text"
class=
"ti-form-input w-2/3 pr-10"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
setting
.
data
.
apsyear
"
>
</div>
</div>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label mt-10"
>
จัดการสมรรถนะกับกลุ่ม *
</label>
<div
class=
"box-body"
>
<div
class=
"grid grid-cols-6 flex gap-x-6"
>
<div
class=
"flex col-span-1 mt-5"
>
<input
type=
"radio"
name=
"radio1"
class=
"ti-form-radio"
id=
"hs-radio-group-1"
checked
>
<label
for=
"hs-radio-group-1"
class=
"text-sm text-gray-500 ltr:ml-5 rtl:mr-2 font-bold dark:text-white/70"
>
ระดับพนักงาน (PL)
</label>
<div
class=
"grid grid-cols-6 gap-2"
>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox"
id=
"settingGroupAssessment-0"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='0'"
name=
"settingGroupAssessment"
(
change
)="
setting
.
data
.
settingGroupAssessment=
'0'
"
[
value
]="'
0
'"
[
checked
]="
setting
.
data
.
settingGroupAssessment=
='0'"
>
</div>
<div
class=
"col-span-5"
>
<label
for=
"settingGroupAssessment-0"
class=
"text-sm text-gray-500"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='0'"
>
ระดับพนักงาน (PL)
</label>
</div>
</div>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox"
id=
"settingGroupAssessment-1"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='1'"
name=
"settingGroupAssessment"
(
change
)="
setting
.
data
.
settingGroupAssessment=
'1'
"
[
checked
]="
setting
.
data
.
settingGroupAssessment=
='1'"
>
</div>
<div
class=
"col-span-5"
>
<label
for=
"settingGroupAssessment-1"
class=
"text-sm text-gray-500"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='1'"
>
ลักษณะงาน (JD)
</label>
</div>
<div
class=
"flex col-span-2 mt-5 ml-4rem"
>
<input
type=
"radio"
name=
"radio1"
class=
"ti-form-radio"
id=
"hs-radio-group-2"
>
<label
for=
"hs-radio-group-2"
class=
"text-sm text-gray-500 ltr:ml-5 rtl:mr-2 font-bold dark:text-white/70"
>
ลักษณะงาน ( JD)
</label>
</div>
</div>
</div>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label mt-10"
>
เเสดงผลประเมินสมรรถนะ *
</label>
<div
class=
"box-body"
>
<div
class=
"grid grid-cols-6 flex gap-x-6"
>
<div
class=
"flex col-span-1 mt-5"
>
<input
type=
"radio"
name=
"radio2"
class=
"ti-form-radio"
id=
"hs-radio-group-3"
checked
>
<label
for=
"hs-radio-group-1"
class=
"text-sm text-gray-500 ltr:ml-5 rtl:mr-2 font-bold dark:text-white/70"
>
เเสดงผล
</label>
<div
class=
"grid grid-cols-6 gap-2"
>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox"
id=
"settingGroupAssessment-0"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='0'"
name=
"settingGroupAssessment"
(
change
)="
setting
.
data
.
settingGroupAssessment=
'0'
"
[
value
]="'
0
'"
[
checked
]="
setting
.
data
.
settingGroupAssessment=
='0'"
>
</div>
<div
class=
"col-span-5"
>
<label
for=
"settingGroupAssessment-0"
class=
"text-sm text-gray-500"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='0'"
>
เเสดงผล
</label>
</div>
</div>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox"
id=
"settingGroupAssessment-1"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='1'"
name=
"settingGroupAssessment"
(
change
)="
setting
.
data
.
settingGroupAssessment=
'1'
"
[
checked
]="
setting
.
data
.
settingGroupAssessment=
='1'"
>
</div>
<div
class=
"col-span-5"
>
<label
for=
"settingGroupAssessment-1"
class=
"text-sm text-gray-500"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='1'"
>
ไม่เเสดงผล
</label>
</div>
<div
class=
"flex col-span-2 mt-5 ml-4rem"
>
<input
type=
"radio"
name=
"radio2"
class=
"ti-form-radio"
id=
"hs-radio-group-4"
>
<label
for=
"hs-radio-group-2"
class=
"text-sm text-gray-500 ltr:ml-5 rtl:mr-2 font-bold dark:text-white/70"
>
ไม่เเสดงผล
</label>
</div>
</div>
</div>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label mt-10"
>
เเสดงผลประเมินเวลาทำงาน *
</label>
<div
class=
"box-body"
>
<div
class=
"grid grid-cols-6 flex gap-x-6"
>
<div
class=
"flex col-span-1 mt-5"
>
<input
type=
"radio"
name=
"radio3"
class=
"ti-form-radio"
id=
"hs-radio-group-5"
checked
>
<label
for=
"hs-radio-group-1"
class=
"text-sm text-gray-500 ltr:ml-5 rtl:mr-2 font-bold dark:text-white/70"
>
เเสดงผล
</label>
<div
class=
"grid grid-cols-6 gap-2"
>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox"
id=
"settingGroupAssessment-0"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='0'"
name=
"settingGroupAssessment"
(
change
)="
setting
.
data
.
settingGroupAssessment=
'0'
"
[
value
]="'
0
'"
[
checked
]="
setting
.
data
.
settingGroupAssessment=
='0'"
>
</div>
<div
class=
"flex col-span-2 mt-5 ml-4rem"
>
<input
type=
"radio"
name=
"radio3"
class=
"ti-form-radio"
id=
"hs-radio-group-6"
>
<label
for=
"hs-radio-group-2"
class=
"text-sm text-gray-500 ltr:ml-5 rtl:mr-2 font-bold dark:text-white/70"
>
ไม่เเสดงผล
</label>
<div
class=
"col-span-5"
>
<label
for=
"settingGroupAssessment-0"
class=
"text-sm text-gray-500"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='0'"
>
เเสดงผล
</label>
</div>
</div>
<div
class=
"grid col-span-1 grid-cols-6 gap-2"
>
<div
class=
"col-span-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox"
id=
"settingGroupAssessment-1"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='1'"
name=
"settingGroupAssessment"
(
change
)="
setting
.
data
.
settingGroupAssessment=
'1'
"
[
checked
]="
setting
.
data
.
settingGroupAssessment=
='1'"
>
</div>
<div
class=
"col-span-5"
>
<label
for=
"settingGroupAssessment-1"
class=
"text-sm text-gray-500"
[
class
.
pointer-events-none
]="
setting
.
data
.
settingGroupAssessment=
='1'"
>
ไม่เเสดงผล
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"assessment-system-configurtion-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#assessment-system-configurtion-alert-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</p>
</div>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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 dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#assessment-system-configurtion-alert-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#assessment-system-configurtion-alert-modal"
(
click
)="
saveSetting
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component.scss
View file @
9b4fec34
.button-clear
{
position
:
absolute
;
top
:
96px
;
z-index
:
1
;
right
:
41vw
;
}
.button-help
{
position
:
absolute
;
top
:
0px
;
z-index
:
1
;
right
:
0vw
;
margin
:
4
.2rem
;
margin-right
:
10px
;
/* เพิ่มใหม่ 12/16*/
}
a
.custom-link
{
padding
:
10px
40px
;
/* ปรับ padding ให้เพิ่มขนาด */
}
/* สไตล์ของแถบเมนู */
.nav-tabs
{
display
:
flex
;
width
:
100%
;
cursor
:
pointer
;
margin-bottom
:
10px
;
height
:
20%
;
}
.nav-item
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link
{
text-decoration
:
none
;
padding
:
10px
20px
;
display
:
inline-block
;
font-size
:
large
;
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
#ccc
;
border-radius
:
5px
5px
0px
0px
;
}
.nav-link
:hover
{
background-color
:
#f0f0f0
;
/* เปลี่ยนสีเมื่อ hover */
}
.nav-link.active
{
color
:
#ffffff
;
/* สีตัวอักษรในสถานะ active */
font-size
:
large
;
border-bottom
:
3
.5px
solid
rgb
(
var
(
--
color-primary
));
/* เส้นใต้ */
background-color
:
rgb
(
var
(
--
color-primary
));
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
rgb
(
var
(
--
color-primary
));
border-radius
:
5px
5px
0px
0px
;
}
.tab-content
{
margin-top
:
20px
;
}
.tab-pane.active
{
display
:
block
;
}
.nav-item-text
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link-text
{
text-decoration
:
none
;
display
:
inline-block
;
font-size
:
large
;
color
:
#569bf5
;
border-bottom
:
2px
solid
#569bf5
;
line-height
:
0
.8
;
}
.ti-pagination
.page-link.active
{
background-color
:
#569bf5
;
color
:
white
;
border-radius
:
50%
;
padding
:
8px
12px
;
}
.box-body
{
padding
:
0rem
;
}
.page
{
min-height
:
0vh
;
}
.ti-modal-content-alert
{
width
:
35%
;
/* ความกว้างที่คุณต้องการ */
position
:
absolute
;
/* ทำให้สามารถจัดตำแหน่งได้ */
top
:
50%
;
/* ให้อยู่กลางในแนวตั้ง */
left
:
50%
;
/* ให้อยู่กลางในแนวนอน */
transform
:
translate
(
-50%
,
-50%
);
/* เคลื่อนที่ modal กลับมาให้ตรงกลาง */
background-color
:
#ffffff
;
}
.header-title-type
{
width
:
100%
;
min-height
:
50px
;
/* ใช้ min-height เพื่อให้มีความยืดหยุ่น */
justify-content
:
space-between
;
/* จัดเรียงองค์ประกอบภายใน */
align-items
:
center
;
/* จัดกลางแนวตั้ง */
padding-top
:
50px
;
padding-bottom
:
1rem
;
}
.body-content
{
margin-bottom
:
30px
;
height
:
100%
;
width
:
100%
;
}
table
{
width
:
50%
;
border-collapse
:
collapse
;
border
:
1px
solid
black
;
}
th
{
font-weight
:
bold
;
}
th
,
td
{
border
:
1px
solid
black
;
/* เส้นขอบของเซลล์ */
padding
:
15px
;
text-align
:
center
;
}
th
:first-child
{
width
:
125px
;
font-size
:
18px
;
}
td
{
padding-top
:
8px
;
padding-bottom
:
8px
;
}
td
:first-child
{
font-size
:
18px
;
font-weight
:
bold
;
}
td
span
{
display
:
inline-block
;
/*span มีลักษณะเป็นกรอบ */
padding
:
5px
10px
;
border
:
1px
solid
black
;
border-radius
:
10px
;
background-color
:
#f9f9f9
;
width
:
60px
;
}
input
[
type
=
"radio"
]
:checked
{
background-color
:
#569BF5
;
border-color
:
#569BF5
;
}
\ No newline at end of file
src/app/components/performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component.ts
View file @
9b4fec34
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
C
hangeDetectorRef
,
C
omponent
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
SettingAssessmentModel
,
MySettingAssessmentModel
}
from
'src/app/shared/model/setting-assessment.model'
;
import
{
SettingAssessmentService
}
from
'src/app/shared/services/setting-assessment.service'
;
@
Component
({
selector
:
'app-assessment-system-configuration'
,
...
...
@@ -7,84 +9,52 @@ import { ToastrService } from 'ngx-toastr';
styleUrls
:
[
'./assessment-system-configuration.component.scss'
]
})
export
class
AssessmentSystemConfigurationComponent
{
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'การตั้งค่า'
,
'กำหนดค่าระบบการประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
isChecked
:
boolean
=
false
;
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินจัดการประสิทธิภาพ'
,
'การตั้งค่า'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
toggleCheckbox
():
void
{
this
.
isChecked
=
!
this
.
isChecked
;
}
// การจัดการการเปิดปิด modal
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
};
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
document
.
body
.
style
.
overflow
=
'hidden'
;
}
closeModal
(
name
:
string
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
isAnyModalOpen
())
{
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
}
}
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
}
currentModal
=
""
constructor
(
private
toastr
:
ToastrService
)
{
}
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
setting
:
{
loading
:
boolean
,
data
:
SettingAssessmentModel
}
=
{
loading
:
false
,
data
:
new
MySettingAssessmentModel
()
}
constructor
(
private
settingAssessmentService
:
SettingAssessmentService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
)
{
}
ngOnInit
():
void
{
this
.
getSettingList
()
}
getSettingList
()
{
this
.
setting
.
loading
=
true
this
.
settingAssessmentService
.
get
().
subscribe
({
next
:
response
=>
{
this
.
setting
.
data
=
new
MySettingAssessmentModel
(
response
)
this
.
setting
.
loading
=
false
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
setting
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
saveSetting
()
{
this
.
setting
.
loading
=
true
// this.settingAssessmentService.post(new MySettingAssessmentModel({ ...this.setting.data, expectationLevel: +(this.setting.data.expectationLevel) })).subscribe({
// next: response => {
// if (response.success) {
// this.showAlert(response.message, 'success')
// this.getSettingList()
// } else {
// this.showAlert(response.message, 'error')
// this.setting.loading = false
// this.cdr.detectChanges()
// }
// }, error: error => {
// this.showAlert(error.message, 'error')
// this.setting.loading = false
// this.cdr.detectChanges()
// }
// })
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
})
;
})
}
}
}
\ No newline at end of file
src/app/components/performance-management-evaluation/setting-performance-evalution/setting-performance-evalution.component.html
View file @
9b4fec34
...
...
@@ -10,15 +10,15 @@
<nav
class=
"-mb-0.5 flex space-x-6 rtl:space-x-reverse"
>
<a
class=
"text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
href=
"javascript:void(0);"
id=
"underline-item-1"
data-hs-tab=
"#underline-1"
aria-controls=
"underline-1"
(
click
)="
pathTitle =
['การประเมินจัดการประสิทธิภาพ','การตั้งค่า','กำหนดค่าระบบการประเมิน']"
>
aria-controls=
"underline-1"
(
click
)="
pathTitle =
['การประเมินจัดการประสิทธิภาพ','การตั้งค่า','กำหนดค่าระบบการประเมิน']"
>
กำหนดค่าระบบการประเมิน
</a>
</nav>
</div>
<div
class=
"mt-3 px-3rem"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<app-assessment-system-configuration
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
></app-assessment-system-configuration>
<app-assessment-system-configuration></app-assessment-system-configuration>
</div>
</div>
</div>
...
...
src/app/shared/model/competency-grades.model.ts
View file @
9b4fec34
...
...
@@ -17,15 +17,15 @@ export class MyCompetencyGradeModel implements CompetencyGradeModel {
gradeMaxScore
:
number
gradeMinScore
:
number
weight
:
number
constructor
(
data
:
Partial
<
CompetencyGradeModel
>
)
{
this
.
gradeId
=
data
.
gradeId
||
""
this
.
companyId
=
data
.
companyId
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
gradeDetail
=
data
.
gradeDetail
||
""
this
.
gradeMaxScore
=
data
.
gradeMaxScore
??
0
this
.
gradeMinScore
=
data
.
gradeMinScore
??
0
this
.
weight
=
data
.
weight
??
0
constructor
(
data
?
:
Partial
<
CompetencyGradeModel
>
)
{
this
.
gradeId
=
data
?
.
gradeId
||
""
this
.
companyId
=
data
?
.
companyId
||
""
this
.
edesc
=
data
?
.
edesc
||
""
this
.
tdesc
=
data
?
.
tdesc
||
""
this
.
gradeDetail
=
data
?
.
gradeDetail
||
""
this
.
gradeMaxScore
=
data
?
.
gradeMaxScore
??
0
this
.
gradeMinScore
=
data
?
.
gradeMinScore
??
0
this
.
weight
=
data
?
.
weight
??
0
}
}
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