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
d829e571
Commit
d829e571
authored
May 23, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ประเมินตนเอง
parent
bb296e71
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
624 additions
and
473 deletions
+624
-473
manage-user.component.ts
...nts/account-settings/manage-user/manage-user.component.ts
+2
-2
role-permission-config.component.ts
...ole-permission-config/role-permission-config.component.ts
+2
-2
set-a-password.component.ts
...count-settings/set-a-password/set-a-password.component.ts
+2
-2
user-settings.component.ts
...account-settings/user-settings/user-settings.component.ts
+2
-2
sub-employee-registration.component.ts
...loyee-registration/sub-employee-registration.component.ts
+2
-2
pms-competency.component.html
...orm-employee/pms-competency/pms-competency.component.html
+10
-263
pms-competency.component.ts
...-form-employee/pms-competency/pms-competency.component.ts
+31
-2
pms-form-employee.component.html
...uation/pms-form-employee/pms-form-employee.component.html
+195
-151
pms-form-employee.component.scss
...uation/pms-form-employee/pms-form-employee.component.scss
+10
-0
pms-form-employee.component.ts
...aluation/pms-form-employee/pms-form-employee.component.ts
+182
-19
pms-idp.component.html
...aluation/pms-form-employee/pms-idp/pms-idp.component.html
+7
-7
pms-idp.component.ts
...evaluation/pms-form-employee/pms-idp/pms-idp.component.ts
+8
-1
pms-information.component.html
...m-employee/pms-information/pms-information.component.html
+103
-1
pms-information.component.ts
...orm-employee/pms-information/pms-information.component.ts
+41
-1
pms-kpi.component.html
...aluation/pms-form-employee/pms-kpi/pms-kpi.component.html
+5
-4
pms-kpi.component.ts
...evaluation/pms-form-employee/pms-kpi/pms-kpi.component.ts
+16
-7
self-evaluation.component.html
...evaluation/self-evaluation/self-evaluation.component.html
+0
-1
supervisor-evaluation.component.ts
.../supervisor-evaluation/supervisor-evaluation.component.ts
+2
-2
sidebar.component.ts
src/app/shared/components/sidebar/sidebar.component.ts
+2
-2
style.css
src/assets/css/style.css
+2
-2
No files found.
src/app/components/company-components/account-settings/manage-user/manage-user.component.ts
View file @
d829e571
...
...
@@ -72,8 +72,8 @@ export class ManageUserComponent {
}
decodeJWT
(
token
:
string
)
{
let
base64Url
=
token
.
split
(
'.'
)[
1
];
// ดึงส่วนที่เป็น Payload
let
base64
=
base64Url
.
replace
(
'-'
,
'+'
).
replace
(
'_'
,
'/'
);
// แก้ไข base64 ให้ถูกต้อง
let
base64Url
=
token
.
split
(
'.'
)[
1
];
let
base64
=
base64Url
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
);
let
jsonPayload
=
decodeURIComponent
(
atob
(
base64
).
split
(
''
).
map
(
function
(
c
)
{
return
'%'
+
(
'00'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
}).
join
(
''
));
...
...
src/app/components/company-components/account-settings/role-permission-config/role-permission-config.component.ts
View file @
d829e571
...
...
@@ -60,8 +60,8 @@ export class RolePermissionConfigComponent {
this
.
getConfigList
()
}
decodeJWT
(
token
:
string
)
{
let
base64Url
=
token
.
split
(
'.'
)[
1
];
// ดึงส่วนที่เป็น Payload
let
base64
=
base64Url
.
replace
(
'-'
,
'+'
).
replace
(
'_'
,
'/'
);
// แก้ไข base64 ให้ถูกต้อง
let
base64Url
=
token
.
split
(
'.'
)[
1
];
let
base64
=
base64Url
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
);
let
jsonPayload
=
decodeURIComponent
(
atob
(
base64
).
split
(
''
).
map
(
function
(
c
)
{
return
'%'
+
(
'00'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
}).
join
(
''
));
...
...
src/app/components/company-components/account-settings/set-a-password/set-a-password.component.ts
View file @
d829e571
...
...
@@ -75,8 +75,8 @@ export class SetAPasswordComponent {
}
decodeJWT
(
token
:
string
)
{
let
base64Url
=
token
.
split
(
'.'
)[
1
];
// ดึงส่วนที่เป็น Payload
let
base64
=
base64Url
.
replace
(
'-'
,
'+'
).
replace
(
'_'
,
'/'
);
// แก้ไข base64 ให้ถูกต้อง
let
base64Url
=
token
.
split
(
'.'
)[
1
];
let
base64
=
base64Url
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
);
let
jsonPayload
=
decodeURIComponent
(
atob
(
base64
).
split
(
''
).
map
(
function
(
c
)
{
return
'%'
+
(
'00'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
}).
join
(
''
));
...
...
src/app/components/company-components/account-settings/user-settings/user-settings.component.ts
View file @
d829e571
...
...
@@ -82,8 +82,8 @@ export class UserSettingsComponent {
}
decodeJWT
(
token
:
string
)
{
let
base64Url
=
token
.
split
(
'.'
)[
1
];
// ดึงส่วนที่เป็น Payload
let
base64
=
base64Url
.
replace
(
'-'
,
'+'
).
replace
(
'_'
,
'/'
);
// แก้ไข base64 ให้ถูกต้อง
let
base64Url
=
token
.
split
(
'.'
)[
1
];
let
base64
=
base64Url
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
);
let
jsonPayload
=
decodeURIComponent
(
atob
(
base64
).
split
(
''
).
map
(
function
(
c
)
{
return
'%'
+
(
'00'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
}).
join
(
''
));
...
...
src/app/components/company-components/employee-registration/sub-employee-registration/sub-employee-registration.component.ts
View file @
d829e571
...
...
@@ -672,8 +672,8 @@ export class SubEmployeeRegistrationComponent {
}
decodeJWT
(
token
:
string
)
{
let
base64Url
=
token
.
split
(
'.'
)[
1
];
// ดึงส่วนที่เป็น Payload
let
base64
=
base64Url
.
replace
(
'-'
,
'+'
).
replace
(
'_'
,
'/'
);
// แก้ไข base64 ให้ถูกต้อง
let
base64Url
=
token
.
split
(
'.'
)[
1
];
let
base64
=
base64Url
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
);
let
jsonPayload
=
decodeURIComponent
(
atob
(
base64
).
split
(
''
).
map
(
function
(
c
)
{
return
'%'
+
(
'00'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
}).
join
(
''
));
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-competency/pms-competency.component.html
View file @
d829e571
<ng-container
*
ngTemplateOutlet=
"newCompetency"
></ng-container>
<!-- <ng-container *ngTemplateOutlet="competency"></ng-container> -->
<ng-template
#
newCompetency
>
<ng-container
*
ngTemplateOutlet=
"competency"
></ng-container>
<ng-template
#
competency
>
<div
class=
"flex flex-col gap-2"
>
<div
class=
"flex flex-row gap-2"
>
<div
class=
"flex flex-row gap-2
relative
"
>
<ng-container
*
ngFor=
"let appraisalCompentency of appraisalCompentencyList ;let i=index"
>
<button
type=
"button"
class=
"flex justify-center !items-center border bg-white p-2 text-center"
style=
"border-radius:20px;width: 100px"
...
...
@@ -21,13 +20,13 @@
</ng-container>
<div
class=
"flex justify-around !items-center border bg-white p-2 text-right"
style=
"border-radius:20px;width: 100px;margin-left: auto;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));"
>
<i
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:
10
px;font-size:27px"
(
click
)="
allBiOpen
(
true
)"
></i>
<i
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:
10
px;font-size:27px"
(
click
)="
allBiOpen
(
false
)"
></i>
<i
title=
"แสดงทั้งหมด"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:
5
px;font-size:27px"
(
click
)="
allBiOpen
(
true
)"
></i>
<i
title=
"ปิดทั้งหมด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:
5
px;font-size:27px"
(
click
)="
allBiOpen
(
false
)"
></i>
</div>
</div>
<div
#
scrollContainer
class=
"flex flex-col gap-2 relative"
style=
"
height:40vh;overflow-y: auto;
"
>
<div
#
scrollContainer
class=
"flex flex-col gap-2 relative"
style=
"
overflow-y: auto;"
[
ngStyle
]="{'
height
'
:
canSave
?'
calc
(
100vh
-
472px
)'
:
'
calc
(
100vh
-
343px
)'}
"
>
<ng-container
*
ngFor=
"let item2 of appraisalCompentencyFilter();let i = index;let f= first"
>
<button
type=
"button"
[
attr
.
id
]="'
menu-
'
+
i
"
class=
"p-4 w-full bg-secondary text-white text-left"
style=
"border-radius:20px"
...
...
@@ -134,7 +133,7 @@
</table>
</ng-container>
</ng-container>
<button
[
attr
.
id
]="'
menu-
'
+
appraisalCompentencyFilter
().
length
"
type=
"button"
<button
*
ngIf=
"appraisalCompentencyFilter().length"
[
attr
.
id
]="'
menu-
'
+
appraisalCompentencyFilter
().
length
"
type=
"button"
class=
"p-4 w-full bg-secondary text-white text-left"
style=
"border-radius:20px"
(
click
)="
scrollToMenu
(
appraisalCompentencyFilter
().
length
);
allBiOpen
(!
biOpen
.
get
('สรุป'),'สรุป')"
>
<span
style=
"padding-left:50px"
>
...
...
@@ -262,255 +261,3 @@
</div>
</div>
</ng-template>
\ No newline at end of file
<ng-template
#
competency
>
<div
class=
"flex w-full"
>
<div
class=
"ltr:border-r rtl:border-l border-gray-200 dark:border-white/10"
style=
"width: 5rem"
>
<nav
class=
"flex flex-col space-y-2 whitespace-nowrap"
aria-label=
"Tabs"
[
attr
.
data-hs-tabs-vertical
]="
true
"
>
<button
*
ngFor=
"let appraisalCompentency of appraisalCompentencyList ;let i=index"
(
click
)="
getAppraisalCompentencyForm
(
i
)"
[
class
.
active
]="
currentPart=
=appraisalCompentency.comType"
type=
"button"
class=
"hs-tab-active:bg-primary ltr:hs-tab-active:border-r-transparent rtl:hs-tab-active:border-l-transparent hs-tab-active:text-white dark:hs-tab-active:bg-transparent ltr:dark:hs-tab-active:border-r-gray-800 rtl:dark:hs-tab-active:border-l-gray-800 dark:hs-tab-active:text-primary -mr-px py-2 px-3 inline-flex items-center gap-2 text-sm font-medium text-center border text-gray-500 ltr:rounded-l-lg rtl:rounded-r-lg hover:text-gray-700 dark:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-gray-300 !p-2"
[
id
]="'
hs-tab-js-vertical-item-
'+
i
"
[
attr
.
data-hs-tab
]="'#
hs-tab-js-vertical-
'+
i
"
[
attr
.
aria-controls
]="'
hs-tab-js-vertical-
'+
i
"
>
<div
class=
"w-full flex items-center "
style=
"justify-content :space-between;"
>
{{appraisalCompentency.comType}}
<span
class=
"d-flex align-items-center justify-content-center rounded-circle text-white"
[
class
.
bg-danger
]="
formRemain
(
i
)"
[
class
.
bg-success
]="!
formRemain
(
i
)"
>
<ng-container
*
ngIf=
"formRemain(i)"
>
{{formRemain(i)}}
</ng-container>
<i
*
ngIf=
"!formRemain(i)"
class=
"ti ti-check"
></i>
</span>
</div>
</button>
</nav>
</div>
<div
class=
"flex-1 w-full"
>
<div
*
ngFor=
"let appraisalCompentency of appraisalCompentencyList ;let i=index"
[
id
]="'
hs-tab-js-vertical-
'+
i
"
role=
"tabpanel"
[
class
.
hidden
]="
currentPart
!=
appraisalCompentency
.
comType
"
[
attr
.
aria-labelledby
]="'
hs-tab-js-vertical-item-
'+
i
"
>
<div
class=
"hs-accordion-group w-full"
*
ngIf=
"appraisalCompentency"
>
<ng-container>
<div
class=
"pb-2rem px-2rem text-center"
>
<div
class=
"font-size-18px font-weight-700 text-primary"
>
แบบประเมินสมรรถนะพนักงาน
</div>
</div>
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"p-2 flex"
style=
"justify-content :space-between;"
>
<div
class=
"grid-cols-1"
>
<div
class=
"text-gray-400"
>
เครื่องมือประเมิน
</div>
<div
class=
"text-gray-400"
>
O = แบบสังเกต
</div>
<div
class=
"text-gray-400"
>
P = แบบการปฏิบัติงาน
</div>
<div
class=
"text-gray-400"
>
D = การบันทึก/เอกสาร
</div>
<div
class=
"text-gray-400"
>
I = การสัมภาษณ์
</div>
<div
class=
"text-gray-400"
>
T = แบบทดสอบ
</div>
</div>
<div
class=
"grid-cols-1"
>
<div
class=
"text-gray-400"
>
คำชี้แจง
</div>
<div
class=
"text-gray-400"
>
- ใช้วิธีประเมินโดย ผู้บังคับบัญชา = 100 %
</div>
</div>
<div
class=
"col-span-3 grid-cols-1"
>
<div
class=
"text-gray-400"
>
ระดับความสามารถ (Target Degree)
</div>
<div
class=
"text-gray-400"
>
ระดับ 1 = ไม่มีความรู้พื้นฐานเลย ขาดทักษะในงาน
</div>
<div
class=
"text-gray-400"
>
ระดับ 2 = มีความรู้ในงานบ้างแต่ยังไม่สามารถ ประยุกต์ใช้ในงานได้
</div>
<div
class=
"text-gray-400"
>
ระดับ 3 = นำความรู้มาประยุกต์ใช้ในงานได้ ปฏิบัติงานเองได้ด้วยตัวเอง
แก้ไขปัญหาหน้างานได้
</div>
<div
class=
"text-gray-400"
>
ระดับ 4 = สอนผู้อื่นได้ มีความคล่องตัว เชื่อมโยง ความรู้ในงานได้
</div>
<div
class=
"text-gray-400"
>
ระดับ 5 = มีความชำนาญ เชี่ยวชาญ เป็นที่ยอมรับ ในองค์กร
</div>
</div>
</div>
</div>
<div
class=
"pb-2rem px-2rem"
>
<div
*
ngIf=
"appraisalCompentencyFilter().length"
>
<div
class=
"hs-accordion-group w-full"
data-hs-accordion-always-open
>
<ng-container
*
ngFor=
"let item2 of appraisalCompentencyFilter();let i = index;let f= first"
>
<div
class=
"hs-accordion overflow-hidden bg-white border -mt-px first:rounded-t-sm last:rounded-b-sm dark:bg-bgdark dark:border-white/10"
[
id
]="'
hs-primary-heading-
'+
i
"
>
<button
class=
"hs-accordion-toggle hs-accordion-active:text-white hs-accordion-active:bg-secondary group py-4 px-5 inline-flex items-center justify-between gap-x-3 w-full font-semibold text-start text-gray-800 transition hover:text-gray-500 dark:hs-accordion-active:text-white dark:text-gray-200 dark:hover:text-white/80"
[
attr
.
aria-controls
]="'
hs-primary-collapse-
'+
i
"
type=
"button"
>
<span
class=
"d-flex align-items-center justify-content-center rounded-circle text-white"
[
class
.
bg-danger
]="
inFormRemain
(
item2
)"
[
class
.
bg-success
]="!
inFormRemain
(
item2
)"
>
<ng-container
*
ngIf=
"inFormRemain(item2)"
>
{{inFormRemain(item2)}}
</ng-container>
<i
*
ngIf=
"!inFormRemain(item2)"
class=
"ti ti-check"
></i>
</span>
<span>
{{item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
:
{{item2.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</span>
<svg
class=
"hs-accordion-active:hidden hs-accordion-active:text-white hs-accordion-active:group-hover:text-white block w-3 h-3 text-gray-600 group-hover:text-gray-500 dark:text-white/70"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M2 5L8.16086 10.6869C8.35239 10.8637 8.64761 10.8637 8.83914 10.6869L15 5"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
/>
</svg>
<svg
class=
"hs-accordion-active:block hs-accordion-active:text-white hs-accordion-active:group-hover:text-white hidden w-3 h-3 text-gray-600 group-hover:text-gray-500 dark:text-white/70"
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M2 11L8.16086 5.31305C8.35239 5.13625 8.64761 5.13625 8.83914 5.31305L15 11"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
/>
</svg>
</button>
<div
[
id
]="'
hs-primary-collapse-
'+
i
"
class=
"hs-accordion-content hidden !w-full overflow-hidden transition-[height] duration-300"
[
attr
.
aria-labelledby
]="'
hs-primary-heading-
'+
i
"
>
<div
class=
"box-body"
>
<div
class=
"space-y-4"
>
<ng-container
*
ngFor=
"let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first"
>
<div
class=
"p-4 border border-gray-200 dark:border-white/10 rounded-sm"
>
<div
class=
"grid grid-cols-12 gap-6 space-y-4"
>
<div
class=
"col-span-12 my-auto"
>
<p
class=
"text-base mb-1 font-semibold"
>
{{bi.behavioralIndicators}}
{{bi.assessmentId}}
</p>
</div>
<div
class=
"col-span-12"
>
<div
class=
"space-y-2"
>
<div
class=
"grid grid-cols-12 gap-6 space-y-4 md:text-end"
>
<div
class=
"col-span-12 my-auto"
>
<div
class=
"flex items-center justify-center"
>
<div
id=
"stars-busytext"
>
<bar-rating
[
ngClass
]="{
'
no-interaction
'
:
!
canEdit
}"
[
ngStyle
]="{'
opacity
'
:bi
.
competencyBehavioral
.
scoreTopicExpectation
?
1:0
.
8
}"
[
rate
]="
bi
.
competencyBehavioral
.
scoreTopicExpectation
"
[
max
]="
5
"
[
theme
]="'
square
'"
[(
ngModel
)]="
bi
.
competencyBehavioral
.
scoreTopicExpectation
"
(
ngModelChange
)="
calnumberCheck
()"
></bar-rating>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
<div
class=
"pb-1rem px-2rem"
>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
ระดับความสามารถ (Target Degree)
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-1 text-center"
*
ngFor=
"let item of [5,4,3,2,1]"
>
{{item}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
รวมจำนวนเครื่องหมายแต่ละช่อง (1)
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentency.masfromEvaluationAssessment1lList[0].numberCheck5}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentency.masfromEvaluationAssessment1lList[0].numberCheck4}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentency.masfromEvaluationAssessment1lList[0].numberCheck3}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentency.masfromEvaluationAssessment1lList[0].numberCheck2}}
</div>
<div
class=
"col-span-1 text-center"
>
{{appraisalCompentency.masfromEvaluationAssessment1lList[0].numberCheck1}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
ตัวคูณคะแนนในแต่ละช่อง (2)
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-1 text-center"
>
{{setting.data.settingScore5}}
</div>
<div
class=
"col-span-1 text-center"
>
{{setting.data.settingScore4}}
</div>
<div
class=
"col-span-1 text-center"
>
{{setting.data.settingScore3}}
</div>
<div
class=
"col-span-1 text-center"
>
{{setting.data.settingScore2}}
</div>
<div
class=
"col-span-1 text-center"
>
{{setting.data.settingScore1}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
ถ่วงน้ำหนักผลรวม 1X2
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-1 text-center"
*
ngFor=
"let item of [5,4,3,2,1]"
>
{{calWeightScore(item)}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
คะแนนรวมหลังถ่วงน้ำหนัก
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-5 text-center"
>
{{showNumber(appraisalCompentency.masfromEvaluationAssessment1lList[0].weightedTotal)}}
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"col-span-8"
>
คะแนนเฉลี่ยคิดเป็น
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-5 text-center"
>
{{showNumber(appraisalCompentency.masfromEvaluationAssessment1lList[0].averageScore)}}
</div>
</div>
</div>
</div>
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"overflow-auto rounded-top-0.65rem"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover2"
>
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<ng-container
*
ngFor=
"let item of ['เกณฑ์การให้คะแนนการประเมิน','ผลประเมิน (A)','สรุปผล Gap'];let f = first ;let l = last"
>
<th
scope=
"col"
[
attr
.
rowspan
]="
f
?'
1
'
:
'
2
'"
[
attr
.
colspan
]="
f
?'
2
'
:
'
1
'"
class=
"relative px-10px py-10px bg-soft-secondary text-primary !text-center"
>
<span
class=
"font-size-12px font-weight-700 "
>
{{ item }}
</span>
</th>
</ng-container>
</tr>
<tr
class=
"font-size-12px"
>
<ng-container
*
ngFor=
"let item of ['เกณฑ์การให้คะแนน','เงื่อนไข']"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary !text-center"
>
{{item}}
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"checkSheet.length"
>
<tr
*
ngFor=
"let item of checkSheet;let i = index"
(
mouseenter
)="
hoveredCode2 =
'true'
"
(
mouseleave
)="
hoveredCode2 =
null"
[
ngClass
]="{
'
table-hover2
'
:
'
true
'
===
hoveredCode2
}"
>
<td
class=
"align-start"
rowspan=
"2"
>
<div
*
ngFor=
"let item2 of item.score"
>
<span>
{{item2}}
</span><br>
</div>
</td>
<td
class=
"align-start"
rowspan=
"2"
>
<div
*
ngFor=
"let item2 of item.condition"
>
<span>
{{item2}}
</span><br>
</div>
</td>
<td
class=
"align-start text-center"
>
{{calAverage(appraisalCompentency.masfromEvaluationAssessment1lList[0].averageScore)}}
</td>
<td
class=
"align-start text-center"
>
{{calGap(appraisalCompentency.masfromEvaluationAssessment1lList[0].averageScore)}}
</td>
</tr>
<tr
(
mouseenter
)="
hoveredCode2 =
'true'
"
(
mouseleave
)="
hoveredCode2 =
null"
[
ngClass
]="{
'
table-hover2
'
:
'
true
'
===
hoveredCode2
}"
>
<td
class=
"align-start !white-space-normal"
colspan=
"4"
>
หมายเหตุ
<br>
ผลการประเมินอาจมีการเปลี่ยนแปลงเงื่อนไขข้อ 1-3 เนื่องจากมีคะแนนต่ำกว่าเกณฑ์ในบางข้อ
</td>
</tr>
</tbody>
</table>
</div>
</div>
</ng-container>
</div>
</div>
</div>
</div>
</ng-template>
\ No newline at end of file
src/app/components/performance-evaluation/pms-form-employee/pms-competency/pms-competency.component.ts
View file @
d829e571
import
{
ViewportScroller
}
from
'@angular/common'
;
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
EventEmitter
,
Input
,
OnInit
,
Output
,
ViewChild
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
EventEmitter
,
Input
,
OnInit
,
Output
,
SimpleChanges
,
ViewChild
}
from
'@angular/core'
;
import
{
Competency
,
MasfromEvaluationAssessment2List
}
from
'src/app/shared/model/competency.model'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
SettingAssessmentModel
,
MySettingAssessmentModel
}
from
'src/app/shared/model/setting-assessment.model'
;
...
...
@@ -13,7 +13,9 @@ import Swal from 'sweetalert2';
styleUrls
:
[
'./pms-competency.component.scss'
]
})
export
class
PmsCompetencyComponent
{
@
Input
()
fCurrentPart
=
""
currentPart
=
""
@
Input
()
canSave
=
false
@
Input
()
evaluateeId
=
""
@
Input
()
evaluaterId
=
""
@
Input
()
appraisalCompentencyList
:
Competency
[]
=
[]
...
...
@@ -24,9 +26,12 @@ export class PmsCompetencyComponent {
@
Output
()
compentencyScore
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Output
()
compentencyWeightScore
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Output
()
compentencyGap
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Output
()
sendInforWeight
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Output
()
sendInforGap
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Input
()
canEdit
=
false
@
Input
()
currentStep
=
""
@
Input
()
dateIso
=
""
@
Input
()
currentTap
=
""
hoveredCode
:
string
|
null
=
null
;
hoveredCode2
:
string
|
null
=
null
;
...
...
@@ -53,6 +58,8 @@ export class PmsCompetencyComponent {
biScore
:
Map
<
string
,
number
>
=
new
Map
<
string
,
number
>
()
@
ViewChild
(
'scrollContainer'
)
scrollContainer
!
:
ElementRef
;
inforWeight
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
inforGap
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
constructor
(
private
appraisalService
:
AppraisalService
,
private
employeeService
:
EmployeeService
,
private
cdr
:
ChangeDetectorRef
,
...
...
@@ -62,12 +69,20 @@ export class PmsCompetencyComponent {
}
ngOnInit
():
void
{
if
(
this
.
appraisalCompentencyList
.
length
)
{
this
.
currentPart
=
this
.
currentPart
==
''
?
this
.
appraisalCompentencyList
[
0
].
comType
:
this
.
c
urrentPart
this
.
currentPart
=
this
.
fCurrentPart
==
''
?
this
.
appraisalCompentencyList
[
0
].
comType
:
this
.
fC
urrentPart
}
this
.
getAppraisalCompentencyForm
(
0
)
this
.
getSettingList
()
this
.
getEvaluatee
()
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
changes
[
'currentTap'
]?.
currentValue
||
changes
[
'appraisalCompentencyList'
]?.
currentValue
)
{
if
(
this
.
appraisalCompentencyList
.
length
)
{
this
.
currentPart
=
this
.
fCurrentPart
==
''
?
this
.
appraisalCompentencyList
[
0
].
comType
:
this
.
fCurrentPart
}
this
.
getAppraisalCompentencyForm
(
0
)
}
}
getEvaluatee
()
{
this
.
evaluatee
.
loading
=
true
...
...
@@ -99,7 +114,12 @@ export class PmsCompetencyComponent {
getAppraisalCompentencyForm
(
index
:
number
)
{
if
(
this
.
appraisalCompentencyList
.
length
)
{
this
.
appraisalCompentencyIndex
=
index
if
(
this
.
fCurrentPart
)
{
this
.
currentPart
=
this
.
fCurrentPart
this
.
fCurrentPart
=
''
}
else
{
this
.
currentPart
=
this
.
appraisalCompentencyList
[
this
.
appraisalCompentencyIndex
].
comType
}
this
.
biOpen
.
clear
()
this
.
appraisalCompentencyFilter
().
forEach
((
x
,
i
)
=>
{
this
.
biOpen
.
set
(
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
competencyIndicatorsCourses0
.
competencyTopic
.
competencyTopicId
,
false
)
...
...
@@ -270,6 +290,7 @@ export class PmsCompetencyComponent {
this
.
inFormRemain
(
data
)
).
filter
(
data
=>
data
!=
0
).
length
this
.
allFormRemain
()
this
.
allWeightGap
()
return
remain
}
allFormRemain
()
{
...
...
@@ -285,6 +306,14 @@ export class PmsCompetencyComponent {
this
.
compentencyForm
.
emit
(
this
.
appraisalCompentencyList
)
this
.
compentencyFormRemain
.
emit
(
remain
)
}
allWeightGap
()
{
this
.
appraisalCompentencyList
.
forEach
(
x
=>
{
this
.
inforWeight
.
set
(
x
.
comType
,
x
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
+
''
)
this
.
inforGap
.
set
(
x
.
comType
,
this
.
calGap
(
x
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
)
??
''
)
})
this
.
sendInforWeight
.
emit
(
this
.
inforWeight
)
this
.
sendInforGap
.
emit
(
this
.
inforGap
)
}
allBiOpen
(
status
:
boolean
,
part
?:
string
)
{
this
.
biOpen
.
forEach
((
_
,
key
)
=>
{
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-form-employee.component.html
View file @
d829e571
<ng-container
*
ngTemplateOutlet=
"evaluation"
></ng-container>
<ng-template
#
evaluation
>
<div
*
ngIf=
"evaluationForm=='sup'"
class=
"pt-1.5rem w-full min-height-50px justify-between items-center"
>
<div
class=
"flex"
>
<button
type=
"button"
<div
class=
" pt-1.5rem"
>
<div
class=
"flex flex-col gap-2"
>
<div
class=
"flex flex-row gap-2"
>
<div
class=
"flex flex-col gap-2 w-1/4"
>
<div
class=
"w-full mb-2"
>
<div
class=
"font-size-18px font-weight-700 text-primary"
>
<div
class=
"absolute "
style=
"transform:translateY(-9px)"
>
<button
type=
"button"
*
ngIf=
"evaluationForm=='sup'"
class=
"ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500 bg-white"
(
click
)="
returnPath
()"
>
<i
class=
"ti ti-chevron-left"
></i>
ย้อนกลับ
</button>
<div
class=
"font-size-18px font-weight-700 align-center hover:text-primary pl-1rem hover:text-gray-900"
>
ประเมินผล PMS
</div>
<span
class=
"whitespace-nowrap relative"
[
ngStyle
]="{'
left
'
:
evaluationForm=
='sup'
?
'
105px
'
:
'
0px
'}"
>
ประเมินผลประจำปี {{currentDate.getFullYear()}}
</span>
</div>
</div>
<div
class=
" pt-1.5rem"
>
<div
class=
"flex flex-row gap-2"
>
<div
class=
"flex flex-col gap-2 w-1/4"
>
<div
class=
"w-full mb-2"
>
<div
class=
"font-size-18px font-weight-700 text-primary"
>
ประเมินผลประจำปี {{currentDate.getFullYear()}}
</div>
<div
class=
"flex flex-col w-3/4 gap-2"
>
<div
class=
"w-full mb-2 flex"
>
<div
class=
"w-1/2 flex flex-row gap-2"
>
<ng-container
*
ngFor=
"let item of compentency.dataList; let i=index ; let f= first"
>
<div
class=
"font-size-18px font-weight-700"
>
<span
class=
"cursor-pointer"
[
ngClass
]="{'
text-secondary
border-secondary
border-b
'
:compentency
.
data
?.
tdesc=
=item.tdesc,'hover:text-gray-900':!(compentency.data?.tdesc==item.tdesc)}"
(
click
)="
compentency
.
data
?.
tdesc
!==
item
.
tdesc
&&
changeForm
(
item
)"
>
{{item.tdesc}}
</span>
</div>
<div
class=
"flex flex-col gap-2"
style=
"height:81vh;overflow-y: auto;"
>
<div
class=
"w-full"
*
ngIf=
"compentency.data"
>
</ng-container>
</div>
<div
class=
"w-1/2"
>
<div
class=
"font-size-18px font-weight-700 text-primary text-right"
>
สถานะผู้ประเมิน
:
{{currentStepText()}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"flex flex-row gap-2"
>
<div
class=
"flex flex-col gap-2 w-1/4"
[
class
.
hidden
]="
menuClose
.
get
('ข้อมูลรายละเอียด')"
>
<div
class=
"flex flex-col gap-2"
style=
"height:calc(100vh - 177px);overflow-y: auto;"
>
<div
class=
"w-full"
*
ngIf=
"kpiScorePart.length > 0"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-body py-2"
>
<div
class=
"flex flex-row gap-2"
[
ngStyle
]="{'
justify-content
'
:
compentency
.
data
.
pms
.
gradeScore
?'
space-between
'
:
'
center
'}"
>
<div
[
ngClass
]="{'
w-full
'
:
!
compentency
.
data
.
pms
.
gradeScore
,'
w-1
/
2
'
:compentency
.
data
.
pms
.
gradeScore
}"
>
<img
[
src
]="
evaluationForm=
='sup'?'./assets/img/users/woman2.PNG':'./assets/img/users/man.PNG'"
class=
"w-24 h-24 rounded-full ring-4 ring-white/10 mx-auto"
id=
"profile-img"
alt=
"profile-img"
/>
</div>
<div
*
ngIf=
"compentency.data.pms.gradeScore"
class=
"w-1/2 flex flex-col justify-center"
[
ngStyle
]="{'
justify-content
'
:kpiScorePart
[
kpiScorePart
.
length-1
].
score
?'
space-between
'
:
'
center
'}"
>
<div
[
ngClass
]="{'
w-full
'
:
!
kpiScorePart
[
kpiScorePart
.
length-1
].
score
,'
w-1
/
2
'
:kpiScorePart
[
kpiScorePart
.
length-1
].
score
}"
>
<img
[
src
]="
evaluationForm=
='sup'?'./assets/img/users/woman2.png':'./assets/img/users/man.PNG'"
class=
"w-24 h-24 rounded-full ring-4 ring-white/10 mx-auto"
id=
"profile-img"
alt=
"profile-img"
/>
</div>
<div
*
ngIf=
"kpiScorePart[kpiScorePart.length-1].score"
class=
"w-1/2 flex flex-col justify-center"
style=
"align-self: center;"
>
<div
class=
"flex-1 flex flex-row gap-1 justify-center"
>
<div
*
ngFor=
"let item of [1,2,3,4,5]"
>
<i
class=
"ti"
style=
"font-size:20px"
[
ngClass
]="
item
<=
gradeStar
(
compentency
.
data
.
pms
.
gradeS
core
)
?
'
ti-star-filled
text-warning
'
:
'
ti-star
text-gray-300
'"
></i>
[
ngClass
]="
item
<=
gradeStar
(
kpiScorePart
[
kpiScorePart
.
length-1
].
s
core
)
?
'
ti-star-filled
text-warning
'
:
'
ti-star
text-gray-300
'"
></i>
</div>
</div>
<div
class=
"flex-1 text-center"
>
{{compentency.data.pms.gradeScore? "GRADE : " + compentency.data.pms.gradeScore : ''}}
{{kpiScorePart[kpiScorePart.length-1].score ? ("GRADE : " +
kpiScorePart[kpiScorePart.length-1].score) : ''}}
</div>
</div>
</div>
...
...
@@ -49,60 +74,68 @@
</div>
<div
class=
"w-full"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-header
"
>
<div
class=
"box-header"
[
class
.
border-none
]="
menuClose
.
get
('ข้อมูลพนักงาน')
"
>
<div
class=
"flex justify-between"
>
<h5
class=
"box-title"
>
ข้อมูลพนักงาน
</h5>
</div>
</div>
<div
class=
"box-body py-2"
>
<h5
class=
"box-title align-center"
>
ข้อมูลพนักงาน
</h5>
<i
*
ngIf=
"menuClose.get('ข้อมูลพนักงาน')"
title=
"แสดง"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('ข้อมูลพนักงาน',
false
)"
></i>
<i
*
ngIf=
"!menuClose.get('ข้อมูลพนักงาน')"
title=
"ปิด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('ข้อมูลพนักงาน',
true
)"
></i>
</div>
</div>
<div
class=
"box-body py-2"
[
class
.
hidden
]="
menuClose
.
get
('ข้อมูลพนักงาน')"
>
<table
class=
"ti-custom-table border-0 ellipsis-text"
>
<tbody>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
รหัสพนักงาน
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
"
>
<td
class=
"font-medium !p-2 align-start
"
>
รหัสพนักงาน
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
"
>
{{evaluatee.data.employeeId}}
</td>
</tr>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
ตำเเหน่ง
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
!text-warp"
>
<td
class=
"font-medium !p-2 align-start
"
>
ตำเเหน่ง
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
!text-warp"
>
{{evaluatee.data.position.tdesc}}
</td>
</tr>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
ฝ่าย
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
!text-warp"
>
<td
class=
"font-medium !p-2 align-start
"
>
ฝ่าย
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
!text-warp"
>
{{evaluatee.data.bu1.tdesc}}
</td>
</tr>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
แผนก
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
!text-warp"
>
<td
class=
"font-medium !p-2 align-start
"
>
แผนก
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
!text-warp"
>
{{evaluatee.data.bu2.tdesc}}
</td>
</tr>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
ส่วน
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
!text-warp"
>
<td
class=
"font-medium !p-2 align-start
"
>
ส่วน
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
!text-warp"
>
{{evaluatee.data.bu3.tdesc}}
</td>
</tr>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
ส่วนย่อย 1
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
!text-warp"
>
<td
class=
"font-medium !p-2 align-start
"
>
ส่วนย่อย 1
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
!text-warp"
>
{{evaluatee.data.bu4.tdesc}}
</td>
</tr>
<tr
class=
"!border-0"
>
<td
class=
"font-medium !p-2
"
>
ส่วนย่อย 2
</td>
<td
class=
"!p-2
"
>
:
</td>
<td
class=
"font-medium !p-2
!text-warp"
>
<td
class=
"font-medium !p-2 align-start
"
>
ส่วนย่อย 2
</td>
<td
class=
"!p-2 align-start
"
>
:
</td>
<td
class=
"font-medium !p-2 align-start
!text-warp"
>
{{evaluatee.data.bu5.tdesc}}
</td>
</tr>
...
...
@@ -113,12 +146,20 @@
</div>
<div
class=
"w-full"
*
ngIf=
"currentTap=='แบบประเมินสมรรถนะ'"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-header
"
>
<div
class=
"box-header"
[
class
.
border-none
]="
menuClose
.
get
('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ')
"
>
<div
class=
"flex justify-between"
>
<h5
class=
"box-title"
>
ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ
</h5>
</div>
</div>
<div
class=
"box-body py-2"
>
<h5
class=
"box-title align-center"
>
ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ
</h5>
<i
*
ngIf=
"menuClose.get('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ')"
title=
"แสดง"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:10px;font-size:27px;height:33px"
(
click
)="
menuClose
.
set
('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ',
false
)"
></i>
<i
*
ngIf=
"!menuClose.get('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ')"
title=
"ปิด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:10px;font-size:27px;height:33px"
(
click
)="
menuClose
.
set
('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ',
true
)"
></i>
</div>
</div>
<div
class=
"box-body py-2"
[
class
.
hidden
]="
menuClose
.
get
('ค่าถ่วงน้ำหนักของความสามารถในแต่ละระดับ')"
>
<div
class=
"w-full flex flex-col gap-2"
*
ngIf=
"compentency.data"
>
<div
class=
"w-full flex flex-col gap-2 mt-2"
>
<div
class=
"w-full flex flex-row gap-2"
>
...
...
@@ -138,7 +179,7 @@
<div
class=
"flex-1 font-size-18px font-weight-700 text-right align-center"
>
คะแนนเฉลี่ย
</div>
<div
class=
"flex-1 flex justify
-center"
>
<div
class=
"flex-1 flex justify-center items
-center"
>
<div
class=
"w-3/4 border border-secondary text-center align-center"
style=
"border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;"
>
{{compentencyWeightScore}}
...
...
@@ -147,7 +188,7 @@
<div
class=
"flex-1 font-size-18px font-weight-700 text-right align-center"
>
ผล Gap
</div>
<div
class=
"flex-1 flex justify
-center"
>
<div
class=
"flex-1 flex justify-center items
-center"
>
<div
class=
"w-3/4 border border-secondary text-center align-center"
style=
"border-radius:10px;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));height: 30px;"
>
{{compentencyGap}}
...
...
@@ -161,12 +202,20 @@
</div>
<div
class=
"w-full"
*
ngIf=
"currentTap=='ประเมินผลการปฏิบัติงาน'||currentTap=='สรุปคะแนนและข้อเสนอแนะ'"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-header
"
>
<div
class=
"box-header"
[
class
.
border-none
]="
menuClose
.
get
('สรุปผลประเมิน')
"
>
<div
class=
"flex justify-between"
>
<h5
class=
"box-title"
>
สรุปผลประเมิน
</h5>
</div>
</div>
<div
class=
"box-body py-2"
>
<h5
class=
"box-title align-center"
>
สรุปผลประเมิน
</h5>
<i
*
ngIf=
"menuClose.get('สรุปผลประเมิน')"
title=
"แสดง"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('สรุปผลประเมิน',
false
)"
></i>
<i
*
ngIf=
"!menuClose.get('สรุปผลประเมิน')"
title=
"ปิด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('สรุปผลประเมิน',
true
)"
></i>
</div>
</div>
<div
class=
"box-body py-2"
[
class
.
hidden
]="
menuClose
.
get
('สรุปผลประเมิน')"
>
<div
class=
'flex flex-col'
*
ngFor=
"let item of kpiScorePart; let i=index"
>
<div
class=
'flex flex-row'
>
<div
style=
"width: 25%;"
>
...
...
@@ -185,12 +234,20 @@
</div>
<div
class=
"w-full"
*
ngIf=
"compentency.data"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-header
"
>
<div
class=
"box-header"
[
class
.
border-none
]="
menuClose
.
get
('สถานะการประเมิน')
"
>
<div
class=
"flex justify-between"
>
<h5
class=
"box-title"
>
สถานะการประเมิน
</h5>
</div>
</div>
<div
class=
"box-body space-y-4 text-center"
>
<h5
class=
"box-title align-center"
>
สถานะการประเมิน
</h5>
<i
*
ngIf=
"menuClose.get('สถานะการประเมิน')"
title=
"แสดง"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('สถานะการประเมิน',
false
)"
></i>
<i
*
ngIf=
"!menuClose.get('สถานะการประเมิน')"
title=
"ปิด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('สถานะการประเมิน',
true
)"
></i>
</div>
</div>
<div
class=
"box-body space-y-4 text-center"
[
class
.
hidden
]="
menuClose
.
get
('สถานะการประเมิน')"
>
<ng-container
*
ngFor=
"let apsEmp of ['apsassessy','apsapprove1','apsapprove2','apsapprove3','apsapprove4','apsapprove5']; let i=index ; let f=first"
>
<div
class=
"flex flex-row"
*
ngIf=
"returnField(compentency.data,apsEmp+'.thFullName')"
>
...
...
@@ -200,7 +257,7 @@
</div>
<div
class=
"absolute rounded-full text-center align-center"
style=
"justify-items:center;top:-5px"
>
<span
class=
"d-
flex align-items-center justify-content-center rounded-circle text-white"
<span
class=
"
flex align-items-center justify-content-center rounded-circle text-white"
[
class
]="
assessmentStatusClass
(
compentency
.
data
.
currentStep
,
i
,
returnField
(
compentency
.
data
,
apsEmp
+'.
status
'))"
>
<i
[
class
]="
assessmentStatusIcon
(
compentency
.
data
.
currentStep
,
i
,
returnField
(
compentency
.
data
,
apsEmp
+'.
status
'))"
></i>
...
...
@@ -238,19 +295,28 @@
</div>
<div
class=
"w-full"
*
ngIf=
"commentAllFilter().length"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-header
"
>
<div
class=
"box-header"
[
class
.
border-none
]="
menuClose
.
get
('
Timeline
')
"
>
<div
class=
"flex justify-between"
>
<h5
class=
"box-title"
>
Timeline
</h5>
</div>
</div>
<div
class=
"box-body space-y-4 text-center"
>
<h5
class=
"box-title align-center"
>
Timeline
</h5>
<i
*
ngIf=
"menuClose.get('Timeline')"
title=
"แสดง"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('
Timeline
',
false
)"
></i>
<i
*
ngIf=
"!menuClose.get('Timeline')"
title=
"ปิด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:10px;font-size:27px"
(
click
)="
menuClose
.
set
('
Timeline
',
true
)"
></i>
</div>
</div>
<div
class=
"box-body space-y-4 text-center"
[
class
.
hidden
]="
menuClose
.
get
('
Timeline
')"
>
<div
class=
"flex flex-row"
*
ngFor=
"let item of commentAllFilter(); let i=index"
>
<div
class=
"mx-auto relative"
>
<div
class=
"h-full flex items-center justify-center pb-4"
style=
"width: 32px;"
>
<div
class=
"h-full w-[3px] bg-gray-100 pointer-events-none"
></div>
</div>
<div
class=
"absolute rounded-full text-center align-center"
style=
"justify-items:center;top:-5px"
>
<span
class=
"d-flex align-items-center justify-content-center rounded-circle text-white"
<div
class=
"absolute rounded-full text-center align-center"
style=
"justify-items:center;top:-5px"
>
<span
class=
"flex align-items-center justify-content-center rounded-circle text-white"
[
class
]="
statusCompetencyClass
(
item
.
statusType
)"
>
<i
[
class
]="
statusCompetencyIcon
(
item
.
statusType
)"
></i>
</span>
...
...
@@ -288,109 +354,92 @@
</div>
</div>
</div>
<div
class=
"flex flex-col w-3/4 gap-2"
>
<div
class=
"w-full mb-2 flex"
>
<div
class=
"w-3/4 flex flex-row gap-2"
>
<ng-container
*
ngFor=
"let item of compentency.dataList; let i=index ; let f= first"
>
<div
class=
"font-size-18px font-weight-700"
>
<span
class=
"cursor-pointer"
[
ngClass
]="{'
text-secondary
border-secondary
border-b
'
:compentency
.
data
?.
tdesc=
=item.tdesc,'hover:text-gray-900':!(compentency.data?.tdesc==item.tdesc)}"
(
click
)="
selectDataList
(
item
)"
>
{{item.tdesc}}
</span>
<div
class=
"flex flex-col gap-2"
[
ngClass
]="{
'
w-3
/
4
'
:
!
menuClose
.
get
('ข้อมูลรายละเอียด'),
'
w-full
'
:menuClose
.
get
('ข้อมูลรายละเอียด')}"
>
<div
class=
"w-full relative"
>
<div
class=
"absolute h-full hover-visible"
style=
"z-index: 1;transform: translateX(-15%);"
>
<div
[
title
]="
menuClose
.
get
('ข้อมูลรายละเอียด')?'แสดงข้อมูลรายละเอียด'
:
'ปิดข้อมูลรายละเอียด'"
(
click
)="
menuClose
.
get
('ข้อมูลรายละเอียด')?
menuClose
.
set
('ข้อมูลรายละเอียด',
false
)
:menuClose
.
set
('ข้อมูลรายละเอียด',
true
)"
class=
"cursor-pointer hover-show h-full border"
style=
"border-right:0 ;align-content:center;background: linear-gradient(to right, rgb(237, 237, 237), rgb(245 , 245 , 245 ),rgb(255, 255, 255 , 0));border-radius:20px 0 0 20px"
>
<i
*
ngIf=
"menuClose.get('ข้อมูลรายละเอียด')"
class=
"cursor-pointer ti ti-chevron-right "
style=
"padding: 1px;font-size:27px;height:33px"
(
click
)="
menuClose
.
set
('ข้อมูลรายละเอียด',
true
)"
></i>
<i
*
ngIf=
"!menuClose.get('ข้อมูลรายละเอียด')"
class=
"cursor-pointer ti ti-chevron-left "
style=
"padding: 1px;font-size:27px;height:33px"
(
click
)="
menuClose
.
set
('ข้อมูลรายละเอียด',
false
)"
></i>
</div>
</ng-container>
</div>
<div
class=
"w-1/4"
>
<div
class=
"font-size-18px font-weight-700 text-primary text-right"
>
สถานะผู้ประเมิน
:
{{currentStepText()}}
</div>
</div>
</div>
<div
class=
"w-full"
>
<div
class=
"box m-0"
style=
"border-radius:20px"
>
<div
class=
"box-header"
>
<div
class=
"flex
gap-2"
>
<button
type=
"button"
class=
"flex-1 border bg-white p-2 text-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
'ข้อมูลการประเมิน'
"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
='ข้อมูลการประเมิน'}"
>
ข้อมูลการประเมิน
</button
>
<button
type=
"button"
class=
"flex-1 flex justify-center !items-center border bg-white p-2 text-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
'แบบประเมินสมรรถนะ'
"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
='แบบประเมินสมรรถนะ'}"
>
แบบประเมินสมรรถนะ
<div
class=
"flex flex-row
gap-2"
>
<ng-container
*
ngFor=
"let item of ['ข้อมูลการประเมิน','แบบประเมินสมรรถนะ','ประเมินผลการปฏิบัติงาน','สรุปคะแนนและข้อเสนอแนะ','แผนพัฒนาบุคคลากร']"
>
<button
type=
"button"
class=
"flex-1 flex flex-row border bg-white p-2 justify-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
item"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
=item}"
>
<span
class=
"overflow-hidden text-ellipsis whitespace-nowrap align-center"
>
{{item}}
</span
>
<ng-container
*
ngIf=
"item=='แบบประเมินสมรรถนะ'"
>
<span
class=
"d-flex align-items
-center justify-content-center rounded-circle text-white"
<span
class=
"flex align
-center justify-content-center rounded-circle text-white"
[
class
.
bg-danger
]="
compentencyFormRemain
"
[
class
.
bg-success
]="!
compentencyFormRemain
"
>
<ng-container
*
ngIf=
"compentencyFormRemain"
>
{{compentencyFormRemain}}
</ng-container>
<i
*
ngIf=
"!compentencyFormRemain"
class=
"ti ti-check"
></i>
</span>
</button>
<button
type=
"button"
class=
"flex-1 flex justify-center !items-center border bg-white p-2 text-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
'ประเมินผลการปฏิบัติงาน'
"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
='ประเมินผลการปฏิบัติงาน'}"
>
ประเมินผลการปฏิบัติงาน
</ng-container>
<ng-container
*
ngIf=
"item=='ประเมินผลการปฏิบัติงาน'"
>
<span
class=
"d-
flex align-items-center justify-content-center rounded-circle text-white"
<span
class=
"
flex align-items-center justify-content-center rounded-circle text-white"
[
class
.
bg-danger
]="
kpiFormRemain
"
[
class
.
bg-success
]="!
kpiFormRemain
"
>
<ng-container
*
ngIf=
"kpiFormRemain"
>
{{kpiFormRemain}}
</ng-container>
<i
*
ngIf=
"!kpiFormRemain"
class=
"ti ti-check"
></i>
</span>
</ng-container>
</button>
<button
type=
"button"
class=
"flex-1 border bg-white p-2 text-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
'สรุปคะแนนและข้อเสนอแนะ'
"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
='สรุปคะแนนและข้อเสนอแนะ'}"
>
สรุปคะแนนและข้อเสนอแนะ
</button>
<button
type=
"button"
class=
"flex-1 border bg-white p-2 text-center"
style=
"border-radius:20px"
(
click
)="
currentTap=
'แผนพัฒนาบุคคลากร'
"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentTap=
='แผนพัฒนาบุคคลากร'}"
>
แผนพัฒนาบุคคลากร
</button>
</ng-container>
</div>
</div>
<div
class=
"box-body"
>
<ng-container
*
ngIf=
"currentTap=='ข้อมูลการประเมิน'"
>
<app-pms-information></app-pms-information>
</ng-container>
<ng-container
*
ngIf=
"currentTap=='แบบประเมินสมรรถนะ'&&compentency.data&&evaluaterId&&evaluateeId"
>
<app-pms-competency
[
appraisalCompentencyList
]="
compentency
.
data
.
competency
"
[
evaluaterId
]="
evaluaterId
"
<div
class=
"box-body pt-2"
*
ngIf=
"compentency.data&&evaluaterId&&evaluateeId"
[
class
.
pb-0
]="
canSave
"
>
<div
[
class
.
hidden
]="
currentTap
!='ข้อมูลการประเมิน'"
>
<app-pms-information
[
statusType
]="
compentency
.
data
.
statusType
"
[
canSave
]="
canSave
"
[
appraisalPms
]="
compentency
.
data
.
pms
"
[
appraisalCompentencyList
]="
compentency
.
data
.
competency
"
[
inforGap
]="
inforGap
"
[
inforWeight
]="
inforWeight
"
[
kpiScore
]="
kpiScorePart
.
length
>
1 ?kpiScorePart[kpiScorePart.length-2].score : ''"
[kpiGrade]="kpiScorePart.length > 0 ?kpiScorePart[kpiScorePart.length-1].score : ''"
[kpiName]="compentency.data.tdesc" (sendCurrentTap)="currentTap=$event"
(sendCurrentPart)="currentPart=$event">
</app-pms-information>
</div>
<div
[
class
.
hidden
]="
currentTap
!='แบบประเมินสมรรถนะ'"
>
<app-pms-competency
[
currentTap
]="
currentTap
"
[
canSave
]="
canSave
"
[
fCurrentPart
]="
currentPart
"
[
appraisalCompentencyList
]="
compentency
.
data
.
competency
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
canEdit
]="
canEdit
"
[
currentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
(
compentencyScore
)="
compentencyScore=
$event"
(
compentencyWeightScore
)="
compentencyWeightScore=
$event"
(
compentencyGap
)="
compentencyGap=
$event"
(
compentencyFormRemain
)="
compentencyFormRemain=
$event"
(
compentencyForm
)="
compentency
.
data
.
competency=
$event"
></app-pms-competency>
</ng-container
>
<ng-container
*
ngIf=
"currentTap=='ประเมินผลการปฏิบัติงาน'&&compentency.data&&evaluateeId&&evaluaterId"
>
<
ng-container
*
ngIf=
"compentency.data&&evaluateeId&&evaluaterId
"
>
<app-pms-kpi
[
appraisalPms
]="
compentency
.
data
.
pms
"
[
currentTap
]="
currentTap
"
(
compentencyForm
)="
compentency
.
data
.
competency=
$event"
(
sendInforGap
)="
inforGap=
$event"
(
sendInforWeight
)="
inforWeight=
$event"
></app-pms-competency
>
</div
>
<
div
[
class
.
hidden
]="
currentTap
!='ประเมินผลการปฏิบัติงาน'&&
currentTap
!='สรุปคะแนนและข้อเสนอแนะ'
"
>
<app-pms-kpi
[
canSave
]="
canSave
"
[
appraisalPms
]="
compentency
.
data
.
pms
"
[
currentTap
]="
currentTap
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
canEdit
]="
canEdit
"
[
currentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
(
kpiFormRemain
)="
kpiFormRemain=
$event"
(
scorePart
)="
kpiScorePart=
$event"
(
kpiForm
)="
compentency
.
data
.
pms=
$event"
></app-pms-kpi>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"currentTap=='สรุปคะแนนและข้อเสนอแนะ'&&compentency.data&&evaluateeId&&evaluaterId"
>
<app-pms-kpi
[
appraisalPms
]="
compentency
.
data
.
pms
"
[
currentTap
]="
currentTap
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
canEdit
]="
canEdit
"
[
currentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
(
kpiFormRemain
)="
kpiFormRemain=
$event"
(
scorePart
)="
kpiScorePart=
$event"
(
kpiForm
)="
compentency
.
data
.
pms=
$event"
></app-pms-kpi>
</ng-container>
<ng-container
*
ngIf=
"currentTap=='แผนพัฒนาบุคคลากร'&&compentency.data&&evaluateeId&&evaluaterId"
>
<app-pms-idp
[
appraisalIdp
]="
compentency
.
data
.
idp
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
canEdit
]="
evaluationForm=
='sup'?canEdit:false"
[
currentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
(
idpForm
)="
compentency
.
data
.
idp=
$event"
></app-pms-idp>
</ng-container>
</div>
<div
[
class
.
hidden
]="
currentTap
!='แผนพัฒนาบุคคลากร'"
>
<app-pms-idp
[
currentTap
]="
currentTap
"
[
canSave
]="
canSave
"
[
appraisalIdp
]="
compentency
.
data
.
idp
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
canEdit
]="
evaluationForm=
='sup'?canEdit:false"
[
currentStep
]="
compentency
.
data
.
currentStep
"
[
dateIso
]="
dateIso
"
(
idpForm
)="
compentency
.
data
.
idp=
$event"
></app-pms-idp>
</div>
</div>
<div
*
ngIf=
"compentency.data&&canSave"
class=
"box-footer text-end space-x-3 rtl:space-x-reverse"
>
<div
class=
"py-4 space-y-3 border-t border-gray-200
dark:border-white/10"
>
<textarea
type=
"text"
class=
"ti-form-input"
rows=
"4
"
placeholder=
"ใส่ Comment ที่นี่"
<div
class=
"pb-4 space-y-3
dark:border-white/10"
>
<textarea
type=
"text"
class=
"ti-form-input"
rows=
"2
"
placeholder=
"ใส่ Comment ที่นี่"
[(
ngModel
)]="
comment
"
></textarea>
</div>
<button
(
click
)="
save
('
approve
')"
class=
"ti-btn m-0 ti-btn-soft-secondary"
...
...
@@ -420,10 +469,5 @@
</div>
</div>
</div>
</div>
</ng-template>
\ No newline at end of file
<div
class=
"hidden"
*
ngIf=
"compentency.data"
>
<app-pms-competency
[
appraisalCompentencyList
]="
compentency
.
data
.
competency
"
(
compentencyFormRemain
)="
compentencyFormRemain=
$event"
></app-pms-competency>
<app-pms-kpi
[
appraisalPms
]="
compentency
.
data
.
pms
"
(
kpiFormRemain
)="
kpiFormRemain=
$event"
></app-pms-kpi>
</div>
\ No newline at end of file
src/app/components/performance-evaluation/pms-form-employee/pms-form-employee.component.scss
View file @
d829e571
.hover-visible
{
.hover-show
{
opacity
:
0
;
}
}
.hover-visible
:hover
{
.hover-show
{
opacity
:
1
;
}
}
src/app/components/performance-evaluation/pms-form-employee/pms-form-employee.component.ts
View file @
d829e571
...
...
@@ -18,12 +18,11 @@ export class PmsFormEmployeeComponent {
@
Input
()
evaluaterId
=
""
@
Input
()
evaluationForm
:
'self'
|
'sup'
=
"self"
evaluatee
:
{
loading
:
boolean
,
data
:
EmployeeModel
}
=
{
loading
:
false
,
data
:
new
MyEmployeeModel
()
}
currentPart
=
""
@
Output
()
sendReturnPath
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
starRate
=
5
;
url1
=
''
;
url2
=
''
;
selectedItems
=
[];
dropdownSettings
=
{};
...
...
@@ -39,8 +38,7 @@ export class PmsFormEmployeeComponent {
{
id
:
'5'
,
itemName
:
'Bootstrap'
},
];
compentency
:
{
loading
:
boolean
,
data
?:
CompetencyModel
,
dataList
:
CompetencyModel
[]
}
=
{
loading
:
false
,
data
:
undefined
,
dataList
:
[]
}
compentency
:
{
loading
:
boolean
,
originalData
?:
CompetencyModel
,
data
?:
CompetencyModel
,
dataList
:
CompetencyModel
[]
}
=
{
loading
:
false
,
data
:
undefined
,
dataList
:
[]
}
canSave
=
false
canEdit
=
false
canDraft
=
false
...
...
@@ -54,8 +52,25 @@ export class PmsFormEmployeeComponent {
compentencyWeightScore
=
""
compentencyGap
=
""
inforWeight
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
inforGap
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
kpiScorePart
:
{
text
:
string
,
score
:
string
}[]
=
[]
menuClose
:
Map
<
string
,
boolean
>
=
new
Map
<
string
,
boolean
>
()
hasPushedState
=
false
;
companyId
=
""
constructor
(
private
router
:
Router
,
private
employeeService
:
EmployeeService
,
private
appraisalService
:
AppraisalService
,
private
cdr
:
ChangeDetectorRef
,
private
tokenService
:
TokenService
)
{
}
currentStepText
=
()
=>
{
if
(
this
.
compentency
.
data
)
{
if
(
this
.
compentency
.
data
.
apsassessy
.
employeeId
==
this
.
evaluaterId
)
{
...
...
@@ -223,24 +238,11 @@ export class PmsFormEmployeeComponent {
year
:
'numeric'
});
};
hasPushedState
=
false
;
companyId
=
""
handleBack
=
(
event
:
PopStateEvent
)
=>
{
this
.
returnPath
()
this
.
router
.
navigate
([
'/supervisor-evaluation'
]);
};
constructor
(
private
router
:
Router
,
private
employeeService
:
EmployeeService
,
private
appraisalService
:
AppraisalService
,
private
cdr
:
ChangeDetectorRef
,
private
tokenService
:
TokenService
)
{
}
ngOnDestroy
()
{
window
.
removeEventListener
(
'popstate'
,
this
.
handleBack
);
...
...
@@ -280,7 +282,9 @@ export class PmsFormEmployeeComponent {
}
selectDataList
(
data
:
CompetencyModel
)
{
this
.
compentency
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
this
.
compentency
.
originalData
=
this
.
deepClone
(
data
)
this
.
compentency
.
data
=
this
.
deepClone
(
data
)
this
.
cdr
.
detectChanges
()
if
(
this
.
compentency
.
data
)
{
this
.
currentTap
=
"ข้อมูลการประเมิน"
this
.
compentency
.
data
.
commentAll
.
sort
((
a
,
b
)
=>
new
Date
(
b
.
commentDate
).
getTime
()
-
new
Date
(
a
.
commentDate
).
getTime
());
...
...
@@ -425,7 +429,7 @@ export class PmsFormEmployeeComponent {
type
StepKey
=
'apsassessy'
|
'apsapprove1'
|
'apsapprove2'
|
'apsapprove3'
|
'apsapprove4'
|
'apsapprove5'
;
const
steps
:
StepKey
[]
=
[
'apsassessy'
,
'apsapprove1'
,
'apsapprove2'
,
'apsapprove3'
,
'apsapprove4'
,
'apsapprove5'
];
const
stepIndex
=
parseInt
(
this
.
compentency
.
data
.
currentStep
,
10
);
const
updatedData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
compentency
.
data
));
const
updatedData
=
this
.
deepClone
(
this
.
compentency
.
data
)
if
(
approveStatus
===
'3'
&&
stepIndex
>=
2
)
{
const
prevKey
:
StepKey
=
steps
[
stepIndex
-
1
];
updatedData
[
prevKey
]
=
{
...
...
@@ -531,4 +535,162 @@ export class PmsFormEmployeeComponent {
}
}
changeForm
(
item
:
CompetencyModel
)
{
const
ignorePart
=
[
'competency'
,
'!competency[].apsassessy'
,
'!competency[].apsapprove1'
,
'!competency[].apsapprove2'
,
'!competency[].apsapprove3'
,
'!competency[].apsapprove4'
,
'!competency[].apsapprove5'
,
'!competency[].masfromEvaluationAssessment1lList[].apsassessyDate'
,
'!competency[].masfromEvaluationAssessment1lList[].apsapprove1Date'
,
'!competency[].masfromEvaluationAssessment1lList[].apsapprove2Date'
,
'!competency[].masfromEvaluationAssessment1lList[].apsapprove3Date'
,
'!competency[].masfromEvaluationAssessment1lList[].apsapprove4Date'
,
'!competency[].masfromEvaluationAssessment1lList[].apsapprove5Date'
,
'!competency[].masfromEvaluationAssessment1lList[].numberCheck1'
,
'!competency[].masfromEvaluationAssessment1lList[].numberCheck2'
,
'!competency[].masfromEvaluationAssessment1lList[].numberCheck3'
,
'!competency[].masfromEvaluationAssessment1lList[].numberCheck4'
,
'!competency[].masfromEvaluationAssessment1lList[].numberCheck5'
,
'!competency[].masfromEvaluationAssessment1lList[].weightedTotal'
,
'!competency[].masfromEvaluationAssessment1lList[].averageScore'
,
'pms'
,
'!pms.gradeScore'
,
'!pms.apsassessyDate'
,
'!pms.apsapprove1Date'
,
'!pms.apsapprove2Date'
,
'!pms.apsapprove3Date'
,
'!pms.apsapprove4Date'
,
'!pms.apsapprove5Date'
,
'!pms.netScore'
,
'!pms.part1SumScore'
,
'!pms.part2SumScore'
,
'!pms.part3SumScore'
,
'!pms.part4SumScore'
,
'!pms.part5SumScore'
,
'!pms.part6SumScore'
,
'!pms.part7SumScore'
,
]
const
diffs
=
this
.
findDifferencesInclude
(
this
.
compentency
.
data
,
this
.
compentency
.
originalData
,
ignorePart
);
if
(
diffs
.
mini
.
length
)
{
Swal
.
fire
({
icon
:
'warning'
,
title
:
'มีการประเมินโดยที่ยังไม่มีการบันทึก'
,
text
:
'คุณต้องการเปลี่ยนรอบการประเมินหรือไม่'
,
showCancelButton
:
true
,
confirmButtonText
:
'ยืนยัน'
,
cancelButtonText
:
'ยกเลิก'
,
customClass
:
{
title
:
'!swal2-title-mt-20px'
,
actions
:
'!swal2-actions-mt-20px'
,
confirmButton
:
'!swal2-button-bg-green'
,
cancelButton
:
'!swal2-button-bg-gray'
,
},
}).
then
((
result
)
=>
{
if
(
result
.
isConfirmed
)
{
this
.
selectDataList
(
item
)
}
else
if
(
result
.
dismiss
===
Swal
.
DismissReason
.
cancel
)
{
}
})
}
else
{
this
.
selectDataList
(
item
)
}
}
deepClone
(
obj
:
any
)
{
return
JSON
.
parse
(
JSON
.
stringify
(
obj
));
}
findDifferencesInclude
(
obj1
:
any
,
obj2
:
any
,
rawPaths
:
string
[]
=
[
''
],
prefix
=
''
):
{
full
:
string
[];
mini
:
string
[]
}
{
const
full
:
string
[]
=
[];
const
mini
:
string
[]
=
[];
const
includePaths
=
rawPaths
.
filter
(
p
=>
!
p
.
startsWith
(
'!'
));
const
excludePaths
=
rawPaths
.
filter
(
p
=>
p
.
startsWith
(
'!'
))
.
map
(
p
=>
p
.
slice
(
1
));
// แปลง excludePaths เป็น regex สำหรับตรวจสอบ
const
excludePatterns
=
excludePaths
.
map
(
p
=>
{
const
pattern
=
p
.
replace
(
/
\.
/g
,
'
\\
.'
).
replace
(
/
\[\]
/g
,
'
\\
[
\\
d+
\\
]'
);
return
new
RegExp
(
`^
${
pattern
}
`
);
});
const
isExcluded
=
(
path
:
string
)
=>
excludePatterns
.
some
(
r
=>
r
.
test
(
path
));
const
isIncluded
=
(
path
:
string
)
=>
{
if
(
includePaths
.
length
===
0
)
return
true
;
return
includePaths
.
some
(
inc
=>
path
.
startsWith
(
inc
));
};
// ฟังก์ชันช่วยสร้าง path ใหม่
const
makePath
=
(
base
:
string
,
key
:
string
|
number
)
=>
base
?
(
typeof
key
===
'number'
?
`
${
base
}
[
${
key
}
]`
:
`
${
base
}
.
${
key
}
`
)
:
String
(
key
);
// เช็คกรณี array
if
(
Array
.
isArray
(
obj1
)
&&
Array
.
isArray
(
obj2
))
{
const
maxLength
=
Math
.
max
(
obj1
.
length
,
obj2
.
length
);
for
(
let
i
=
0
;
i
<
maxLength
;
i
++
)
{
const
fullPath
=
makePath
(
prefix
,
i
);
if
(
isExcluded
(
fullPath
)
||
!
isIncluded
(
fullPath
))
continue
;
const
val1
=
obj1
[
i
];
const
val2
=
obj2
[
i
];
if
(
val1
===
val2
)
continue
;
if
(
val1
&&
val2
&&
typeof
val1
===
'object'
&&
typeof
val2
===
'object'
)
{
const
diffs
=
this
.
findDifferencesInclude
(
val1
,
val2
,
rawPaths
,
fullPath
);
full
.
push
(...
diffs
.
full
);
mini
.
push
(...
diffs
.
mini
);
}
else
{
full
.
push
(
`
${
fullPath
}
:
${
JSON
.
stringify
(
val1
)}
!==
${
JSON
.
stringify
(
val2
)}
`
);
const
cleanFieldName
=
String
(
i
);
mini
.
push
(
`
${
cleanFieldName
}
:
${
JSON
.
stringify
(
val1
)}
!==
${
JSON
.
stringify
(
val2
)}
`
);
}
}
return
{
full
,
mini
};
}
// กรณี object
const
keys
=
new
Set
([
...(
obj1
&&
typeof
obj1
===
'object'
?
Object
.
keys
(
obj1
)
:
[]),
...(
obj2
&&
typeof
obj2
===
'object'
?
Object
.
keys
(
obj2
)
:
[]),
]);
for
(
const
key
of
keys
)
{
const
fullPath
=
makePath
(
prefix
,
key
);
if
(
isExcluded
(
fullPath
)
||
!
isIncluded
(
fullPath
))
continue
;
const
val1
=
obj1
?.[
key
];
const
val2
=
obj2
?.[
key
];
if
(
val1
===
val2
)
continue
;
const
bothAreObjects
=
val1
&&
val2
&&
typeof
val1
===
'object'
&&
typeof
val2
===
'object'
;
if
(
bothAreObjects
)
{
const
diffs
=
this
.
findDifferencesInclude
(
val1
,
val2
,
rawPaths
,
fullPath
);
full
.
push
(...
diffs
.
full
);
mini
.
push
(...
diffs
.
mini
);
}
else
{
full
.
push
(
`
${
fullPath
}
:
${
JSON
.
stringify
(
val1
)}
!==
${
JSON
.
stringify
(
val2
)}
`
);
const
fieldName
=
String
(
key
).
replace
(
/
\[\d
+
\]
/g
,
''
);
mini
.
push
(
`
${
fieldName
}
:
${
JSON
.
stringify
(
val1
)}
!==
${
JSON
.
stringify
(
val2
)}
`
);
}
}
return
{
full
,
mini
};
}
}
\ No newline at end of file
src/app/components/performance-evaluation/pms-form-employee/pms-idp/pms-idp.component.html
View file @
d829e571
<ng-container
*
ngTemplateOutlet=
"idpEvaluation"
></ng-container>
<ng-template
#
idpEvaluation
>
<ng-container
*
ngIf=
"appraisalIdp"
>
<div
style=
"
height: 46vh;overflow-y: auto;
"
>
<div
class=
"pb-2rem
px-2rem
"
>
<div
style=
"
overflow-y: auto;"
[
ngStyle
]="{'
height
'
:
canSave
?'
calc
(
100vh
-
414px
)'
:
'
calc
(
100vh
-
285pxpx
)'}
"
>
<div
class=
"pb-2rem"
>
<div
class=
"font-size-18px font-weight-700 text-primary"
>
แผนพัฒนาบุคคลากรรายบุคคล
</div>
</div>
<div
class=
"pb-2rem
px-2rem
"
>
<div
class=
"pb-2rem"
>
<div
class=
"font-size-18px font-weight-700 text-gray-500"
>
ส่วนที่ 1: ข้อมูลทั่วไป
</div>
</div>
<div
class=
"pb-2rem
px-2rem
"
>
<div
class=
"pb-2rem"
>
<div
class=
"grid grid-cols-6"
>
<div
class=
"col-span-6 grid grid-cols-6"
>
<div
class=
"col-span-3 border p-2 pb-4"
>
...
...
@@ -84,12 +84,12 @@
</div>
</div>
</div>
<div
class=
"pb-2rem
px-2rem
"
>
<div
class=
"pb-2rem"
>
<div
class=
"font-size-18px font-weight-700 text-gray-500"
>
ส่วนที่ 2: แนวทางการพัฒนา
</div>
</div>
<div
class=
"py-1rem
px-2rem
"
>
<div
class=
"py-1rem"
>
<div
class=
"py-2 grid grid-cols-6 gap-3"
>
<div
class=
"col-span-6"
>
หมายเหตุ : กรณี HR จัดอบรมให้ต้องเป็นไปตามเกณฑ์ที่ส่วนกลางกำหนดขึ้น
</div>
<div
class=
"col-span-6 grid grid-cols-6 gap-2"
>
...
...
@@ -126,7 +126,7 @@
</div>
</div>
</div>
<div
class=
"pb-2rem
px-2rem
"
>
<div
class=
"pb-2rem"
>
<div
class=
" rounded-top-0.65rem"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover2"
>
<thead
class=
"height-50px"
>
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-idp/pms-idp.component.ts
View file @
d829e571
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
,
ViewChild
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
,
SimpleChanges
,
ViewChild
}
from
'@angular/core'
;
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
Idp
}
from
'src/app/shared/model/competency.model'
;
import
{
CompetencycourseMiniModel
,
MyCompetencycourseMiniModel
}
from
'src/app/shared/model/competencycourse-mini.model'
;
...
...
@@ -19,6 +19,7 @@ interface table {
styleUrls
:
[
'./pms-idp.component.scss'
]
})
export
class
PmsIdpComponent
{
@
Input
()
canSave
=
false
@
Input
()
pathTitle
:
string
[]
=
[]
@
Input
()
evaluationRoundId
=
""
@
Input
()
evaluateeId
=
""
...
...
@@ -31,6 +32,7 @@ export class PmsIdpComponent {
@
Input
()
canEdit
=
false
@
Input
()
dateIso
=
""
@
Input
()
currentStep
=
""
@
Input
()
currentTap
=
""
@
Output
()
idpForm
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
competencycourse
:
{
loading
:
boolean
,
data
:
CompetencycourseMiniModel
[]
}
=
{
loading
:
false
,
data
:
[]
}
...
...
@@ -54,6 +56,11 @@ export class PmsIdpComponent {
this
.
getFormIdp
()
this
.
getCompetencycourseMiniList
()
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
changes
[
'currentTap'
]?.
currentValue
||
changes
[
'appraisalIdp'
]?.
currentValue
)
{
this
.
getFormIdp
()
}
}
getCompetencycourseMiniList
()
{
this
.
competencycourse
.
loading
=
false
this
.
competencycourseService
.
getMiniList
().
subscribe
({
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-information/pms-information.component.html
View file @
d829e571
<p>
pms-information works!
</p>
<div
class=
"flex flex-col gap-2"
style=
"overflow-y: auto;"
[
ngStyle
]="{'
height
'
:
canSave
?'
calc
(
100vh
-
414px
)'
:
'
calc
(
100vh
-
285px
)'}"
>
<div
class=
"flex"
>
<button
type=
"button"
class=
"p-4 w-full bg-secondary text-white text-left"
style=
"border-radius:20px"
(
click
)="
menuClose
.
set
('
Compentency
',!
menuClose
.
get
('
Compentency
'))"
>
รายละเอียดประเมินสมรรถนะ (Compentency)
</button>
</div>
<ng-container
*
ngIf=
"!menuClose.get('Compentency')"
>
<table
style=
"table-layout: fixed; width: 100%;"
>
<thead
class=
"border-b border-gray-200"
>
<tr
style=
"height:35px"
>
<th
scope=
"col"
>
แบบการประเมิน
</th>
<th
scope=
"col text-center"
>
วันที่เริ่มต้น
</th>
<th
scope=
"col text-center"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col text-center"
>
คะแนนเฉลี่ย
</th>
<th
scope=
"col text-center"
>
ผล GAP
</th>
<th
scope=
"col text-center"
>
การจัดการ
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let item of appraisalCompentencyList; let i=index"
>
<tr
class=
"border-b border-gray-200"
>
<td
class=
"py-2"
style=
"vertical-align: top"
>
{{item.masfromEvaluationAssessment1lList[0].competencyType.tdesc}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{formatThaiDate(item.masfromEvaluationRound.apsPeriodStart)}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{formatThaiDate(item.masfromEvaluationRound.apsPeriodEnd)}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{inforWeight.get(item.comType) !=='null'?inforWeight.get(item.comType): ''}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{inforGap.get(item.comType)!=='null'?inforGap.get(item.comType): ''}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
<div
class=
"flex justify-center"
>
<button
type=
"button"
class=
"ti-btn rounded-sm"
[
class
]="
statusButtonClass
(
statusType
)"
(
click
)="
sendCurrentTap
.
emit
('แบบประเมินสมรรถนะ');
sendCurrentPart
.
emit
(
statusType
)"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
>
{{item.comType}}
</button>
</div>
</td>
</tr>
</ng-container>
</tbody>
</table>
</ng-container>
<div
class=
"flex"
*
ngIf=
"appraisalPms"
>
<button
type=
"button"
class=
"p-4 w-full bg-secondary text-white text-left"
style=
"border-radius:20px"
(
click
)="
menuClose
.
set
('
PMS
',!
menuClose
.
get
('
PMS
'))"
>
รายละเอียดประเมินผลการปฏิบัติงาน (PMS)
</button>
</div>
<ng-container
*
ngIf=
"appraisalPms&&!menuClose.get('PMS')"
>
<table
style=
"table-layout: fixed; width: 100%;"
>
<thead
class=
"border-b border-gray-200"
>
<tr
style=
"height:35px"
>
<th
scope=
"col"
>
แบบการประเมิน
</th>
<th
scope=
"col text-center"
>
วันที่เริ่มต้น
</th>
<th
scope=
"col text-center"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col text-center"
>
ผลการประเมิน
</th>
<th
scope=
"col text-center"
>
เกรด
</th>
<th
scope=
"col text-center"
>
การจัดการ
</th>
</tr>
</thead>
<tbody>
<tr
class=
"border-b border-gray-200"
>
<td
class=
"py-2"
style=
"vertical-align: top"
>
{{kpiName}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{formatThaiDate(appraisalPms.pmsMasfromEvaluationRoundModel.apsPeriodStart)}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{formatThaiDate(appraisalPms.pmsMasfromEvaluationRoundModel.apsPeriodEnd)}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{kpiScore}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
{{kpiGrade}}
</td>
<td
class=
"py-2 text-center"
style=
"vertical-align: top"
>
<div
class=
"flex justify-center"
>
<button
type=
"button"
class=
"ti-btn rounded-sm"
[
class
]="
statusButtonClass
(
statusType
)"
(
click
)="
sendCurrentTap
.
emit
('ประเมินผลการปฏิบัติงาน');
sendCurrentPart
.
emit
(
statusType
)"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
>
PMS
</button>
</div>
</td>
</tr>
</tbody>
</table>
</ng-container>
</div>
\ No newline at end of file
src/app/components/performance-evaluation/pms-form-employee/pms-information/pms-information.component.ts
View file @
d829e571
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
Competency
,
Pms
}
from
'src/app/shared/model/competency.model'
;
@
Component
({
selector
:
'app-pms-information'
,
...
...
@@ -6,5 +7,44 @@ import { Component } from '@angular/core';
styleUrls
:
[
'./pms-information.component.scss'
]
})
export
class
PmsInformationComponent
{
@
Input
()
canSave
=
false
@
Input
()
statusType
=
''
@
Input
()
inforWeight
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
@
Input
()
inforGap
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
()
@
Input
()
appraisalCompentencyList
:
Competency
[]
=
[]
@
Input
()
appraisalPms
?:
Pms
@
Input
()
kpiScore
:
string
=
""
@
Input
()
kpiGrade
:
string
=
""
@
Input
()
kpiName
:
string
=
""
@
Output
()
sendCurrentTap
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Output
()
sendCurrentPart
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
menuClose
:
Map
<
string
,
boolean
>
=
new
Map
<
string
,
boolean
>
()
statusButtonClass
=
(
status
:
string
)
=>
{
if
(
status
===
"no access"
)
{
return
"ti-btn-soft-mute"
}
else
if
(
status
===
"pending"
)
{
return
"ti-btn-soft-secondary"
}
else
if
(
status
===
"evaluating"
)
{
return
"ti-btn-soft-warning"
}
else
if
(
status
===
"completed"
)
{
return
"ti-btn-soft-success"
}
else
if
(
status
===
"rejected"
)
{
return
"ti-btn-soft-danger"
}
else
{
return
""
}
}
formatThaiDate
(
dateStr
?:
string
):
string
{
if
(
!
dateStr
)
return
''
const
months
=
[
''
,
'มกราคม'
,
'กุมภาพันธ์'
,
'มีนาคม'
,
'เมษายน'
,
'พฤษภาคม'
,
'มิถุนายน'
,
'กรกฎาคม'
,
'สิงหาคม'
,
'กันยายน'
,
'ตุลาคม'
,
'พฤศจิกายน'
,
'ธันวาคม'
];
const
[
year
,
month
,
day
]
=
dateStr
.
split
(
'-'
).
map
(
Number
);
const
thaiYear
=
year
+
543
;
const
thaiMonth
=
months
[
month
];
return
`
${
day
}
${
thaiMonth
}
${
thaiYear
}
`
;
}
}
src/app/components/performance-evaluation/pms-form-employee/pms-kpi/pms-kpi.component.html
View file @
d829e571
...
...
@@ -9,7 +9,7 @@
(
click
)="
scrollToMenu
(
currentTap =
=
'ประเมินผลการปฏิบัติงาน'?('
menu-part-
'+(
i
+
1
))
:
('
menu-part-
'+(
i
+
8
)));
currentPart=
item;toggleAllParts(true,item)"
style=
"border-radius:20px;width: 100px"
[
ngClass
]="{'!
bg-primary
text-white
'
:currentPart=
=item}"
>
{{item}}
<span
class=
"leading-none"
>
{{ item }}
</span>
<ng-container
*
ngIf=
"currentTap == 'ประเมินผลการปฏิบัติงาน'"
>
<ng-container
*
ngIf=
"remainList()[i]>=0"
>
...
...
@@ -26,15 +26,16 @@
</ng-container>
<div
class=
"flex justify-around !items-center border bg-white p-2 text-right"
style=
"border-radius:20px;width: 100px;margin-left: auto;--tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity));"
>
<i
class=
"bg-white cursor-pointer border ti ti-chevron-down"
<i
title=
"แสดงทั้งหมด"
class=
"bg-white cursor-pointer border ti ti-chevron-down"
style=
"padding: 1px;border-radius:5px;font-size:27px"
(
click
)="
toggleAllParts
(
true
);
currentPart=
''
"
></i>
<i
class=
"bg-white cursor-pointer border ti ti-chevron-up"
<i
title=
"ปิดทั้งหมด"
class=
"bg-white cursor-pointer border ti ti-chevron-up"
style=
"padding: 1px;border-radius:5px;font-size:27px"
(
click
)="
toggleAllParts
(
false
);
currentPart=
''
"
></i>
</div>
</div>
<div
#
scrollContainer
class=
"flex flex-col gap-2"
style=
"height:40vh;overflow-y: auto;"
>
<div
#
scrollContainer
class=
"flex flex-col gap-2"
style=
"overflow-y: auto;"
[
ngStyle
]="{'
height
'
:
canSave
?'
calc
(
100vh
-
471px
)'
:
'
calc
(
100vh
-
342px
)'}"
>
<ng-container
*
ngIf=
"currentTap=='ประเมินผลการปฏิบัติงาน'"
>
<ng-container
*
ngIf=
"appraisalPms?.part1Detail?.length then part1 else noData"
></ng-container>
<ng-container
*
ngIf=
"appraisalPms?.part2Detail?.length then part2 else noData"
></ng-container>
...
...
src/app/components/performance-evaluation/pms-form-employee/pms-kpi/pms-kpi.component.ts
View file @
d829e571
...
...
@@ -27,6 +27,7 @@ export interface LevelStarModel {
styleUrls
:
[
'./pms-kpi.component.scss'
]
})
export
class
PmsKpiComponent
{
@
Input
()
canSave
=
false
data8List
:
Part8Model
[]
=
[{
id
:
1
,
evaluationFactor
:
"Part 1 : ประเมินผลการปฏิบัติงานตามนโยบายบริษัท (Corporate KPI)"
,
...
...
@@ -114,11 +115,6 @@ export class PmsKpiComponent {
const
key
=
targetDetail
[
index
??
0
]
as
keyof
Part5Detail
;
return
item
[
key
];
}
// ngOnChanges(changes: SimpleChanges): void {
// if (changes['evaluateeId']?.currentValue || changes['evaluaterId']?.currentValue) {
// this.toggleAllParts(this.evaluateeId == this.evaluaterId)
// }
// }
ngOnInit
():
void
{
this
.
partOpen
.
clear
()
this
.
partShow
=
this
.
currentTap
==
'ประเมินผลการปฏิบัติงาน'
?
[
'PART 1'
,
'PART 2'
,
'PART 3'
,
'PART 4'
,
'PART 5'
,
'PART 6'
,
'PART 7'
]
:
[
'PART 8'
,
'PART 9'
,
'PART 10'
]
...
...
@@ -128,8 +124,20 @@ export class PmsKpiComponent {
this
.
getPmsGroupGradeList
()
this
.
getAppraisalPmsForm
()
this
.
allFormRemain
()
this
.
sendScorePart
()
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
changes
[
'currentTap'
]?.
currentValue
||
changes
[
'appraisalPms'
]?.
currentValue
)
{
this
.
partOpen
.
clear
()
this
.
partShow
=
this
.
currentTap
==
'ประเมินผลการปฏิบัติงาน'
?
[
'PART 1'
,
'PART 2'
,
'PART 3'
,
'PART 4'
,
'PART 5'
,
'PART 6'
,
'PART 7'
]
:
[
'PART 8'
,
'PART 9'
,
'PART 10'
]
this
.
partShow
.
forEach
(
x
=>
{
this
.
partOpen
.
set
(
x
,
false
)
})
this
.
getAppraisalPmsForm
()
this
.
allFormRemain
()
this
.
sendScorePart
()
}
}
getAppraisalPmsForm
()
{
this
.
data8List
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
id
==
1
&&
this
.
appraisalPms
?.
part1Percentage
)
{
...
...
@@ -527,7 +535,8 @@ export class PmsKpiComponent {
sendScorePart
()
{
if
(
this
.
appraisalPms
)
{
const
score
=
this
.
data8List
.
map
((
x
,
i
)
=>
({
text
:
"PART "
+
(
i
+
1
),
score
:
this
.
numberFixed2
(
x
.
netScore
)
})).
concat
([{
text
:
"สุทธิ"
,
score
:
this
.
calNetScore
()
+
''
},
{
text
:
"Grade"
,
score
:
this
.
appraisalPms
.
gradeScore
}])
const
gradeScore
=
this
.
groupGrade
.
dataList
.
find
(
item
=>
Math
.
ceil
(
+
this
.
calNetScore
())
>=
item
.
gradeMinScore
&&
Math
.
ceil
(
+
this
.
calNetScore
())
<=
item
.
gradeMaxScore
);
const
score
=
this
.
data8List
.
map
((
x
,
i
)
=>
({
text
:
"PART "
+
(
i
+
1
),
score
:
this
.
numberFixed2
(
x
.
netScore
)
})).
concat
([{
text
:
"สุทธิ"
,
score
:
this
.
calNetScore
()
+
''
},
{
text
:
"Grade"
,
score
:
gradeScore
?.
gradeDetail
||
''
}])
this
.
scorePart
.
emit
(
score
)
}
}
...
...
src/app/components/performance-evaluation/self-evaluation/self-evaluation.component.html
View file @
d829e571
<ng-container
*
ngIf=
"!onEdit"
>
<!-- <app-page-header [pathTitle]="pathTitle"></app-page-header> -->
<ng-container
*
ngTemplateOutlet=
"selfEvaluation"
></ng-container>
</ng-container>
<ng-template
#
selfEvaluation
>
...
...
src/app/components/performance-evaluation/supervisor-evaluation/supervisor-evaluation.component.ts
View file @
d829e571
...
...
@@ -95,8 +95,8 @@ export class SupervisorEvaluationComponent {
}
decodeJWT
(
token
:
string
)
{
let
base64Url
=
token
.
split
(
'.'
)[
1
];
// ดึงส่วนที่เป็น Payload
let
base64
=
base64Url
.
replace
(
'-'
,
'+'
).
replace
(
'_'
,
'/'
);
// แก้ไข base64 ให้ถูกต้อง
let
base64Url
=
token
.
split
(
'.'
)[
1
];
let
base64
=
base64Url
.
replace
(
/-/g
,
'+'
).
replace
(
/_/g
,
'/'
);
let
jsonPayload
=
decodeURIComponent
(
atob
(
base64
).
split
(
''
).
map
(
function
(
c
)
{
return
'%'
+
(
'00'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
}).
join
(
''
));
...
...
src/app/shared/components/sidebar/sidebar.component.ts
View file @
d829e571
...
...
@@ -164,8 +164,8 @@ export class SidebarComponent {
}
// decodeJWT(token: string) {
// let base64Url = token.split('.')[1];
// ดึงส่วนที่เป็น Payload
// let base64 = base64Url.replace(
'-', '+').replace('_', '/'); // แก้ไข base64 ให้ถูกต้อง
// let base64Url = token.split('.')[1];
// let base64 = base64Url.replace(
/-/g, '+').replace(/_/g, '/');
// let jsonPayload = decodeURIComponent(atob(base64).split('').map(function (c) {
// return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
// }).join(''));
...
...
src/assets/css/style.css
View file @
d829e571
...
...
@@ -25111,14 +25111,14 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
}
.text-soft-secondary
{
color
:
rgb
(
var
(
--color-secondary
)
/
0.
1
);
color
:
rgb
(
var
(
--color-secondary
)
/
0.
25
);
}
.text-soft-secondary
:hover
{
color
:
rgb
(
var
(
--color-secondary
));
}
.
\
!
text-soft-secondary
{
color
:
rgb
(
var
(
--color-secondary
)
/
0.
1
)
!important
;
color
:
rgb
(
var
(
--color-secondary
)
/
0.
25
)
!important
;
}
.
\
!
text-soft-secondary
:hover
{
color
:
rgb
(
var
(
--color-secondary
))
!important
;
...
...
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