Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
myAppraisal
Commits
b3dfa482
Commit
b3dfa482
authored
Feb 26, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE รอบการประเมินผล
parent
34d18581
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
413 additions
and
535 deletions
+413
-535
evaluation-cycle-manager.component.ts
...ation-cycle-manager/evaluation-cycle-manager.component.ts
+2
-1
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+4
-3
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+21
-3
edit-evaluation-form.component.html
.../edit-evaluation-form/edit-evaluation-form.component.html
+252
-354
edit-evaluation-form.component.ts
...rm/edit-evaluation-form/edit-evaluation-form.component.ts
+121
-174
styles.scss
src/styles.scss
+13
-0
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle-manager.component.ts
View file @
b3dfa482
...
@@ -8,6 +8,6 @@ import { StatusCodeModel } from 'src/app/shared/model/status-code.model';
...
@@ -8,6 +8,6 @@ import { StatusCodeModel } from 'src/app/shared/model/status-code.model';
export
class
EvaluationCycleManagerComponent
{
export
class
EvaluationCycleManagerComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการรอบการประเมิน'
,
'รอบการประเมิน'
]
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการรอบการประเมิน'
,
'รอบการประเมิน'
]
activeTab
:
string
=
'underline-
2
'
;
// Tab แรกแสดงเป็นค่าเริ่มต้น
activeTab
:
string
=
'underline-
1
'
;
// Tab แรกแสดงเป็นค่าเริ่มต้น
groupShow
=
'1'
groupShow
=
'1'
}
}
\ No newline at end of file
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
b3dfa482
...
@@ -95,6 +95,7 @@
...
@@ -95,6 +95,7 @@
id=
"checkbox-{{item.data.evaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
id=
"checkbox-{{item.data.evaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
</td>
</td>
<td
>
<td
>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i>
<label
for=
"checkbox-{{item.data.evaluationRoundId}}"
>
{{item.data.evaluationRoundId}}
</label>
<label
for=
"checkbox-{{item.data.evaluationRoundId}}"
>
{{item.data.evaluationRoundId}}
</label>
</td>
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.tdesc}}
</td>
...
@@ -136,7 +137,7 @@
...
@@ -136,7 +137,7 @@
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#evaluation-cycle-page-modal"
></i>
data-hs-overlay=
"#evaluation-cycle-page-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-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#evaluation-cycle-page-alert-modal"
></i>
data-hs-overlay=
"#evaluation-cycle-page-alert-modal"
></i>
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
...
@@ -350,7 +351,7 @@
...
@@ -350,7 +351,7 @@
</div>
</div>
<div
id=
"evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"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=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out
m-3 lg:!mx-auto "
style=
"min-width: 70%;
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<h3
class=
"text-xxl font-bold text-primary"
>
...
@@ -365,7 +366,7 @@
...
@@ -365,7 +366,7 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<app-edit-evaluation-form></app-edit-evaluation-form>
<app-edit-evaluation-form
*
ngIf=
"evaluationRoundId"
[
evaluationRoundId
]="
evaluationRoundId
"
></app-edit-evaluation-form>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
b3dfa482
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
export
interface
DataModel
{
export
interface
DataModel
{
evaluationRoundId
:
string
;
evaluationRoundId
:
string
;
...
@@ -20,6 +21,7 @@ export interface DataModel {
...
@@ -20,6 +21,7 @@ export interface DataModel {
styleUrls
:
[
'./evaluation-cycle.component.scss'
]
styleUrls
:
[
'./evaluation-cycle.component.scss'
]
})
})
export
class
EvaluationCycleComponent
{
export
class
EvaluationCycleComponent
{
@
Output
()
evaluationRoundIdChange
=
new
EventEmitter
<
string
>
();
apsPeriodStart
:
string
=
''
;
apsPeriodStart
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
...
@@ -35,10 +37,10 @@ export class EvaluationCycleComponent {
...
@@ -35,10 +37,10 @@ export class EvaluationCycleComponent {
isDataListChecked
=
false
isDataListChecked
=
false
isDataListCheckedAll
=
false
isDataListCheckedAll
=
false
numDataListChecked
=
0
numDataListChecked
=
0
evaluationRoundId
=
''
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
,
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
...
@@ -171,6 +173,22 @@ export class EvaluationCycleComponent {
...
@@ -171,6 +173,22 @@ export class EvaluationCycleComponent {
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
}))
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
}))
}
}
}
}
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
this
.
evaluationRoundId
=
''
if
(
id
==
'evaluation-cycle-person-modal'
){
this
.
evaluationRoundId
=
evaluationRoundId
this
.
evaluationRoundIdChange
.
emit
(
evaluationRoundId
)
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
);
},
10
);
}
}
}
}
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.html
View file @
b3dfa482
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
</div>
</div>
<div
class=
"grid grid-cols-2 gap-6 mb-5"
>
<div
class=
"grid grid-cols-2 gap-6 mb-5"
>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
value=
"ช่วงเวลาที่ 2
"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
[
value
]="
evaluationRound
.
tdesc
"
>
</div>
</div>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
value=
"2567
"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
[
value
]="
evaluationRound
.
apsyear
"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
<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"
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;"
>
style=
"height: 40px;"
>
<div
<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"
>
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"
>
...
@@ -44,18 +44,17 @@
...
@@ -44,18 +44,17 @@
</div>
</div>
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-20px m-0 shadow-md"
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-20px m-0 shadow-md"
(
click
)="
openModalClass
('
modal-alert
')"
>
data-hs-overlay=
"#edit-evaluation-form-alert-modal"
>
<i
class=
"ri-save-3-line"
></i>
<i
class=
"ri-save-3-line"
></i>
Save
Save
</button>
</button>
</div>
</div>
<div
class=
"px-1"
>
<
!-- <
div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
...
@@ -68,398 +67,248 @@
...
@@ -68,398 +67,248 @@
<thead>
<thead>
<tr>
<tr>
<ng-container
<ng-container
*
ngFor=
"let item of ['รหัสเเบบฟอร์ม','ชื่อพนักงาน','ตำเเหน่ง','ระดับพนักงาน','Action']; let f = first; let l = last; let i = index"
>
*
ngFor=
"let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ระดับพนักงาน','การจัดการ']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<th
scope=
"col"
[
class
.!
text-center
]="
f
||
l
||
item =
==
'ระดับความหวัง'"
>
class=
"relative px-10px py-10px bg-soft-secondary text-primary !text-center"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<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>
</th>
</ng-container>
</ng-container>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let item of[
<tr
['F6702-01', 'พิมพร อุดมการ','Human Resource Development Officer S3','พนักงานระดับ S1-S2'],
*
ngFor=
"let item of assessmentListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
['F6702-02', 'กรกนก อินทนิน','HRD Training Officer','พนักงานระดับ S3-S4'],
<td
class=
"flex justify-center items-center"
>
['F6702-03', 'ลลิตา อาเเว','Recruitment & Employment Officer','พนักงานระดับ S1-S2'],
{{item.masfromEvaluationRoundModel.evaluationRoundId}}
</td>
['F6702-04', 'ภาวินี ย้อนเวลา','Time keeper & Doc.[Payroll] Officer','พนักงานระดับ S1-S2'],
<td>
{{item.apsassessy.fname}} {{item.apsassessy.lname}}
</td>
['F6702-06', 'จิตรา อาคมเเคง','Employee Relations Officer','พนักงานระดับ S3-S4']];let i = index"
>
<td
class=
"text-center"
>
{{item.apsassessy.position.tdesc}}
</td>
<td
class=
"text-center"
style=
"font-size: 12px; width: 12%;"
>
{{item[0]}}
</td>
<td
class=
"text-center"
>
{{item.personalLevel.tdesc}}
</td>
<td
style=
"font-size: 12px; width: 40%;"
>
{{item[1]}}
</td>
<td
class=
"flex justify-center items-center space-x-2"
>
<td
style=
"font-size: 12px; width: 15%; word-break: break-word; white-space: normal;"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-1"
(
click
)="
openAddRoundModel
(
item
.
masfromEvaluationRoundModel
.
evaluationRoundId
,
item
.
apsassessy
.
employeeId
,'
form-pm-emp
')"
></i>
{{item[2]}}
<input
type=
"checkbox"
id=
"hs-small-switch{{i+1}}"
[(
ngModel
)]="
item
.
active
"
</td>
class=
"ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 dark:checked:bg-green-600 checked:before:bg-green-200 dark:checked:before:bg-green-200 shrink-0 w-11 h-6 before:w-5 before:h-5"
>
<td
style=
"font-size: 12px; width: 15%;"
>
{{item[3]}}
</td>
<td
class=
"text-center"
>
<div
class=
"flex justify-center items-center"
>
<div
class=
"flex justify-center items-center"
>
<i
*
ngIf=
"hsSwitchChecked[item[0]]"
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-2 text-center"
data-hs-overlay=
"#edit-evaluation-form-table-modal-edit"
></i>
<input
type=
"checkbox"
id=
"hs-small-switch-{{item[0]}}"
class=
"ti-switch shrink-0 w-11 h-6 before:w-5 before:h-5"
[(
ngModel
)]="
hsSwitchChecked
[
item
[
0
]]"
>
</div>
</div>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"nav-tabs"
>
<ul
class=
"ti-pagination"
>
<div
class=
"px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<li>
<div
class=
"box-body"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
<nav
class=
"pagination-style-3 overflow-auto"
>
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<ul
class=
"ti-pagination"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
<li>
</a>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
</li>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
</a>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
</li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a>
</a>
</li>
</ng-container>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
(
click
)="
currentPage=
item"
>
{{item}}
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
</a>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
</ng-container>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<ng-container
<li>
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</ng-container>
</li>
</li>
</ul>
<li>
</nav>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
</div>
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
</div>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</ul>
<ul
class=
"nav-tabs mt-1"
>
<ul
class=
"nav-tabs mt-3"
>
<p>
Show 1 to 10 of 50 items
</p>
<span>
Show {{((currentPage-1) * 10)+1}} to {{assessmentListFilter().length
<10
?
assessmentListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
assessmentListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
assessmentListFilter
().
length
}}
items
</
span
>
</ul>
</ul>
</
di
v>
</
na
v>
</div>
</div>
<div
id=
"edit-evaluation-form-table-modal-edit"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"form-pm-emp"
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=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto
mt-7
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content
!width-80"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<h3
class=
"text-xxl font-bold text-primary"
>
การประเมินผล
แก้ไขรายการสมรรถนะ
</h3>
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
closeModalClass
('
form-pm-emp
')"
>
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#edit-evaluation-form-table-modal-edit"
>
<span
class=
"sr-only"
>
Close
</span>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</button>
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"ti-modal-body"
>
<div
class=
"
body-content
"
>
<div
class=
"
py-2 border-b-2 border-collapse
"
>
<div
class=
"
page
"
>
<div
class=
"
grid grid-cols-2 gap-6
"
>
<div
class=
"
border-b border-gray-200 dark:border-white/10
"
>
<div
class=
"
col-span-1
"
>
<
div
class=
"grid grid-cols-2 gap-6 mt-2"
>
<
label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รหัสแบบฟอร์ม
</label
>
<div
class=
"col-span-1"
>
</div
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รหัสเเบบฟอร์ม
</label
>
<div
class=
"col-span-1"
>
</div
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
ชื่อพนักงาน
</label
>
<div
class=
"col-span-1"
>
</div
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
ชื่อพนักงาน
</label
>
</div
>
</div
>
<div
class=
"grid grid-cols-2 gap-6"
>
</div
>
<div
class=
"col-span-1"
>
<
div
class=
"grid grid-cols-2 gap-6 mb-5"
>
<
input
type=
"text"
id=
"input-label"
<div
class=
"col-span-1"
>
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
value=
"F6702-01"
>
readonly
value=
"F6702-01"
>
</div>
</div>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
value=
"พิมพร อูรณการ"
>
<input
type=
"text"
id=
"input-label"
</div>
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
</div
>
readonly
value=
"พิมพร อูรณการ"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"
body-content-tabl
e"
>
<div
class=
"
header-title-typ
e"
>
<div
class=
"
page
"
>
<div
class=
"
flex justify-between
"
>
<div
class=
"flex
justify-between
"
>
<div
class=
"flex"
>
<
div
class=
"flex pr-2"
>
<
!-- Content ของ div แรก --
>
<div
class=
"flex
"
>
<div
class=
"flex gap-x-6
"
>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox pointer-events-none"
id=
"hs-default-checkbox"
<input
type=
"checkbox"
class=
"ti-form-checkbox mt-0.5"
id=
"hs-checkbox-group-1"
>
[(
ngModel
)]="
isDataListChecked
"
>
<label
for=
"hs-checkbox-group-1"
<label
for=
"hs-default-checkbox"
class=
"text-sm text-gray-500 mx-2 pointer-events-none"
>
class=
"text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
>
0
{{numDataListChecked}}
Selected
</label>
Selected
</label>
</div>
</div>
<div
class=
"mx-1 flex items-center"
>
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;dataListCheckAll()"
<div
class=
"flex items-center"
>
class=
"focus:ring-2 focus:ring-primary rounded-sm flex item-center"
>
<i
(
click
)="
toggleCheckbox
()"
<i
class=
"fs-l transition-all duration-200
"
[
ngClass
]="{'
ri-checkbox-multiple-line
'
:
!
isChecked
,
'
ri-checkbox-multiple-fill
'
:
isChecked
}
"
[
ngClass
]="{'
ri-checkbox-multiple-line
text-gray-500
'
:
!
isDataListCheckedAll
,
'
ri-checkbox-multiple-fill
text-primary
'
:
isDataListCheckedAll
}
"
></i>
class=
"ri-checkbox-multiple-line text-gray-500 dark:text-white/70
"
></i>
</button>
<label
for=
"hs-checkbox-group-2"
<label
class=
"text-sm text-gray-500 ml-2"
>
Select All
</label>
class=
"text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
</div
>
(
click
)="
toggleCheckbox
()"
>
Select All
</label
>
</div>
</div>
</div>
</div>
<div
class=
"flex justify-end"
>
</div>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<div
class=
"flex justify-end"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
<div
class=
"px-1"
>
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
<div
class=
"relative shadow-md"
>
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
<div
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
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"
>
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
>
<i
class=
"ri-search-line text-gray"
></i>
<div
</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>
</div>
</div>
</div>
</div>
<div
class=
"px-1"
>
</div>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
data-hs-overlay=
"#edit-evaluation-form-add-table-modal-edit"
>
<div
class=
"px-1"
>
<i
class=
"ri-add-line"
></i>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
>
Add
<i
class=
"ri-add-line"
></i>
</button>
Add
</div>
</button>
<div
class=
"px-1"
>
</div>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
<div
class=
"px-1"
>
data-hs-overlay=
"#edit-evaluation-form-alert-delete-modal"
>
<button
href=
"javascript:void(0);"
<i
class=
"ti ti-trash fs-l"
></i>
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
Delete
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
>
</button>
<i
class=
"ri-delete-bin-6-line"
></i>
</div>
Delete
<div
class=
"px-1"
>
</button>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
</div>
<i
class=
"ti ti-book fs-l"
></i>
<div
class=
"px-1"
>
Help
<button
href=
"javascript:void(0);"
</button>
class=
"ti-btn ti-btn-soft-warning h-10 m-0 shadow-md"
>
</div>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"overflow-auto table-bordered rounded-t-md"
>
<div
id=
"card-type-1"
role=
"tabpanel"
aria-labelledby=
"card-type-item-1"
>
<div
class=
"overflow-auto shadow-md"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead>
<tr>
<ng-container
*
ngFor=
"let item of ['','รหัสสมรรถนะ','ชื่อสมรรถนะ','ระดับความหวัง','การจัดการ']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
||
item =
==
'ระดับความหวัง'"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
</th>
</ng-container>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let item of[
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','ระดับที่ 1'],
['CC-02', 'การทำงานเป็นทีมแบบ TAT (TAT Teamwork)','ระดับที่ 1'],
['CC-03', 'ความรับผิดชอบในหน้าที่และโปร่งใส (Accountability & Ethics)','ระดับที่ 1'],
['CC-04', 'การพัฒนาอย่างต่อเนื่อง (Readiness to Learn & Continous Improvement)','ระดับที่ 1'],
['CC-05', 'การคิดอย่างเป็นระบบ (Systematic Thinking)','ระดับที่ 1']];let i = index"
>
<td>
<div
class=
"overflow-auto table-bordered"
style=
"border-radius: 5px;"
>
</td>
<div
class=
"overflow-auto border"
>
<!-- <td class="text-center">
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<input type="checkbox" class="ti-form-checkbox cursor-pointer"
<thead>
id="checkbox-{{item.data.evaluationRoundId}}" [(ngModel)]="item.check"
<tr>
(ngModelChange)="dataListCheck()">
<ng-container
</td>
*
ngFor=
"let item of ['รหัส','ชื่อหัวข้อ','ประเภท','น้ำหนัก','Action']; let f = first; let l = last; let i = index"
>
<td>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<label
[
class
.!
text-center
]="
f
||
l
"
>
for="checkbox-{{item.data.evaluationRoundId}}"> {{item.data.evaluationRoundId}}</label>
<span
class=
"text-sm"
>
{{ item }}
</span>
</td> -->
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!f && i==1"
>
<td
>
{{item[1]}}
</td>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"30"
<td
>
{{item[2]}}
</td>
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
<td
class=
"flex justify-center"
>
<path
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
></i>
</path>
</td>
</svg>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
style=
"font-size: 12px; width: 15%;"
class=
"text-center"
>
<input
style=
"margin-right: 20px;"
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer "
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
<label>
{{item.code}}
</label>
</td>
<td
style=
"font-size: 12px; width: 40%; word-break: break-word; white-space: normal;"
>
{{item.headname}}
</td>
<td
style=
"font-size: 12px; width: 15%;"
>
{{item.type}}
</td>
<td
style=
"font-size: 12px; width: 15%;"
><span>
{{item.weight}}
</span></td>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#edit-evaluation-form-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
<div
class=
"flex justify-end mt-3rem mb-1rem space-x-4"
>
<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=
"#edit-evaluation-form-table-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-evaluation-form-alert-modal"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-evaluation-form-add-table-modal-edit"
class=
"hs-overlay hidden ti-modal"
>
</tr>
<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"
>
</tbody>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
</table>
<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=
"#edit-evaluation-form-table-modal-edit"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"flex justify-end pb-1rem"
>
<div
class=
"px-1"
>
<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"
>
<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>
</div>
</div>
</div>
</div>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
</div>
</div>
<div
class=
"overflow-auto table-bordered"
style=
"border-radius: 5px;"
>
<div
class=
"overflow-auto border"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead>
<tr>
<ng-container
*
ngFor=
"let item of ['รหัส','ชื่อหัวข้อ','ประเภท','น้ำหนัก','Action']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!f && i==1"
>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"30"
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
<path
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
</path>
</svg>
</div>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!f && i==2"
>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"30"
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
<path
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
</path>
</svg>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
style=
"font-size: 12px; width: 15%;"
class=
"text-center"
>
<input
style=
"margin-right: 20px;"
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer "
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
<label>
{{item.code}}
</label>
</td>
<td
style=
"font-size: 12px; width: 40%; word-break: break-word; white-space: normal;"
>
{{item.headname}}
</td>
<td
style=
"font-size: 12px; width: 15%;"
>
{{item.type}}
</td>
<td
class=
"text-center"
style=
"font-size: 12px; width: 15%;"
>
{{item.weight}}
</td>
<td
class=
"flex justify-center"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
data-hs-overlay=
"#edit-evaluation-form-alert-modal"
>
<i
class=
"ri-add-line"
></i>
Select
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"px-1
py-1
bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<ul
class=
"ti-pagination"
>
<ul
class=
"ti-pagination"
>
<li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</li>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a></li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
aria-current=
"page"
>
1
</a>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
</li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
<li>
</a>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
</li>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</ul>
</a>
</li>
</ul>
</nav>
</nav>
</div>
</div>
</div>
</div>
...
@@ -468,11 +317,24 @@
...
@@ -468,11 +317,24 @@
<p>
Show 1 to 10 of 50 items
</p>
<p>
Show 1 to 10 of 50 items
</p>
</ul>
</ul>
</div>
</div>
<div
class=
"ti-modal-footer"
>
<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=
"#form-pm-emp"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-define-document-form-alert-add-modal"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-evaluation-form-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"edit-evaluation-form-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=
"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=
"max-h-full overflow-hidden ti-modal-content w-full"
>
...
@@ -500,7 +362,7 @@
...
@@ -500,7 +362,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-evaluation-form-alert-modal"
(
click
)="
addUser
();
showSuccess
()
"
>
data-hs-overlay=
"#edit-evaluation-form-alert-modal"
(
click
)="
addUser
();"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</div>
</div>
...
@@ -536,7 +398,7 @@
...
@@ -536,7 +398,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-evaluation-form-alert-delete-modal"
(
click
)="
addUser
()
;
showSuccessDelete
()
"
>
data-hs-overlay=
"#edit-evaluation-form-alert-delete-modal"
(
click
)="
addUser
()"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
@@ -544,3 +406,39 @@
...
@@ -544,3 +406,39 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"modal-alert"
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"
(
click
)="
closeModalClass
('
modal-alert
')"
>
<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"
>
<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"
(
click
)="
closeModalClass
('
modal-alert
')"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
(
click
)="
saveAssessmentList
();
closeModalClass
('
modal-alert
')"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.ts
View file @
b3dfa482
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
AppraisalFormModel
}
from
'src/app/shared/model/appraisal-form.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
export
interface
DataModel
{
check
:
boolean
,
code
:
string
,
headname
:
string
,
type
:
string
,
weight
:
string
,
}
@
Component
({
@
Component
({
selector
:
'app-edit-evaluation-form'
,
selector
:
'app-edit-evaluation-form'
,
...
@@ -15,199 +12,149 @@ export interface DataModel {
...
@@ -15,199 +12,149 @@ export interface DataModel {
styleUrls
:
[
'./edit-evaluation-form.component.scss'
]
styleUrls
:
[
'./edit-evaluation-form.component.scss'
]
})
})
export
class
EditEvaluationFormComponent
{
export
class
EditEvaluationFormComponent
{
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
'เเก้ไขฟอร์มตามรอบการประเมิน'
];
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
'เเก้ไขฟอร์มตามรอบการประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
activeTab
:
string
=
'tab1'
;
@
Input
()
evaluationRoundId
=
''
hsSwitchChecked
:
{
[
key
:
string
]:
boolean
};
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
search
=
""
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
dataList
:
DataModel
[]
=
[
{
check
:
false
,
code
:
"HS-01"
,
headname
:
"C1 CUSTOMER ORIENTED (SQCDME)"
,
type
:
"HOSHIN"
,
weight
:
"5.0"
,
},
{
check
:
false
,
code
:
"HS-02"
,
headname
:
"C2 MANUFACTURING OPTIMIZATION"
,
type
:
"HOSHIN"
,
weight
:
"3.0"
,
},
{
check
:
false
,
code
:
"HS-03"
,
headname
:
"C3 INCREASE EMPLOYEE ENGAGEMENT"
,
type
:
"HOSHIN"
,
weight
:
"3.0"
,
},
{
check
:
false
,
code
:
"HS-04"
,
headname
:
"C4 HEALTHY FINANCIAL"
,
type
:
"HOSHIN"
,
weight
:
"3.0"
,
},
{
check
:
false
,
code
:
"HS-05"
,
headname
:
"C5 RISK MANAGEMENT (TAXATION)"
,
type
:
"HOSHIN"
,
weight
:
"1.0"
,
},
{
check
:
false
,
code
:
"KP-01"
,
headname
:
"ประสาทงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในเเละภายนอกตามเเผนการฝึกอบรมพัฒนา"
,
type
:
"KPI"
,
weight
:
"10.0"
,
},
]
dataSelect
:
DataModel
=
{
check
:
false
,
code
:
""
,
headname
:
""
,
type
:
""
,
weight
:
""
,
}
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
)
{
assessmentList
:
AppraisalFormModel
[]
=
[]
this
.
hsSwitchChecked
=
{
'F6702-01'
:
false
,
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
'F6702-02'
:
false
,
'F6702-03'
:
false
,
isChecked
:
boolean
=
false
;
'F6702-04'
:
false
,
'F6702-06'
:
false
};
}
dataListSelect
(
data
?:
DataModel
)
{
this
.
dataSelect
=
data
||
{
check
:
false
,
code
:
""
,
headname
:
""
,
type
:
""
,
weight
:
""
,
}
this
.
cdr
.
detectChanges
()
}
dataListFilter
()
{
return
this
.
dataList
.
filter
(
x
=>
{
const
match
=
x
.
code
.
includes
(
this
.
search
)
||
x
.
headname
.
includes
(
this
.
search
);
if
(
!
match
)
x
.
check
=
false
;
return
match
;
});
}
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
.
dataListCheck
();
}
searchChange
()
{
apsassessy
=
""
this
.
currentPage
=
1
;
constructor
(
private
toastr
:
ToastrService
,
const
filteredData
=
this
.
dataListFilter
();
private
cdr
:
ChangeDetectorRef
,
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
this
.
dataListCheck
();
private
evaluationCycleService
:
EvaluationCycleService
}
)
{
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
}
onBack
()
{
this
.
sendGroupShow
.
emit
(
'1'
);
// เปลี่ยนกลับไปหน้า 1
ngOnInit
():
void
{
}
}
// การจัดการการเปิดปิด modal
ngOnChanges
():
void
{
if
(
this
.
evaluationRoundId
)
{
modalOptions
:
{
this
.
getAssessmentId
();
[
nameModal
:
string
]:
{
this
.
getAssessmentList
();
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'
;
}
}
getAssessmentId
()
{
this
.
evaluationCycleService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
this
.
evaluationRound
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
});
closeModal
(
name
:
string
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
isAnyModalOpen
())
{
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
}
}
}
getAssessmentList
()
{
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
});
}
assessmentListFilter
()
{
return
this
.
assessmentList
.
filter
(
x
=>
x
.
apsassessy
.
fname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
lname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
efname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
elname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
masfromEvaluationRoundModel
.
evaluationRoundId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
)
}
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
assessmentListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
openModalClass
(
id
:
string
)
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'true'
)
},
10
);
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
}
}
// ฟังก์ชัน toggle checkbox
closeModalClass
(
id
:
string
)
{
isChecked
:
boolean
=
false
;
// ใช้สำหรับตรวจสอบสถานะของ checkbox
const
modal
=
document
.
getElementById
(
id
);
if
(
modal
)
{
toggleCheckbox
()
{
modal
.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
}
}
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
saveAssessmentList
()
{
let
body
=
this
.
assessmentList
.
filter
(
x
=>
x
.
active
==
true
)
if
(
body
.
length
>
0
)
{
this
.
evaluationAssessmentService
.
postList
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getAssessmentList
();
}
else
{
}
}
})
}
else
{
this
.
showAlert
(
'ไม่พบรายการ'
,
'error'
)
}
}
}
currentModal
=
""
;
// constructor(private toastr: ToastrService) { }
showSuccess
()
{
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
model
:
string
)
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
this
.
openModalClass
(
model
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
}
getApsassessy
(){
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ this.evaluationAssessmentService.getApsassessy ~ response:"
,
response
)
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
positionClass
:
'toast-top-right'
,
});
});
}
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
toggleCheckbox
()
{
positionClass
:
'toast-top-right'
,
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
});
}
}
showSuccessDelete
()
{
addUser
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
}
}
src/styles.scss
View file @
b3dfa482
...
@@ -363,4 +363,16 @@ ngx-dropzone {
...
@@ -363,4 +363,16 @@ ngx-dropzone {
.detail-td
{
.detail-td
{
font-size
:
12px
;
font-size
:
12px
;
padding-left
:
1
.5rem
;
padding-left
:
1
.5rem
;
}
.width-80
{
width
:
80%
;
}
.
\
!
width-80
{
width
:
80%
!
important
;
}
.width-70
{
width
:
70%
;
}
.
\
!
width-70
{
width
:
70%
!
important
;
}
}
\ No newline at end of file
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