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
1f1f5e05
Commit
1f1f5e05
authored
Mar 03, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ย้าย เมนูใหม่ จัดการรอบการประเมิน
parent
a651bbec
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
640 additions
and
521 deletions
+640
-521
define-document-form.component.html
.../define-document-form/define-document-form.component.html
+1
-1
edit-define-document-form.component.html
...ne-document-form/edit-define-document-form.component.html
+276
-345
edit-define-document-form.component.scss
...ne-document-form/edit-define-document-form.component.scss
+30
-3
edit-define-document-form.component.ts
...fine-document-form/edit-define-document-form.component.ts
+300
-159
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+2
-1
edit-evaluation-form.component.ts
...rm/edit-evaluation-form/edit-evaluation-form.component.ts
+0
-1
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+7
-8
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+24
-3
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/define-document-form.component.html
View file @
1f1f5e05
...
@@ -315,6 +315,6 @@
...
@@ -315,6 +315,6 @@
</div>
</div>
<ng-container
*
ngIf=
"showFrom"
>
<ng-container
*
ngIf=
"showFrom"
>
<
app-edit-define-document-form
[
evaluationRound
]="
evaluationRound
"
(
showFrom
)="
showFrom=
$event"
></app-edit-define-document-form
>
<
!-- <app-edit-define-document-form [evaluationRound]="evaluationRound" (showFrom)="showFrom=$event"></app-edit-define-document-form> --
>
</ng-container>
</ng-container>
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.html
View file @
1f1f5e05
<div
class=
"flex items-center py-4 border-b-2 border-collapse "
>
<button
type=
"button"
class=
"ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
(
click
)="
onBack
()"
>
<i
class=
"ri-arrow-left-s-line"
></i>
ย้อนกลับ
</button>
<div
class=
"text-2xl font-bold py-2 text-primary px-4 "
>
แก้ไขแบบฟอร์มตามรอบประเมิน
</div>
</div>
<div
class=
"
py-2 border-b-2 border-collapse
"
>
<div
class=
"
body-content
"
>
<div
class=
"
grid grid-cols-2 gap-6
"
>
<div
class=
"
page
"
>
<div
class=
"
col-span-1
"
>
<div
class=
"
border-b border-t border-gray-200 dark:border-white/10
"
>
<
label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รอบการประเมิน
</label
>
<
div
class=
"grid grid-cols-2 gap-6 mt-5"
>
</div
>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รอบการประเมิน
</label
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
ปีการประเมิน
</label
>
</div
>
</div
>
<div
class=
"col-span-1"
>
</div
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
ปีการประเมิน
</label
>
<div
class=
"grid grid-cols-2 gap-6"
>
</div
>
<div
class=
"col-span-1"
>
</div
>
<
input
type=
"text"
id=
"input-label"
<
div
class=
"grid grid-cols-2 gap-6 mb-5"
>
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
class=
"col-span-1"
>
readonly
value=
"{{evaluationRound?.tdesc}}
"
>
<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"
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
[
value
]="
evaluationRound
.
apsyear
"
>
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=
"{{evaluationRound?.apsyear}}"
>
</div
>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"header-title-type"
>
<div
class=
"header-title-type"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
</div>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<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
"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()
"
[(
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"
>
<i
class=
"ri-search-line text-gray"
></i>
<i
class=
"ri-search-line text-gray"
></i>
...
@@ -51,20 +36,18 @@
...
@@ -51,20 +36,18 @@
</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
','
addForm
')"
>
data-hs-overlay=
"#edit-define-document-form-alert-add-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>
</div>
...
@@ -89,16 +72,14 @@
...
@@ -89,16 +72,14 @@
</thead>
</thead>
<tbody>
<tbody>
<tr
<tr
*
ngFor=
"let item of assessmentListFilter() | slice:((currentPage-1) *
10) : (((currentPage-1) * 10) + 10
);let i = index"
>
*
ngFor=
"let item of assessmentListFilter() | slice:((currentPage-1) *
this.pageSize) : (((currentPage-1) * this.pageSize) + this.pageSize
);let i = index"
>
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
{{item.masfromEvaluationRound.evaluationRoundId}}
</td>
{{item.masfromEvaluationRound.evaluationRoundId}}
</td>
<td>
{{item.apsassessy.fname}} {{item.apsassessy.lname}}
</td>
<td>
{{item.apsassessy.fname}} {{item.apsassessy.lname}}
</td>
<td
class=
"text-center"
>
{{item.apsassessy.position.tdesc}}
</td>
<td
class=
"text-center"
>
{{item.apsassessy.position.tdesc}}
</td>
<td
class=
"text-center"
>
{{item.
apsassessy.p
l.tdesc}}
</td>
<td
class=
"text-center"
>
{{item.
personalLeve
l.tdesc}}
</td>
<td
class=
"flex justify-center items-center space-x-2"
>
<td
class=
"flex justify-center items-center space-x-2"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-1"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-1"
*
ngIf=
"item.active"
(
click
)="
openAddRoundModel
(
item
.
masfromEvaluationRound
.
evaluationRoundId
,
item
.
apsassessy
.
employeeId
,
item
,'
form-pm-emp
')"
></i>
data-hs-overlay=
"#edit-define-document-form-table-modal-edit"
(
click
)="
openEdit
(
item
.
masfromEvaluationRound
.
evaluationRoundId
,
item
.
apsassessy
.
employeeId
)"
></i>
<input
type=
"checkbox"
id=
"hs-small-switch{{i+1}}"
[(
ngModel
)]="
item
.
active
"
<input
type=
"checkbox"
id=
"hs-small-switch{{i+1}}"
[(
ngModel
)]="
item
.
active
"
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"
>
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>
</td>
...
@@ -110,56 +91,65 @@
...
@@ -110,56 +91,65 @@
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<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);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<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
*
ngFor=
"let item of page;let f = first;let l = last"
>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<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
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</a>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<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"
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</a>
</ng-container>
</ng-container>
<ng-container
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
*
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
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</a>
</ng-container>
</ng-container>
</li>
</li>
<li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</li>
</li>
<li>
<select
class=
"ti-form-select"
[(
ngModel
)]="
pageSize
"
(
ngModelChange
)="
searchChange
()"
>
<option
[
value
]="
10
"
>
10
</option>
<option
[
value
]="
20
"
>
20
</option>
<option
[
value
]="
50
"
>
50
</option>
<option
[
value
]="
100
"
>
100
</option>
</select>
</li>
</ul>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{assessmentListFilter().length
<10
<span>
Show {{((currentPage-1) * pageSize)+1}} to {{(assessmentListFilter().length
<
pageSize
)
?
assessmentListFilter
().
length:
?
assessmentListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
(
currentPage=
=page.length
?
((
currentPage
*
pageSize
)
-
((
currentPage
*
pageSize
)
-
assessmentListFilter
().
length
)
)
10
)
-
assessmentListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
assessmentListFilter
().
length
}}
:
(
currentPage
*
pageSize
)
)
}}
of
{{
assessmentListFilter
().
length
}}
items
</
span
>
items
</
span
>
</ul>
</ul>
</nav>
</nav>
</div>
</div>
<div
#
modalEdit
id=
"edit-define-document-form-table-modal-edit"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"ti-modal-box ease-out lg:!max-w-4xl lg:w-full m-3 lg:mx-auto items-center "
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<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 mt-7"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content !width-80 !box-modal"
>
<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"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
closeModalClass
('
form-pm-emp
')"
>
data-hs-overlay=
"#edit-define-document-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>
...
@@ -179,12 +169,12 @@
...
@@ -179,12 +169,12 @@
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
<input
type=
"text"
id=
"input-label"
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"
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"
readonly
value=
"
F6702-01
"
>
readonly
value=
"
{{selectEmp.masfromEvaluationRound.evaluationRoundId}}
"
>
</div>
</div>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
<input
type=
"text"
id=
"input-label"
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"
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"
readonly
value=
"
พิมพร อูรณการ
"
>
readonly
value=
"
{{selectEmp.apsassessy.fname}} {{selectEmp.apsassessy.lname}}
"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -195,9 +185,9 @@
...
@@ -195,9 +185,9 @@
<!-- Content ของ div แรก -->
<!-- Content ของ div แรก -->
<div
class=
"flex gap-x-6"
>
<div
class=
"flex gap-x-6"
>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox mt-0.5"
id=
"hs-checkbox-group-1"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox mt-0.5"
id=
"hs-checkbox-group-1"
disabled
[(
ngModel
)]="
isChecked
"
>
<label
for=
"hs-checkbox-group-1"
<label
for=
"hs-checkbox-group-1"
class=
"text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
>
0
class=
"text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
>
{{numDataListChecked}}
Selected
</label>
Selected
</label>
</div>
</div>
...
@@ -217,7 +207,7 @@
...
@@ -217,7 +207,7 @@
<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 "
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name"
style=
"height: 40px;
"
>
placeholder=
"Search
"
style=
"height: 40px;"
[(
ngModel
)]="
searchRound
"
(
ngModelChange
)="
searchChange
()
"
>
<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"
>
<i
class=
"ri-search-line text-gray"
></i>
<i
class=
"ri-search-line text-gray"
></i>
...
@@ -225,30 +215,22 @@
...
@@ -225,30 +215,22 @@
</div>
</div>
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
(
click
)="
openModalClass
('
form-assessment
');
searchIndicatorsChange
()"
>
(
click
)="
openModalTest
('
edit-define-document-form-table-modal-select
')"
>
<i
class=
"ri-add-line"
></i>
<i
class=
"ri-add-line"
></i>
Add
Add
</button>
</button>
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
(
click
)="
deleteAssessmentList
()"
>
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
>
<i
class=
"ri-delete-bin-6-line"
></i>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
Delete
</button>
</button>
</div>
</div>
<div
class=
"px-1"
>
<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>
Help
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto table-bordered rounded-t-md"
>
<div
class=
"overflow-auto table-bordered rounded-t-md"
>
<div
id=
"card-type-1"
role=
"tabpanel"
aria-labelledby=
"card-type-item-1"
>
<div
id=
"card-type-1"
role=
"tabpanel"
aria-labelledby=
"card-type-item-1"
>
<div
class=
"overflow-auto shadow-md"
>
<div
class=
"overflow-auto shadow-md"
>
...
@@ -257,39 +239,44 @@
...
@@ -257,39 +239,44 @@
<tr>
<tr>
<ng-container
<ng-container
*
ngFor=
"let item of ['','รหัสสมรรถนะ','ชื่อสมรรถนะ','ระดับความหวัง','การจัดการ']; 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"
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
||
item =
==
'ระดับความหวัง'"
>
[
class
.!
text-center
]="
f
||
l
||
item =
==
'ระดับความหวัง'"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<span
class=
"text-sm"
>
{{ item }}
</span>
</th>
</th>
</ng-container>
</ng-container>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody
*
ngIf=
"loading"
>
<tr
<tr>
*
ngFor=
"let item of[
<td
class=
"text-center"
colspan=
"100%"
>
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','ระดับที่ 1'],
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
['CC-02', 'การทำงานเป็นทีมแบบ TAT (TAT Teamwork)','ระดับที่ 1'],
aria-label=
"loading"
>
['CC-03', 'ความรับผิดชอบในหน้าที่และโปร่งใส (Accountability & Ethics)','ระดับที่ 1'],
<span
class=
"sr-only"
>
Loading...
</span>
['CC-04', 'การพัฒนาอย่างต่อเนื่อง (Readiness to Learn & Continous Improvement)','ระดับที่ 1'],
</div>
['CC-05', 'การคิดอย่างเป็นระบบ (Systematic Thinking)','ระดับที่ 1']];let i = index"
>
</td>
<td>
</tr>
</tbody>
</td>
<tbody
*
ngIf=
"!loading&&!empassessmentListFilter().length"
>
<!-- <td class="text-center">
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!loading&&empassessmentListFilter().length > 0"
>
<tr
*
ngFor=
"let item of empassessmentListFilter() | slice:((currentPageRound-1) * pageSizeRound) : (((currentPageRound-1) * pageSizeRound) + pageSizeRound);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id="checkbox-{{item.data.evaluationRoundId}}" [(ngModel)]="item.check"
id=
"checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
[(
ngModel
)]="
item
.
checkbox
"
(
change
)="
checkempassessmentRoundListCheckbox
()"
>
(ngModelChange)="dataListCheck()">
</td>
</td>
<td>
<td>
<label
<label
for="checkbox-{{item.
data.evaluationRoundId}}"> {{item.data.evaluationRound
Id}}</label>
for=
"checkbox-{{item.
item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
>
{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopic
Id}}
</label>
</td>
-->
</td>
<td
>
{{item
[1]
}}
</td>
<td
>
{{item
.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc
}}
</td>
<td
>
{{item[2]
}}
</td>
<td
class=
"!text-center"
>
{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo
}}
</td>
<td
class=
"flex justify-center"
>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteFormOne
(
item
.
item
);"
></i>
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
></i>
</td>
</td>
</tr>
</tr>
...
@@ -298,293 +285,238 @@
...
@@ -298,293 +285,238 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"pageRound.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
)="
currentPageRound =
(currentPageRound-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 pageRound;let f = first;let l = last"
>
</a>
<ng-container
*
ngIf=
"item==3&¤tPageRound!=1&¤tPageRound!=2&¤tPageRound!=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);"
</a>
aria-current=
"page"
>
1
</a>
</ng-container>
</li>
<ng-container
*
ngIf=
"(f||l)||(item==currentPageRound-1||item==currentPageRound||item==currentPageRound+1)"
>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageRound"
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
(
click
)="
currentPageRound=
item"
>
{{item}}
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
</a>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
</ng-container>
<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>
*
ngIf=
"item==pageRound.length-2&¤tPageRound!=pageRound.length&¤tPageRound!=pageRound.length-1&¤tPageRound!=pageRound.length-2"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
</a>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</ng-container>
</a>
</li>
</li>
<li>
</ul>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
</nav>
(
click
)="
currentPageRound =
(currentPageRound
>
pageRound.length-1 ? currentPageRound: currentPageRound+1 )">
</div>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</div>
</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 {{((currentPageRound-1) * pageSizeRound)+1}} to {{empassessmentListFilter().length
<
pageSizeRound
?
empassessmentListFilter
().
length:
(
currentPageRound=
=pageRound.length
?
((
currentPageRound
*
pageSizeRound
)
-
((
currentPageRound
*
pageSizeRound
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPageRound
*
pageSizeRound
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
items
</
span
>
</ul>
</ul>
</div>
</nav>
</div>
<div
class=
"ti-modal-footer"
>
<div
class=
"ti-modal-footer"
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary 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"
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-define-document-form-table-modal-edit
"
>
(
click
)="
closeModalClass
('
form-pm-emp
')
"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
(
click
)="
openModalClass
('
modal-alert
','
addIndicator
')"
>
data-hs-overlay=
"#edit-define-document-form-alert-add-modal"
>
บันทึกข้อมูล
บันทึกข้อมูล
</
a
>
</
button
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-define-document-form-table-modal-selec
t"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"form-assessmen
t"
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 !box-modal"
>
<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"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
closeModalClass
('
form-assessment
')"
>
data-hs-overlay=
"#edit-define-document-form-table-modal-select"
>
<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=
"flex justify-end pb-1rem"
>
<div
class=
"header-title-type"
>
<div
class=
"px-1"
>
<div
class=
"flex justify-between"
>
<div
class=
"relative shadow-md"
>
<div
class=
"flex"
>
<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 "
<div
class=
"flex justify-end"
>
placeholder=
"Search by No. or Name"
>
<div
class=
"px-1"
>
<div
<div
class=
"relative shadow-md"
>
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"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
<i
class=
"ri-search-line text-gray"
></i>
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
style=
"height: 40px;"
[(
ngModel
)]="
searchIndicator
"
(
ngModelChange
)="
searchIndicatorsChange
()"
>
<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>
</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>
<div
class=
"overflow-auto table-bordered"
style=
"border-radius: 5px;"
>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto border"
>
<div
class=
"overflow-auto table-bordered rounded-t-md"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<div
id=
"card-type-1"
role=
"tabpanel"
aria-labelledby=
"card-type-item-1"
>
<thead>
<div
class=
"overflow-auto shadow-md"
>
<tr>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<ng-container
<thead>
*
ngFor=
"let item of ['รหัส','ชื่อประเภท','ชื่อย่อ','การจัดการ']; let f = first; let l = last; let i = index"
>
<tr>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<ng-container
[
class
.!
text-center
]="
f
||
l
"
>
*
ngFor=
"let item of ['รหัส','ชื่อประเภท','ความคาดหวัง','การจัดการ']; let f = first; let l = last; let i = index"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
[
class
.!
text-center
]="
f
||
l
"
>
*
ngIf=
"!f && i==1"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
width=
"30"
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
*
ngIf=
"!f && i==1"
>
<path
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
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"
>
width=
"30"
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
</path>
<path
</svg>
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"
>
</div>
</path>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
</svg>
*
ngIf=
"!f && i==2"
>
</div>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
width=
"30"
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
*
ngIf=
"!f && i==2"
>
<path
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
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"
>
width=
"30"
height=
"13"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
</path>
<path
</svg>
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>
<tr
*
ngFor=
"let item of filterIndicators() | slice:((currentPageIndicator-1) * pageSizeIndicator) : (((currentPageIndicator-1) * pageSizeIndicator) + pageSizeIndicator);let i = index"
>
<td>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</td>
<td
>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</td>
<td
class=
"!text-center"
>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}
</td>
<td
class=
"flex justify-center"
>
<div
class=
"px-1"
>
<button
type=
"button"
(
click
)="
addIndicators
(
item
)"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
>
<i
class=
"ri-add-line"
></i>
เพิ่มรายการ
</button>
</div>
</div>
</th>
</td>
</ng-container>
</tr>
</tr>
</tbody>
</thead>
</table>
<tbody>
</div>
<tr
*
ngFor=
"let item of[
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','1'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','2'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','3'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','4'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','5'],
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','6']];let i = index"
>
<td
class=
"flex justify-center"
style=
"font-size: 12px;"
>
{{item[0]}}
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item[1]}}
</td>
<td
style=
"font-size: 12px; width: 20%;"
>
{{item[2]}}
</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-define-document-form-table-modal-select"
>
<i
class=
"ri-add-line"
></i>
Select
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"pageIndicator.length"
>
<ul
class=
"nav-tabs"
>
<ul
class=
"ti-pagination"
>
<div
class=
"px-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
)="
currentPageIndicator =
(currentPageIndicator-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 pageIndicator;let f = first;let l = last"
>
</a>
<ng-container
*
ngIf=
"item==3&¤tPageIndicator!=1&¤tPageIndicator!=2&¤tPageIndicator!=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);"
</a>
aria-current=
"page"
>
1
</a></li>
</ng-container>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<ng-container
*
ngIf=
"(f||l)||(item==currentPageIndicator-1||item==currentPageIndicator||item==currentPageIndicator+1)"
>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageIndicator"
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
(
click
)="
currentPageIndicator=
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==pageIndicator.length-2&¤tPageIndicator!=pageIndicator.length&¤tPageIndicator!=pageIndicator.length-1&¤tPageIndicator!=pageIndicator.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
)="
currentPageIndicator =
(currentPageIndicator
>
pageIndicator.length-1 ? currentPageIndicator: currentPageIndicator+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 {{((currentPageIndicator-1) * pageSizeIndicator)+1}} to {{filterIndicators().length
<
pageSizeIndicator
?
filterIndicators
().
length:
(
currentPageIndicator=
=pageIndicator.length
?
((
currentPageIndicator
*
pageSizeIndicator
)
-
((
currentPageIndicator
*
pageSizeIndicator
)
-
filterIndicators
().
length
)
)
:
(
currentPageIndicator
*
pageSizeIndicator
)
)
}}
of
{{
filterIndicators
().
length
}}
items
</
span
>
</ul>
</ul>
</div>
</nav>
</div>
</div>
</div>
</div>
<div
id=
"edit-define-document-form-alert-add-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#edit-define-document-form-alert-add-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-footer"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary 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"
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-define-document-form-alert-add-modal
"
>
(
click
)="
closeModalClass
('
form-assessment
')
"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-define-document-form-alert-add-modal"
(
click
)="
saveAssessmentList
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-define-document-form-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<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=
"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
!box-modal
"
>
<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"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
closeModalClass
('
modal-alert
')"
>
data-hs-overlay=
"#edit-define-document-form-alert-edit-modal"
>
<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 "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการเเก้ไขข้อมูลหรือไม่
{{msg}}
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary 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"
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-define-document-form-alert-edit-modal
"
>
(
click
)="
closeModalClass
('
modal-alert
')
"
>
ย
กเลิก
ย
้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='addForm'"
(
click
)="
saveAssessmentList
();
closeModalClass
('
modal-alert
')"
>
data-hs-overlay=
"#edit-define-document-form-alert-edit-modal"
(
click
)="
addUser
();
showSuccessEdit
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-define-document-form-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</button>
</div>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='addIndicator'"
(
click
)="
saveIndicators
();
closeModalClass
('
modal-alert
')"
>
</div>
บันทึกข้อมูล
<div
class=
"ti-modal-body "
>
</button>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='deleteForm'|| typeForm=='deleteFormOne'"
(
click
)="
closeModalClass
('
modal-alert
')"
>
ยืนยันการลบข้อมูลหรือไม่!
บันทึกข้อมูล
</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"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
>
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
(
click
)="
addUser
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.scss
View file @
1f1f5e05
...
@@ -101,7 +101,8 @@ a.custom-link {
...
@@ -101,7 +101,8 @@ a.custom-link {
}
}
.ti-modal
{
.ti-modal
{
overflow
:
auto
;
overflow
:
hidden
;
overflow-y
:
auto
;
}
}
.header-title-type
{
.header-title-type
{
width
:
100%
;
width
:
100%
;
...
@@ -115,4 +116,31 @@ a.custom-link {
...
@@ -115,4 +116,31 @@ a.custom-link {
}
}
.bg-input-readonly
{
.bg-input-readonly
{
background-color
:
rgb
(
241
245
249
);
background-color
:
rgb
(
241
245
249
);
}
}
\ No newline at end of file
.body-content
{
overflow-y
:
auto
;
}
.body-content-table
{
margin-top
:
20px
;
margin-bottom
:
20px
;
}
.ti-switch
:checked
{
background-color
:
#28a745
;
/* เปลี่ยนสีพื้นหลังเป็นสีเขียว */
}
td
span
{
display
:
inline-block
;
/*span มีลักษณะเป็นกรอบ */
padding
:
5px
10px
;
border
:
1px
solid
black
;
border-radius
:
10px
;
background-color
:
#f9f9f9
;
width
:
80px
;
height
:
40px
;
}
.ti-modal-content
{
width
:
35%
;
/* ความกว้างที่คุณต้องการ */
position
:
absolute
;
/* ทำให้สามารถจัดตำแหน่งได้ */
top
:
50%
;
/* ให้อยู่กลางในแนวตั้ง */
left
:
50%
;
/* ให้อยู่กลางในแนวนอน */
transform
:
translate
(
-50%
,
-50%
);
/* เคลื่อนที่ modal กลับมาให้ตรงกลาง */
background-color
:
#ffffff
;
}
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.ts
View file @
1f1f5e05
import
{
ChangeDetectorRef
,
Component
,
E
lementRef
,
EventEmitter
,
Input
,
Output
,
ViewChild
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
E
ventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
AppraisalRoundModel
,
MyAppraisalRoundModel
}
from
'src/app/shared/model/appraisal-aps.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationModal
}
from
'src/app/shared/model/evaluation-form.modal'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
export
interface
DataModel
{
evaluationRoundId
:
string
;
tdesc
:
string
;
edesc
:
string
;
apsyear
:
string
;
apsPeriodStart
:
string
;
apsPeriodEnd
:
string
;
statusCode
:
StatusCodeModel
;
}
@
Component
({
@
Component
({
selector
:
'app-edit-define-document-form'
,
selector
:
'app-edit-define-document-form'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
...
@@ -19,168 +14,288 @@ export interface DataModel {
...
@@ -19,168 +14,288 @@ export interface DataModel {
})
})
export
class
EditDefineDocumentFormComponent
{
export
class
EditDefineDocumentFormComponent
{
@
ViewChild
(
'modalEdit'
)
modalEdit
!
:
ElementRef
;
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
'เเก้ไขฟอร์มตามรอบการประเมิน'
];
@
Input
()
evaluationRound
?:
DataModel
;
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
showFrom
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
currentPage
=
1
;
@
Input
()
evaluationRoundId
=
''
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
currentModal
=
""
;
pageSize
=
10
search
=
''
;
search
=
""
assessmentList
:
any
[]
=
[]
assessmentList
:
AppraisalModel
[]
=
[]
loadingAssess
=
false
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
isChecked
:
boolean
=
false
;
evaluationRoundId
=
""
apsassessy
=
""
apsassessy
=
""
empassessmentList
?:
EvaluationModal
searchEmp
=
""
empassessmentRoundList
:
AppraisalRoundModel
[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
currentPageRound
=
1
pageRound
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSizeRound
=
10
searchRound
=
""
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
numDataListChecked
=
0
msg
=
""
typeForm
=
""
selectData
:
AppraisalRoundModel
=
new
MyAppraisalRoundModel
()
loading
=
false
indicatorsList
:
AppraisalRoundModel
[]
=
[]
indicatorsListShow
:
AppraisalRoundModel
[]
=
[]
searchIndicator
=
""
currentPageIndicator
=
1
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSizeIndicator
=
10
competencyTopicIds
:
string
[]
=
[]
constructor
(
private
toastr
:
ToastrService
,
constructor
(
private
toastr
:
ToastrService
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
)
{
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
evaluationCycleService
:
EvaluationCycleService
)
{
}
}
ngOnInit
():
void
{
if
(
this
.
evaluationRound
)
{
ngOnInit
():
void
{
this
.
getEvaluationCycleList
()
}
}
}
ngOnChanges
():
void
{
saveAssessmentList
(){
setTimeout
(()
=>
{
let
body
=
this
.
assessmentList
.
filter
(
x
=>
x
.
active
==
true
)
document
.
getElementById
(
'form-pm-emp'
)?.
classList
.
add
(
"hidden"
)
if
(
body
.
length
>
0
){
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
this
.
evaluationAssessmentService
.
postList
(
body
).
subscribe
({
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
next
:
response
=>
{
},
10
);
if
(
response
.
success
)
{
if
(
this
.
evaluationRoundId
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getAssessmentId
();
this
.
getEvaluationCycleList
()
this
.
getAssessmentList
();
}
else
{
}
}
}
})
}
else
{
this
.
showAlert
(
'ไม่พบรายการ'
,
'error'
)
}
}
//############################# เเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
}
getAssessmentId
()
{
getApsassessy
(){
this
.
evaluationCycleService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
this
.
loadingAssess
=
true
next
:
response
=>
{
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
evaluationRound
=
response
next
:
response
=>
{
this
.
cdr
.
detectChanges
();
},
this
.
loadingAssess
=
false
error
:
err
=>
{
this
.
cdr
.
detectChanges
();
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
},
}
error
:
err
=>
{
});
this
.
loadingAssess
=
false
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
}
})
getAssessmentList
()
{
}
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
searchChange
()
{
next
:
response
=>
{
this
.
currentPage
=
1
this
.
assessmentList
=
response
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
assessmentListFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
searchChange
()
}
this
.
cdr
.
detectChanges
();
getEvaluationCycleList
()
{
},
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRound
!
.
evaluationRoundId
).
subscribe
({
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
.
masfromEvaluationRound
.
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
/
this
.
pageSize
)
},
(
_
,
i
)
=>
i
+
1
);
}
saveAssessmentList
()
{
let
body
=
this
.
assessmentList
.
filter
(
x
=>
x
.
active
==
true
)
if
(
body
.
length
>
0
)
{
this
.
evaluationAssessmentService
.
postList
(
body
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
assessmentList
=
response
if
(
response
.
success
)
{
this
.
cdr
.
detectChanges
();
this
.
showAlert
(
response
.
message
,
'success'
)
},
this
.
getAssessmentList
();
error
:
err
=>
{
}
else
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
}
}
});
})
}
}
else
{
assessmentListFilter
(){
this
.
showAlert
(
'ไม่พบรายการ'
,
'error'
)
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
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
)
}
onBack
()
{
this
.
showFrom
.
emit
(
false
);
}
// การจัดการการเปิดปิด modal
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
}
};
openModalTest
(
id
:
string
)
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'true'
)
document
.
getElementById
(
id
)?.
setAttribute
(
'tabindex'
,
'0'
)
},
10
);
console
.
log
(
"🚀 ~ EditDefineDocumentFormComponent ~ openModalTest ~ document.getElementById(id):"
,
document
.
getElementById
(
id
))
}
}
//############################# ปิดเเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
openEdit
(
evaluationRoundId
:
string
,
apsassessy
:
string
)
{
// ############################# Modal 2 #############################
if
(
evaluationRoundId
&&
apsassessy
){
const
modalElement
=
this
.
modalEdit
.
nativeElement
;
saveIndicators
()
{
setTimeout
(()
=>
{
if
(
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
).
length
>
0
)
{
modalElement
.
setAttribute
(
'aria-overlay'
,
'false'
);
if
(
this
.
empassessmentList
)
{
console
.
log
(
"🚀 ~ EditDefineDocumentFormComponent ~ openEdit ~ modalElement:"
,
modalElement
)
this
.
empassessmentList
.
masfromTopic
=
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
)
as
any
;
},
10
);
}
this
.
evaluationRoundId
=
evaluationRoundId
this
.
evaluationAssessmentService
.
postList
([
this
.
empassessmentList
]).
subscribe
({
this
.
apsassessy
=
apsassessy
next
:
response
=>
{
this
.
getApsassessy
()
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getApsassessy
();
this
.
getApsassessyMini
();
this
.
cdr
.
detectChanges
();
}
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
else
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
);
}
}
}
}
dataListCheck
(){
getApsassessy
()
{
console
.
log
(
this
.
assessmentList
);
this
.
loading
=
true
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
empassessmentList
=
response
this
.
loading
=
false
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
this
.
loading
=
false
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
}
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
getApsassessyMini
()
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
next
:
response
=>
{
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
this
.
empassessmentRoundList
=
response
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
document
.
body
.
style
.
overflow
=
'hidden'
;
this
.
checkTopic
();
this
.
searchEmpassessmentListFilterChange
()
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
}
empassessmentListFilter
()
{
closeModal
(
name
:
string
)
{
return
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
tdesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
if
(
!
this
.
isAnyModalOpen
())
{
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
edesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
))
}
}
}
isAnyModalOpen
():
boolean
{
searchEmpassessmentListFilterChange
()
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
this
.
currentPageRound
=
1
;
const
filteredData
=
this
.
empassessmentListFilter
();
this
.
pageRound
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
this
.
pageSizeRound
)
},
(
_
,
i
)
=>
i
+
1
);
}
checkTopic
()
{
this
.
competencyTopicIds
=
Array
.
from
(
new
Set
(
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
)
.
map
(
x
=>
x
.
item
.
groupAssessment1
!
.
competencyIndicatorsCourses1Mini
!
.
competencyIndicatorsCourses0
!
.
competencyTopic
!
.
competencyTopicId
)
));
}
}
// ฟังก์ชัน toggle checkbox
isChecked
:
boolean
=
false
;
// ใช้สำหรับตรวจสอบสถานะของ checkbox
toggleCheckbox
()
{
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
this
.
empassessmentRoundListCheckbox
.
map
(
item
=>
item
.
checkbox
=
this
.
isChecked
);
this
.
checkempassessmentRoundListCheckbox
();
}
checkempassessmentRoundListCheckbox
()
{
this
.
numDataListChecked
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
length
this
.
isChecked
=
this
.
numDataListChecked
?
true
:
false
}
deleteFormOne
(
item
:
AppraisalRoundModel
)
{
this
.
selectData
=
item
;
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundListCheckbox
.
filter
(
i
=>
i
.
item
!==
item
);
this
.
checkTopic
();
this
.
indicatorChange
();
this
.
searchEmpassessmentListFilterChange
()
this
.
checkempassessmentRoundListCheckbox
()
}
deleteAssessmentList
()
{
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
);
if
(
body
.
length
===
0
)
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
);
return
;
}
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
!
x
.
checkbox
);
this
.
checkTopic
();
this
.
indicatorChange
();
this
.
searchEmpassessmentListFilterChange
();
this
.
checkempassessmentRoundListCheckbox
();
// this.evaluationAssessmentService.deletemMini(body, this.selectEmp.apsassessy.employeeId, this.selectEmp.masfromEvaluationRound.evaluationRoundId).subscribe({
// next: response => {
// if (response.success) {
// this.showAlert(response.message, 'success')
// this.getApsassessyMini();
// } else {
// this.showAlert(response.message, 'error')
// }
// }
// })
}
}
// ############################# ปิด Modal 2 #############################
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
//############################# Modal Indicators #############################
addUser
()
{
getIndicators
()
{
this
.
evaluationAssessmentService
.
getIndicators
(
this
.
selectEmp
.
apsassessy
.
pl
.
plId
).
subscribe
({
next
:
response
=>
{
this
.
indicatorsList
=
response
this
.
indicatorChange
()
this
.
searchIndicatorsChange
()
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
indicatorChange
()
{
this
.
indicatorsListShow
=
this
.
indicatorsList
.
filter
(
x
=>
!
this
.
competencyTopicIds
.
includes
(
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
)
);
}
}
filterIndicators
()
{
return
this
.
indicatorsListShow
.
filter
(
x
=>
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
tdesc
?.
toLowerCase
()?.
includes
(
this
.
searchIndicator
?.
toLowerCase
()
??
""
)
||
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
edesc
?.
toLowerCase
()?.
includes
(
this
.
searchIndicator
?.
toLowerCase
()
??
""
)
||
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchIndicator
?.
toLowerCase
()
??
""
))
}
searchIndicatorsChange
()
{
this
.
currentPageIndicator
=
1
;
const
filteredData
=
this
.
filterIndicators
();
this
.
pageIndicator
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
this
.
pageSizeIndicator
)
},
(
_
,
i
)
=>
i
+
1
);
}
addIndicators
(
item
:
AppraisalRoundModel
)
{
this
.
empassessmentRoundListCheckbox
.
push
({
checkbox
:
false
,
item
})
this
.
competencyTopicIds
.
push
(
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
)
this
.
indicatorChange
();
this
.
closeModalClass
(
'form-assessment'
)
}
//############################# ปิด Modal Indicators #############################
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
timeOut
:
3000
,
...
@@ -188,24 +303,50 @@ assessmentListFilter(){
...
@@ -188,24 +303,50 @@ assessmentListFilter(){
});
});
}
}
showSuccess
()
{
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
this
.
typeForm
=
type
??
""
timeOut
:
3000
,
if
(
id
==
'modal-alert'
)
{
positionClass
:
'toast-top-right'
,
if
(
type
==
'deleteForm'
)
{
});
this
.
msg
=
'ยืนยันการลบรายการ'
}
else
if
(
type
==
'addForm'
||
type
==
'addIndicator'
)
{
this
.
msg
=
'ยืนยันการบันทึกรายการ'
}
}
if
(
id
)
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
)
},
10
);
}
this
.
isChecked
=
false
;
this
.
numDataListChecked
=
0
;
}
}
showSuccessEdit
(
)
{
closeModalClass
(
id
:
string
)
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
const
modal
=
document
.
getElementById
(
id
);
timeOut
:
3000
,
if
(
id
)
{
positionClass
:
'toast-top-right'
,
modal
?.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
}
);
}
}
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
timeOut
:
3000
,
this
.
searchIndicator
=
""
positionClass
:
'toast-top-right'
,
this
.
selectEmp
=
item
});
this
.
openModalClass
(
model
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
this
.
getApsassessyMini
();
this
.
getIndicators
();
}
}
}
}
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
1f1f5e05
...
@@ -366,7 +366,8 @@
...
@@ -366,7 +366,8 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<app-edit-evaluation-form
*
ngIf=
"evaluationRoundId"
[
evaluationRoundId
]="
evaluationRoundId
"
></app-edit-evaluation-form>
<!-- <app-edit-evaluation-form *ngIf="evaluationRoundId" [evaluationRoundId]="evaluationRoundId" ></app-edit-evaluation-form> -->
<app-edit-define-document-form
*
ngIf=
"evaluationRoundId"
[
evaluationRoundId
]="
evaluationRoundId
"
></app-edit-define-document-form>
</div>
</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 @
1f1f5e05
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
{
AppraisalRoundModel
,
MyAppraisalRoundModel
}
from
'src/app/shared/model/appraisal-aps.model'
;
import
{
AppraisalRoundModel
,
MyAppraisalRoundModel
}
from
'src/app/shared/model/appraisal-aps.model'
;
import
{
AppraisalFormModel
}
from
'src/app/shared/model/appraisal-form.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationModal
}
from
'src/app/shared/model/evaluation-form.modal'
;
import
{
EvaluationModal
}
from
'src/app/shared/model/evaluation-form.modal'
;
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
1f1f5e05
...
@@ -137,8 +137,7 @@
...
@@ -137,8 +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=
"#management-evaluation-cycle-page-modal"
></i>
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
<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
.
pmsEvaluationRoundId
)"
></i>
data-hs-overlay=
"#management-evaluation-cycle-person-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
></i>
data-hs-overlay=
"#management-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'"
...
@@ -352,23 +351,23 @@
...
@@ -352,23 +351,23 @@
</div>
</div>
</div>
</div>
<div
id=
"
management-
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
rounded-sm shadow-sm
"
>
<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"
>
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
</h3>
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
evaluationRoundId=
''
"
data-hs-overlay=
"#
management-
evaluation-cycle-person-modal"
>
data-hs-overlay=
"#evaluation-cycle-person-modal"
>
<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 "
>
<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/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
1f1f5e05
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
,
Renderer2
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyPmsMasfromEvaluationModel
,
PmsMasfromEvaluationModel
}
from
'src/app/shared/model/pms-masfrom-evaluation.model'
;
import
{
MyPmsMasfromEvaluationModel
,
PmsMasfromEvaluationModel
}
from
'src/app/shared/model/pms-masfrom-evaluation.model'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
...
@@ -9,6 +9,7 @@ import { PmsMasfromEvaluationCycleService } from 'src/app/shared/services/pms-ma
...
@@ -9,6 +9,7 @@ import { PmsMasfromEvaluationCycleService } from 'src/app/shared/services/pms-ma
styleUrls
:
[
'./management-evaluation-cycle.component.scss'
]
styleUrls
:
[
'./management-evaluation-cycle.component.scss'
]
})
})
export
class
ManagementCycleComponent
{
export
class
ManagementCycleComponent
{
@
Output
()
evaluationRoundIdChange
=
new
EventEmitter
<
string
>
();
apsPeriodStart
:
string
=
''
;
apsPeriodStart
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
...
@@ -24,14 +25,21 @@ export class ManagementCycleComponent {
...
@@ -24,14 +25,21 @@ export class ManagementCycleComponent {
isDataListChecked
=
false
isDataListChecked
=
false
isDataListCheckedAll
=
false
isDataListCheckedAll
=
false
numDataListChecked
=
0
numDataListChecked
=
0
evaluationRoundId
=
''
private
unlisten
!
:
()
=>
void
;
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
,
private
renderer
:
Renderer2
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getPmsMasfromEvaluationCycleList
()
this
.
getPmsMasfromEvaluationCycleList
()
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
}
});
}
}
getPmsMasfromEvaluationCycleList
()
{
getPmsMasfromEvaluationCycleList
()
{
...
@@ -143,6 +151,19 @@ export class ManagementCycleComponent {
...
@@ -143,6 +151,19 @@ export class ManagementCycleComponent {
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
dataSelect
.
pmsEvaluationRoundId
}))
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
dataSelect
.
pmsEvaluationRoundId
}))
}
}
}
}
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
);
}
}
}
}
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