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
b68096c3
Commit
b68096c3
authored
Mar 04, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
รอบการประเมิน competency pms
parent
2af7bb7c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
83 deletions
+94
-83
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+23
-23
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+10
-8
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+37
-38
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+24
-14
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
b68096c3
...
@@ -32,14 +32,14 @@
...
@@ -32,14 +32,14 @@
</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"
data-hs-overlay=
"#evaluation-cycle-modal"
(
click
)="
modalStatus=
'add'
;
setData
()"
>
data-hs-overlay=
"#evaluation-cycle-
page-
modal"
(
click
)="
modalStatus=
'add'
;
setData
()"
>
<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);"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
(
click
)="
modalStatus=
'deleteGroup'
;
setData
()"
>
data-hs-overlay=
"#evaluation-cycle-
page-
alert-modal"
(
click
)="
modalStatus=
'deleteGroup'
;
setData
()"
>
<i
class=
"ti ti-trash fs-l"
></i>
<i
class=
"ti ti-trash fs-l"
></i>
Delete
Delete
</button>
</button>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
</td>
</td>
<td>
<td>
<!-- <i class="ti ti-user cursor-pointer i-gray fs-l px-1" data-hs-overlay="#evaluation-cycle-
modal" (click)="openModal('evaluation-cycle
-modal',item.data.evaluationRoundId)"></i> -->
<!-- <i class="ti ti-user cursor-pointer i-gray fs-l px-1" data-hs-overlay="#evaluation-cycle-
person-modal" (click)="openModal('evaluation-cycle-person
-modal',item.data.evaluationRoundId)"></i> -->
<label
for=
"checkbox-{{item.data.evaluationRoundId}}"
>
{{item.data.evaluationRoundId}}
</label>
<label
for=
"checkbox-{{item.data.evaluationRoundId}}"
>
{{item.data.evaluationRoundId}}
</label>
</td>
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.tdesc}}
</td>
...
@@ -136,11 +136,11 @@
...
@@ -136,11 +136,11 @@
</td>
</td>
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#evaluation-cycle-modal"
></i>
data-hs-overlay=
"#evaluation-cycle-
page-
modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i>
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
></i>
data-hs-overlay=
"#evaluation-cycle-
page-
alert-modal"
></i>
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
[ngClass]="{'bg-primary':item.data.statusCode.code=='1','bg-gray-400':item.data.statusCode.code!='3'}">ปิดรอบประเมิน</span>
[ngClass]="{'bg-primary':item.data.statusCode.code=='1','bg-gray-400':item.data.statusCode.code!='3'}">ปิดรอบประเมิน</span>
<span class="badge text-white m-1 bg-secondary" *ngIf="item.data.statusCode.code=='0'">สร้างแบบฟอร์ม</span> -->
<span class="badge text-white m-1 bg-secondary" *ngIf="item.data.statusCode.code=='0'">สร้างแบบฟอร์ม</span> -->
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
</nav>
</nav>
</div>
</div>
<div
id=
"evaluation-cycle-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"evaluation-cycle-
page-
modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
</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"
data-hs-overlay=
"#evaluation-cycle-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
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>
...
@@ -298,10 +298,10 @@
...
@@ -298,10 +298,10 @@
<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=
"#evaluation-cycle-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#evaluation-cycle-
page-
alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
[
disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
[
disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
บันทึกข้อมูล
บันทึกข้อมูล
...
@@ -312,7 +312,7 @@
...
@@ -312,7 +312,7 @@
</div>
</div>
</div>
</div>
<div
id=
"evaluation-cycle-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"evaluation-cycle-
page-
alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
...
@@ -322,14 +322,14 @@
...
@@ -322,14 +322,14 @@
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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"
data-hs-overlay=
"#evaluation-cycle-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
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>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
alert-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>
...
@@ -350,22 +350,22 @@
...
@@ -350,22 +350,22 @@
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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=
"#evaluation-cycle-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
(
click
)="
addevaluation_cycle
()"
>
data-hs-overlay=
"#evaluation-cycle-page-alert-modal"
(
click
)="
addevaluation_cycle
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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=
"#evaluation-cycle-alert-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
alert-modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
data-hs-overlay=
"#evaluation-cycle-alert-modal"
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
(
click
)="
deleteevaluation_cycle
()"
>
data-hs-overlay=
"#evaluation-cycle-page-alert-modal"
(
click
)="
deleteevaluation_cycle
()"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
@@ -391,8 +391,7 @@
...
@@ -391,8 +391,7 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<!-- <app-edit-evaluation-form *ngIf="evaluationRoundId"
<!-- <app-edit-evaluation-form *ngIf="evaluationRoundId" [evaluationRoundId]="evaluationRoundId" ></app-edit-evaluation-form> -->
[evaluationRoundId]="evaluationRoundId"></app-edit-evaluation-form>> -->
<app-edit-define-document-form
*
ngIf=
"evaluationRoundId"
<app-edit-define-document-form
*
ngIf=
"evaluationRoundId"
[
evaluationRoundId
]="
evaluationRoundId
"
></app-edit-define-document-form>
[
evaluationRoundId
]="
evaluationRoundId
"
></app-edit-define-document-form>
</div>
</div>
...
@@ -402,6 +401,7 @@
...
@@ -402,6 +401,7 @@
<div
id=
"evaluation-cycle-pl-table-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"evaluation-cycle-pl-table-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 lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
...
@@ -411,7 +411,7 @@
...
@@ -411,7 +411,7 @@
</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"
data-hs-overlay=
"#evaluation-cycle-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
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>
...
@@ -467,7 +467,7 @@
...
@@ -467,7 +467,7 @@
<tbody
*
ngIf=
"!pl.loading&&plListFilter().length"
>
<tbody
*
ngIf=
"!pl.loading&&plListFilter().length"
>
<tr
<tr
*
ngFor=
"let item of plListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
*
ngFor=
"let item of plListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
data-hs-overlay=
"#evaluation-cycle-modal"
(
click
)="
selectPl
(
item
)"
>
class=
"cursor-pointer"
data-hs-overlay=
"#evaluation-cycle-
page-
modal"
(
click
)="
selectPl
(
item
)"
>
<td
class=
"flex justify-center"
>
<td
class=
"flex justify-center"
>
{{((modal.currentPage-1) * 10)+(i+1)}}
{{((modal.currentPage-1) * 10)+(i+1)}}
</td>
</td>
...
@@ -519,7 +519,7 @@
...
@@ -519,7 +519,7 @@
<div
class=
"flex justify-end mt-2rem mb-1rem space-x-4"
>
<div
class=
"flex justify-end mt-2rem mb-1rem space-x-4"
>
<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=
"#evaluation-cycle-modal"
>
data-hs-overlay=
"#evaluation-cycle-
page-
modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
</div>
</div>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
b68096c3
...
@@ -5,7 +5,12 @@ import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle
...
@@ -5,7 +5,12 @@ import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
MyPLModel
,
PLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
PLModel
,
MyPLModel
}
from
'src/app/shared/model/pl.model'
;
export
interface
DataModal
{
search
:
string
,
currentPage
:
number
,
page
:
number
[]
}
export
interface
DataModel
{
export
interface
DataModel
{
evaluationRoundId
:
string
;
evaluationRoundId
:
string
;
...
@@ -16,11 +21,7 @@ export interface DataModel {
...
@@ -16,11 +21,7 @@ export interface DataModel {
apsPeriodEnd
:
string
;
apsPeriodEnd
:
string
;
statusCode
:
StatusCodeModel
;
statusCode
:
StatusCodeModel
;
}
}
export
interface
DataModal
{
search
:
string
,
currentPage
:
number
,
page
:
number
[]
}
@
Component
({
@
Component
({
selector
:
'app-evaluation-cycle'
,
selector
:
'app-evaluation-cycle'
,
templateUrl
:
'./evaluation-cycle.component.html'
,
templateUrl
:
'./evaluation-cycle.component.html'
,
...
@@ -52,12 +53,13 @@ export class EvaluationCycleComponent {
...
@@ -52,12 +53,13 @@ export class EvaluationCycleComponent {
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
}
}
pl
:
{
loading
:
boolean
,
selectList
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()],
selectIndex
:
-
1
,
dataList
:
[]
}
pl
:
{
loading
:
boolean
,
selectList
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()],
selectIndex
:
-
1
,
dataList
:
[]
}
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
renderer
:
Renderer2
,
private
renderer
:
Renderer2
,
private
pLService
:
PLService
private
pLService
:
PLService
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
...
@@ -250,11 +252,11 @@ export class EvaluationCycleComponent {
...
@@ -250,11 +252,11 @@ export class EvaluationCycleComponent {
}
}
}
}
searchModalChange
(
dataList
:
any
[])
{
searchModalChange
(
dataList
:
any
[])
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
}
}
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
b68096c3
...
@@ -32,14 +32,14 @@
...
@@ -32,14 +32,14 @@
</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"
data-hs-overlay=
"#management-evaluation-cycle-modal"
(
click
)="
modalStatus=
'add'
;
setData
()"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
modal"
(
click
)="
modalStatus=
'add'
;
setData
()"
>
<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);"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
data-hs-overlay=
"#management-evaluation-cycle-alert-modal"
(
click
)="
modalStatus=
'deleteGroup'
;
setData
()"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
alert-modal"
(
click
)="
modalStatus=
'deleteGroup'
;
setData
()"
>
<i
class=
"ti ti-trash fs-l"
></i>
<i
class=
"ti ti-trash fs-l"
></i>
Delete
Delete
</button>
</button>
...
@@ -136,13 +136,11 @@
...
@@ -136,13 +136,11 @@
</td>
</td>
<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-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
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"
data-hs-overlay=
"#evaluation-cycle-person-modal"
<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>
(
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
)"
<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-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'"
[ngClass]="{'bg-primary':item.data.statusCode.code=='1','bg-gray-400':item.data.statusCode.code!='3'}">ปิดรอบประเมิน</span>
[ngClass]="{'bg-primary':item.data.statusCode.code=='1','bg-gray-400':item.data.statusCode.code!='3'}">ปิดรอบประเมิน</span>
<span class="badge text-white m-1 bg-secondary" *ngIf="item.data.statusCode.code=='0'">สร้างแบบฟอร์ม</span> -->
<span class="badge text-white m-1 bg-secondary" *ngIf="item.data.statusCode.code=='0'">สร้างแบบฟอร์ม</span> -->
...
@@ -209,7 +207,7 @@
...
@@ -209,7 +207,7 @@
</nav>
</nav>
</div>
</div>
<div
id=
"management-evaluation-cycle-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"management-evaluation-cycle-
page-
modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
...
@@ -218,7 +216,7 @@
...
@@ -218,7 +216,7 @@
</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"
data-hs-overlay=
"#management-evaluation-cycle-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
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>
...
@@ -300,10 +298,11 @@
...
@@ -300,10 +298,11 @@
<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=
"#management-evaluation-cycle-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#management-evaluation-cycle-alert-modal"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
pmsEvaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
pmsEvaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
[
disabled
]="!
dataSelect
.
pmsEvaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
[
disabled
]="!
dataSelect
.
pmsEvaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
บันทึกข้อมูล
บันทึกข้อมูล
...
@@ -314,7 +313,7 @@
...
@@ -314,7 +313,7 @@
</div>
</div>
</div>
</div>
<div
id=
"management-evaluation-cycle-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"management-evaluation-cycle-
page-
alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
...
@@ -324,14 +323,14 @@
...
@@ -324,14 +323,14 @@
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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"
data-hs-overlay=
"#management-evaluation-cycle-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
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>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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"
data-hs-overlay=
"#management-evaluation-cycle-alert-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
alert-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>
...
@@ -347,26 +346,27 @@
...
@@ -347,26 +346,27 @@
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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=
"#management-evaluation-cycle-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#management-evaluation-cycle-alert-modal"
(
click
)="
addPmsMasfromEvaluation
()"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
alert-modal"
(
click
)="
addPmsMasfromEvaluation
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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=
"#management-evaluation-cycle-alert-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
alert-modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
data-hs-overlay=
"#management-evaluation-cycle-alert-modal"
(
click
)="
deletePmsMasfromEvaluation
()"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
alert-modal"
(
click
)="
deletePmsMasfromEvaluation
()"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
@@ -376,25 +376,19 @@
...
@@ -376,25 +376,19 @@
</div>
</div>
</div>
</div>
<div
id=
"management-evaluation-cycle-page-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
id=
"evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"ti-modal-header"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out m-3 lg:!mx-auto "
style=
"min-width: 70%;"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
<div
class=
"ti-modal-header"
>
</h3>
<h3
class=
"text-xxl font-bold text-primary"
>
<div
class=
"flex justify-end"
>
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
evaluationRoundId=
''
"
</h3>
data-hs-overlay=
"#evaluation-cycle-person-modal"
>
<div
class=
"flex justify-end"
>
<span
class=
"sr-only"
>
Close
</span>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<i
class=
"ti ti-circle-x fs-xxl"
></i>
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
(
click
)="
evaluationRoundId=
''
"
>
</button>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
...
@@ -405,6 +399,10 @@
...
@@ -405,6 +399,10 @@
</div>
</div>
</div>
</div>
<div
id=
"management-evaluation-cycle-pl-table-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"management-evaluation-cycle-pl-table-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 lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
...
@@ -414,7 +412,7 @@
...
@@ -414,7 +412,7 @@
</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"
data-hs-overlay=
"#management-evaluation-cycle-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
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>
...
@@ -470,7 +468,8 @@
...
@@ -470,7 +468,8 @@
<tbody
*
ngIf=
"!pl.loading&&plListFilter().length"
>
<tbody
*
ngIf=
"!pl.loading&&plListFilter().length"
>
<tr
<tr
*
ngFor=
"let item of plListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
*
ngFor=
"let item of plListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
data-hs-overlay=
"#management-evaluation-cycle-modal"
(
click
)="
selectPl
(
item
)"
>
class=
"cursor-pointer"
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
(
click
)="
selectPl
(
item
)"
>
<td
class=
"flex justify-center"
>
<td
class=
"flex justify-center"
>
{{((modal.currentPage-1) * 10)+(i+1)}}
{{((modal.currentPage-1) * 10)+(i+1)}}
</td>
</td>
...
@@ -522,7 +521,7 @@
...
@@ -522,7 +521,7 @@
<div
class=
"flex justify-end mt-2rem mb-1rem space-x-4"
>
<div
class=
"flex justify-end mt-2rem mb-1rem space-x-4"
>
<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=
"#management-evaluation-cycle-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-
page-
modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
b68096c3
...
@@ -9,6 +9,7 @@ export interface DataModal {
...
@@ -9,6 +9,7 @@ export interface DataModal {
currentPage
:
number
,
currentPage
:
number
,
page
:
number
[]
page
:
number
[]
}
}
@
Component
({
@
Component
({
selector
:
'app-management-evaluation-cycle'
,
selector
:
'app-management-evaluation-cycle'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
...
@@ -31,25 +32,38 @@ export class ManagementCycleComponent {
...
@@ -31,25 +32,38 @@ export class ManagementCycleComponent {
isDataListChecked
=
false
isDataListChecked
=
false
isDataListCheckedAll
=
false
isDataListCheckedAll
=
false
numDataListChecked
=
0
numDataListChecked
=
0
evaluationRoundId
=
''
private
unlisten
!
:
()
=>
void
;
modal
:
DataModal
=
{
modal
:
DataModal
=
{
search
:
""
,
search
:
""
,
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
}
}
pl
:
{
loading
:
boolean
,
selectList
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()],
selectIndex
:
-
1
,
dataList
:
[]
}
pl
:
{
loading
:
boolean
,
selectList
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()],
selectIndex
:
-
1
,
dataList
:
[]
}
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
pLService
:
PLService
,
private
renderer
:
Renderer2
,
private
renderer
:
Renderer2
private
pLService
:
PLService
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getPmsMasfromEvaluationCycleList
()
this
.
getPmsMasfromEvaluationCycleList
()
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
}
});
this
.
getPlList
()
this
.
getPlList
()
}
}
ngOnDestroy
()
{
if
(
this
.
unlisten
)
{
this
.
unlisten
();
// เรียกใช้งานจริง ๆ เพื่อลบ event listener
}
}
getPlList
()
{
getPlList
()
{
this
.
pl
.
loading
=
false
this
.
pl
.
loading
=
false
...
@@ -83,13 +97,9 @@ export class ManagementCycleComponent {
...
@@ -83,13 +97,9 @@ export class ManagementCycleComponent {
if
(
this
.
pl
.
selectIndex
===
this
.
pl
.
selectList
.
length
-
1
)
{
if
(
this
.
pl
.
selectIndex
===
this
.
pl
.
selectList
.
length
-
1
)
{
this
.
pl
.
selectList
.
push
(
new
MyPLModel
());
this
.
pl
.
selectList
.
push
(
new
MyPLModel
());
}
}
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
}
});
}
}
getPmsMasfromEvaluationCycleList
()
{
getPmsMasfromEvaluationCycleList
()
{
this
.
dataLoading
=
true
this
.
dataLoading
=
true
this
.
pmsMasfromEvaluationCycleService
.
getList
().
subscribe
({
this
.
pmsMasfromEvaluationCycleService
.
getList
().
subscribe
({
...
@@ -201,11 +211,6 @@ export class ManagementCycleComponent {
...
@@ -201,11 +211,6 @@ export class ManagementCycleComponent {
this
.
pl
.
selectList
=
[
new
MyPLModel
()]
this
.
pl
.
selectList
=
[
new
MyPLModel
()]
}
}
searchModalChange
(
dataList
:
any
[])
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
this
.
evaluationRoundId
=
''
this
.
evaluationRoundId
=
''
if
(
id
==
'evaluation-cycle-person-modal'
)
{
if
(
id
==
'evaluation-cycle-person-modal'
)
{
...
@@ -218,6 +223,11 @@ export class ManagementCycleComponent {
...
@@ -218,6 +223,11 @@ export class ManagementCycleComponent {
},
10
);
},
10
);
}
}
}
}
searchModalChange
(
dataList
:
any
[])
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
}
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