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 @@
</div>
<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>
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=
"
grid grid-cols-2 gap-6
"
>
<div
class=
"
col-span-1
"
>
<
label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รอบการประเมิน
</label
>
</div
>
<div
class=
"col-span-1"
>
<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
class=
"col-span-1"
>
<
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"
readonly
value=
"{{evaluationRound?.tdesc}}
"
>
</div>
<div
class=
"col-span-1"
>
<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"
readonly
value=
"{{evaluationRound?.apsyear}}"
>
<div
class=
"
body-content
"
>
<div
class=
"
page
"
>
<div
class=
"
border-b border-t border-gray-200 dark:border-white/10
"
>
<
div
class=
"grid grid-cols-2 gap-6 mt-5"
>
<div
class=
"col-span-1"
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
รอบการประเมิน
</label
>
</div
>
<div
class=
"col-span-1"
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label"
>
ปีการประเมิน
</label
>
</div
>
</div
>
<
div
class=
"grid grid-cols-2 gap-6 mb-5"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
[
value
]="
evaluationRound
.
tdesc
"
>
</div>
<div
class=
"col-span-1"
>
<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
class=
"header-title-type"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
</div>
<div
class=
"flex justify-end"
>
<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
"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
style=
"height: 40px;"
>
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()
"
style=
"height: 40px;"
>
<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>
...
...
@@ -51,20 +36,18 @@
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-20px m-0 shadow-md"
data-hs-overlay=
"#edit-define-document-form-alert-add-modal"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-20px m-0 shadow-md"
(
click
)="
openModalClass
('
modal-alert
','
addForm
')"
>
<i
class=
"ri-save-3-line"
></i>
Save
</button>
</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">
<i class="ti ti-book fs-l"></i>
Help
</button>
</div>
</div>
-->
</div>
</div>
</div>
...
...
@@ -89,16 +72,14 @@
</thead>
<tbody>
<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"
>
{{item.masfromEvaluationRound.evaluationRoundId}}
</td>
<td>
{{item.apsassessy.fname}} {{item.apsassessy.lname}}
</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"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-1"
data-hs-overlay=
"#edit-define-document-form-table-modal-edit"
(
click
)="
openEdit
(
item
.
masfromEvaluationRound
.
evaluationRoundId
,
item
.
apsassessy
.
employeeId
)"
></i>
<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>
<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"
>
</td>
...
...
@@ -110,56 +91,65 @@
</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>
<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>
<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
class=
"nav-tabs mt-3"
>
<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
>
<span>
Show {{((currentPage-1) * pageSize)+1}} to {{(assessmentListFilter().length
<
pageSize
)
?
assessmentListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
pageSize
)
-
((
currentPage
*
pageSize
)
-
assessmentListFilter
().
length
)
)
:
(
currentPage
*
pageSize
)
)
}}
of
{{
assessmentListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</nav>
</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"
>
<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-table-modal-edit"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
closeModalClass
('
form-pm-emp
')"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -179,12 +169,12 @@
<div
class=
"col-span-1"
>
<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"
readonly
value=
"
F6702-01
"
>
readonly
value=
"
{{selectEmp.masfromEvaluationRound.evaluationRoundId}}
"
>
</div>
<div
class=
"col-span-1"
>
<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"
readonly
value=
"
พิมพร อูรณการ
"
>
readonly
value=
"
{{selectEmp.apsassessy.fname}} {{selectEmp.apsassessy.lname}}
"
>
</div>
</div>
</div>
...
...
@@ -195,9 +185,9 @@
<!-- Content ของ div แรก -->
<div
class=
"flex gap-x-6"
>
<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"
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>
</div>
...
...
@@ -217,7 +207,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name"
style=
"height: 40px;
"
>
placeholder=
"Search
"
style=
"height: 40px;"
[(
ngModel
)]="
searchRound
"
(
ngModelChange
)="
searchChange
()
"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
@@ -225,30 +215,22 @@
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
(
click
)="
openModalTest
('
edit-define-document-form-table-modal-select
')"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
(
click
)="
openModalClass
('
form-assessment
');
searchIndicatorsChange
()"
>
<i
class=
"ri-add-line"
></i>
Add
</button>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
>
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
(
click
)="
deleteAssessmentList
()"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</button>
</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
class=
"page px-rem"
>
<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"
>
...
...
@@ -257,39 +239,44 @@
<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"
<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>
</td>
<!-- <td class="text-center">
<tbody
*
ngIf=
"loading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!loading&&!empassessmentListFilter().length"
>
<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"
id="checkbox-{{item.data.evaluationRoundId}}" [(ngModel)]="item.check"
(ngModelChange)="dataListCheck()">
id=
"checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
[(
ngModel
)]="
item
.
checkbox
"
(
change
)="
checkempassessmentRoundListCheckbox
()"
>
</td>
<td>
<label
for="checkbox-{{item.
data.evaluationRoundId}}"> {{item.data.evaluationRound
Id}}</label>
</td>
-->
<td
>
{{item
[1]
}}
</td>
<td
>
{{item[2]
}}
</td>
for=
"checkbox-{{item.
item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}"
>
{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopic
Id}}
</label>
</td>
<td
>
{{item
.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc
}}
</td>
<td
class=
"!text-center"
>
{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo
}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteFormOne
(
item
.
item
);"
></i>
</td>
</tr>
...
...
@@ -298,293 +285,238 @@
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a>
</li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"pageRound.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPageRound =
(currentPageRound-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of pageRound;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPageRound!=1&¤tPageRound!=2&¤tPageRound!=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==currentPageRound-1||item==currentPageRound||item==currentPageRound+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageRound"
(
click
)="
currentPageRound=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==pageRound.length-2&¤tPageRound!=pageRound.length&¤tPageRound!=pageRound.length-1&¤tPageRound!=pageRound.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
)="
currentPageRound =
(currentPageRound
>
pageRound.length-1 ? currentPageRound: currentPageRound+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-1"
>
<p>
Show 1 to 10 of 50 items
</p>
<ul
class=
"nav-tabs mt-3"
>
<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>
</div>
</nav>
</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=
"#edit-define-document-form-table-modal-edit
"
>
(
click
)="
closeModalClass
('
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"
>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
(
click
)="
openModalClass
('
modal-alert
','
addIndicator
')"
>
บันทึกข้อมูล
</
a
>
</
button
>
</div>
</div>
</div>
</div>
</div>
<div
id=
"edit-define-document-form-table-modal-selec
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=
"max-h-full overflow-hidden ti-modal-content
"
>
<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
mt-7
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content
!width-80 !box-modal"
>
<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-table-modal-select"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
closeModalClass
('
form-assessment
')"
>
<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
class=
"header-title-type"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
</div>
<div
class=
"flex justify-end"
>
<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"
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
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 ['รหัส','ชื่อประเภท','ชื่อย่อ','การจัดการ']; 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
class=
"page px-rem"
>
<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
"
>
<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>
<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>
</th>
</ng-container>
</tr>
</thead>
<tbody>
<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>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"pageIndicator.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPageIndicator =
(currentPageIndicator-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of pageIndicator;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPageIndicator!=1&¤tPageIndicator!=2&¤tPageIndicator!=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==currentPageIndicator-1||item==currentPageIndicator||item==currentPageIndicator+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageIndicator"
(
click
)="
currentPageIndicator=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
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);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPageIndicator =
(currentPageIndicator
>
pageIndicator.length-1 ? currentPageIndicator: currentPageIndicator+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-1"
>
<p>
Show 1 to 10 of 50 items
</p>
<ul
class=
"nav-tabs mt-3"
>
<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>
</div>
</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>
</nav>
</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"
>
<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=
"#edit-define-document-form-alert-add-modal
"
>
(
click
)="
closeModalClass
('
form-assessment
')
"
>
ย้อนกลับ
</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
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=
"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"
>
<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-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
<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"
>
ยืนยันการเเก้ไขข้อมูลหรือไม่
{{msg}}
</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-edit-modal
"
>
ย
กเลิก
(
click
)="
closeModalClass
('
modal-alert
')
"
>
ย
้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#edit-define-document-form-alert-edit-modal"
(
click
)="
addUser
();
showSuccessEdit
()"
>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='addForm'"
(
click
)="
saveAssessmentList
();
closeModalClass
('
modal-alert
')"
>
บันทึกข้อมูล
</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>
</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"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
>
ย้อนกลับ
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='addIndicator'"
(
click
)="
saveIndicators
();
closeModalClass
('
modal-alert
')"
>
บันทึกข้อมูล
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
*
ngIf=
"typeForm=='deleteForm'|| typeForm=='deleteFormOne'"
(
click
)="
closeModalClass
('
modal-alert
')"
>
บันทึกข้อมูล
</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>
\ No newline at end of file
</div>
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 {
}
.ti-modal
{
overflow
:
auto
;
overflow
:
hidden
;
overflow-y
:
auto
;
}
.header-title-type
{
width
:
100%
;
...
...
@@ -115,4 +116,31 @@ a.custom-link {
}
.bg-input-readonly
{
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
{
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
{
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
({
selector
:
'app-edit-define-document-form'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
...
...
@@ -19,168 +14,288 @@ export interface DataModel {
})
export
class
EditDefineDocumentFormComponent
{
@
ViewChild
(
'modalEdit'
)
modalEdit
!
:
ElementRef
;
@
Input
()
evaluationRound
?:
DataModel
;
@
Output
()
showFrom
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
currentPage
=
1
;
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
'เเก้ไขฟอร์มตามรอบการประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Input
()
evaluationRoundId
=
''
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
currentModal
=
""
;
search
=
''
;
pageSize
=
10
search
=
""
assessmentList
:
any
[]
=
[]
loadingAssess
=
false
assessmentList
:
AppraisalModel
[]
=
[]
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
isChecked
:
boolean
=
false
;
evaluationRoundId
=
""
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
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
cdr
:
ChangeDetectorRef
)
{
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
evaluationCycleService
:
EvaluationCycleService
)
{
}
ngOnInit
():
void
{
if
(
this
.
evaluationRound
)
{
this
.
getEvaluationCycleList
()
ngOnInit
():
void
{
}
}
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
.
getEvaluationCycleList
()
}
else
{
}
ngOnChanges
():
void
{
setTimeout
(()
=>
{
document
.
getElementById
(
'form-pm-emp'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
},
10
);
if
(
this
.
evaluationRoundId
)
{
this
.
getAssessmentId
();
this
.
getAssessmentList
();
}
})
}
else
{
this
.
showAlert
(
'ไม่พบรายการ'
,
'error'
)
}
}
getApsassessy
(){
this
.
loadingAssess
=
true
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
loadingAssess
=
false
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
this
.
loadingAssess
=
false
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
//############################# เเก้ไขเเบบฟอร์มตามรอบการประเมิน modal แรก #############################
getAssessmentId
()
{
this
.
evaluationCycleService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
this
.
evaluationRound
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
});
}
})
}
searchChange
()
{
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
assessmentListFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
getEvaluationCycleList
()
{
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRound
!
.
evaluationRoundId
).
subscribe
({
getAssessmentList
()
{
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
searchChange
()
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
.
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
=>
{
this
.
assessmentList
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getAssessmentList
();
}
else
{
}
}
});
}
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
.
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
,
})
}
else
{
this
.
showAlert
(
'ไม่พบรายการ'
,
'error'
)
}
};
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
)
{
if
(
evaluationRoundId
&&
apsassessy
){
const
modalElement
=
this
.
modalEdit
.
nativeElement
;
setTimeout
(()
=>
{
modalElement
.
setAttribute
(
'aria-overlay'
,
'false'
);
console
.
log
(
"🚀 ~ EditDefineDocumentFormComponent ~ openEdit ~ modalElement:"
,
modalElement
)
},
10
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
// ############################# Modal 2 #############################
saveIndicators
()
{
if
(
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
).
length
>
0
)
{
if
(
this
.
empassessmentList
)
{
this
.
empassessmentList
.
masfromTopic
=
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
)
as
any
;
}
this
.
evaluationAssessmentService
.
postList
([
this
.
empassessmentList
]).
subscribe
({
next
:
response
=>
{
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
(){
console
.
log
(
this
.
assessmentList
);
getApsassessy
()
{
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
)
{
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'
;
getApsassessyMini
()
{
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
checkTopic
();
this
.
searchEmpassessmentListFilterChange
()
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 ทั้งหมดปิดแล้ว
}
empassessmentListFilter
()
{
return
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
tdesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
edesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
))
}
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
searchEmpassessmentListFilterChange
()
{
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
()
{
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 #############################
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
//############################# Modal Indicators #############################
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'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
...
...
@@ -188,24 +303,50 @@ assessmentListFilter(){
});
}
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
typeForm
=
type
??
""
if
(
id
==
'modal-alert'
)
{
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
(
)
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
}
);
closeModalClass
(
id
:
string
)
{
const
modal
=
document
.
getElementById
(
id
);
if
(
id
)
{
modal
?.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
}
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
this
.
searchIndicator
=
""
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 @@
</div>
</div>
<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>
...
...
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
{
ToastrService
}
from
'ngx-toastr'
;
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
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
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 @@
<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
)"
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#management-evaluation-cycle-person-modal"
></i>
<i
class=
"ti ti-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>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
></i>
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
...
...
@@ -352,23 +351,23 @@
</div>
</div>
<div
id=
"
management-
evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out
lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full
rounded-sm shadow-sm
"
>
<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
m-3 lg:!mx-auto "
style=
"min-width: 70%;
"
>
<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=
"#
management-
evaluation-cycle-person-modal"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
evaluationRoundId=
''
"
data-hs-overlay=
"#evaluation-cycle-person-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<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>
...
...
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
{
MyPmsMasfromEvaluationModel
,
PmsMasfromEvaluationModel
}
from
'src/app/shared/model/pms-masfrom-evaluation.model'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
...
...
@@ -9,6 +9,7 @@ import { PmsMasfromEvaluationCycleService } from 'src/app/shared/services/pms-ma
styleUrls
:
[
'./management-evaluation-cycle.component.scss'
]
})
export
class
ManagementCycleComponent
{
@
Output
()
evaluationRoundIdChange
=
new
EventEmitter
<
string
>
();
apsPeriodStart
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
...
...
@@ -24,14 +25,21 @@ export class ManagementCycleComponent {
isDataListChecked
=
false
isDataListCheckedAll
=
false
numDataListChecked
=
0
evaluationRoundId
=
''
private
unlisten
!
:
()
=>
void
;
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
,
private
renderer
:
Renderer2
)
{
}
ngOnInit
():
void
{
this
.
getPmsMasfromEvaluationCycleList
()
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
}
});
}
getPmsMasfromEvaluationCycleList
()
{
...
...
@@ -143,6 +151,19 @@ export class ManagementCycleComponent {
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