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
dee8abcf
Commit
dee8abcf
authored
Feb 24, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE evaluation-cycle-manager
parent
0407d6c0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
252 additions
and
116 deletions
+252
-116
define-document-form.component.html
.../define-document-form/define-document-form.component.html
+10
-22
define-document-form.component.ts
...er/define-document-form/define-document-form.component.ts
+7
-3
edit-define-document-form.component.html
...ne-document-form/edit-define-document-form.component.html
+65
-70
edit-define-document-form.component.ts
...fine-document-form/edit-define-document-form.component.ts
+120
-16
evaluation-cycle-manager.component.html
...ion-cycle-manager/evaluation-cycle-manager.component.html
+1
-4
evaluation-cycle-manager.component.ts
...ation-cycle-manager/evaluation-cycle-manager.component.ts
+4
-1
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+2
-0
evaluation-assessment.service.ts
src/app/shared/services/evaluation-assessment.service.ts
+40
-0
evaluation-cycle.service.ts
src/app/shared/services/evaluation-cycle.service.ts
+3
-0
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/define-document-form.component.html
View file @
dee8abcf
<ng-container
*
ngIf=
"!showFrom"
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex pr-2"
>
<div
class=
"flex pr-2"
>
<!-- <div class="flex">
<div class="flex items-center">
<input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox"
[(ngModel)]="isDataListChecked">
<label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none">
{{numDataListChecked}} Selected</label>
</div>
<div class="mx-1 flex items-center">
<button (click)="isDataListCheckedAll = !isDataListCheckedAll;dataListCheckAll()"
class="focus:ring-2 focus:ring-primary rounded-sm flex item-center">
<i class="fs-l transition-all duration-200"
[ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i>
</button>
<label class="text-sm text-gray-500 ml-2">Select All</label>
</div>
</div> -->
</div>
</div>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
...
@@ -111,12 +96,12 @@
...
@@ -111,12 +96,12 @@
</td>
</td>
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
<i
*
ngIf=
"item.statusCode.code !== '2'"
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
<i
*
ngIf=
"item.statusCode.code !== '2'"
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
onEdit
()"
></i>
(
click
)="
modalStatus=
'edit'
;
onEdit
(
item
)"
></i>
<i
*
ngIf=
"item.statusCode.code !== '2'"
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
<
!-- <
i *ngIf="item.statusCode.code !== '2'" class="ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#define-document-form-delete-modal"
></i>
data-hs-overlay="#define-document-form-delete-modal"></i>
-->
<span
*
ngIf=
"item.statusCode.code !== '2'"
class=
"badge text-white m-1 cursor-pointer bg-primary"
<
!-- <
span *ngIf="item.statusCode.code !== '2'" class="badge text-white m-1 cursor-pointer bg-primary"
(
click
)="
basicAlert3
()"
>
สร้างแบบฟอร์ม
</span>
(click)="basicAlert3()">สร้างแบบฟอร์ม</span>
-->
</td>
</td>
</tr>
</tr>
...
@@ -162,7 +147,7 @@
...
@@ -162,7 +147,7 @@
</ul>
</ul>
</nav>
</nav>
</div>
</div>
</ng-container>
<div
id=
"define-document-form-modal"
class=
"hs-overlay hidden ti-modal "
>
<div
id=
"define-document-form-modal"
class=
"hs-overlay hidden ti-modal "
>
<div
class=
" ti-modal-box ease-out modal-md"
>
<div
class=
" ti-modal-box ease-out modal-md"
>
...
@@ -329,4 +314,7 @@
...
@@ -329,4 +314,7 @@
</div>
</div>
</div>
</div>
<ng-container
*
ngIf=
"showFrom"
>
<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/define-document-form.component.ts
View file @
dee8abcf
...
@@ -26,8 +26,9 @@ export interface DataModel {
...
@@ -26,8 +26,9 @@ export interface DataModel {
styleUrls
:
[
'./define-document-form.component.scss'
],
styleUrls
:
[
'./define-document-form.component.scss'
],
})
})
export
class
DefineDocumentFormComponent
{
export
class
DefineDocumentFormComponent
{
[
x
:
string
]:
any
;
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
// @Output() evaluationRound: EventEmitter<DataModel> = new EventEmitter<DataModel>();
currentPage
=
1
;
currentPage
=
1
;
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
''
;
search
=
''
;
...
@@ -36,6 +37,8 @@ export class DefineDocumentFormComponent {
...
@@ -36,6 +37,8 @@ export class DefineDocumentFormComponent {
isDataListCheckedAll
=
false
;
isDataListCheckedAll
=
false
;
modalStatus
:
'add'
|
'edit'
=
'add'
;
modalStatus
:
'add'
|
'edit'
=
'add'
;
evaluation_cyclelist
:
DataModel
[]
=
[]
evaluation_cyclelist
:
DataModel
[]
=
[]
evaluationRound
?:
DataModel
showFrom
=
false
constructor
(
constructor
(
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
swalService
:
SwalService
,
private
swalService
:
SwalService
,
...
@@ -43,8 +46,9 @@ export class DefineDocumentFormComponent {
...
@@ -43,8 +46,9 @@ export class DefineDocumentFormComponent {
private
toastr
:
ToastrService
private
toastr
:
ToastrService
)
{}
)
{}
onEdit
()
{
onEdit
(
evaluationRound
:
DataModel
)
{
this
.
sendGroupShow
.
emit
(
'2'
);
this
.
evaluationRound
=
evaluationRound
;
this
.
showFrom
=
true
}
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getEvaluationCycleList
();
this
.
getEvaluationCycleList
();
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.html
View file @
dee8abcf
...
@@ -22,12 +22,12 @@
...
@@ -22,12 +22,12 @@
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
<input
type=
"text"
id=
"input-label"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly
value=
"
ช่วงเวลาที่ 2
"
>
readonly
value=
"
{{evaluationRound?.tdesc}}
"
>
</div>
</div>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
<input
type=
"text"
id=
"input-label"
<input
type=
"text"
id=
"input-label"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly
value=
"
2567
"
>
readonly
value=
"
{{evaluationRound?.apsyear}}
"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -36,22 +36,6 @@
...
@@ -36,22 +36,6 @@
<div
class=
"header-title-type"
>
<div
class=
"header-title-type"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<!-- 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">
<label for="hs-checkbox-group-1"
class="text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70">0 Selected</label>
</div>
<div class="flex items-center">
<i (click)="toggleCheckbox()"
[ngClass]="{'ri-checkbox-multiple-line': !isChecked, 'ri-checkbox-multiple-fill': isChecked}"
class="ri-checkbox-multiple-line text-gray-500 dark:text-white/70"></i>
<label for="hs-checkbox-group-2" class="text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
(click)="toggleCheckbox()">Select All</label>
</div>
</div> -->
</div>
</div>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
...
@@ -59,7 +43,7 @@
...
@@ -59,7 +43,7 @@
<div
class=
"relative shadow-md"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
>
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
style=
"height: 40px;"
>
<div
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
<i
class=
"ri-search-line text-gray"
></i>
...
@@ -93,30 +77,29 @@
...
@@ -93,30 +77,29 @@
<tr>
<tr>
<ng-container
<ng-container
*
ngFor=
"let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ระดับพนักงาน','การจัดการ']; let f = first; let l = last; let i = index"
>
*
ngFor=
"let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ระดับพนักงาน','การจัดการ']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<th
scope=
"col"
[
class
.!
text-center
]="
f
||
l
||
item =
==
'รหัสแบบฟอร์ม'"
class=
"relative px-10px py-10px bg-soft-secondary text-primary !text-center"
>
[
style
.
width
]="
item =
==
'รหัสแบบฟอร์ม'
?
'
20
%'
:
'
auto
'"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<span
class=
"text-sm"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!f&&!l"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
</th>
</ng-container>
</ng-container>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
<tr
*
ngFor=
"let item of[
*
ngFor=
"let item of assessmentListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
['F6702-01', 'พิมพร อูรณการ','Human Resource Development Officer S3','พนักงานระดับ S1-S2'],
<td
class=
"flex justify-center items-center"
>
['F6702-02', 'กมลชนก ภูผาลินิน','HDR Training Officer','พนักงานระดับ S3-S4'],
{{item.masfromEvaluationRoundModel.evaluationRoundId}}
</td>
['F6702-03', 'สุกัญญา ทองอ่อน','Recruitment & Employment Officer','พนักงานระดับ S1-S2'],
<td>
{{item.apsassessy.fname}} {{item.apsassessy.lname}}
</td>
['F6702-04', 'ชลิตา อาแว','Time Keeper & Doc. (Payroll) Officer','พนักงานระดับ S1-S2'],
<td
class=
"text-center"
>
{{item.apsassessy.position.tdesc}}
</td>
['F6702-05', 'ธญานี พิบูลย์สวัสดิ์','Employee Relations Officer','พนักงานระดับ S3-S4']];let i = index"
>
<td
class=
"text-center"
>
{{item.apsassessy.pl.tdesc}}
</td>
<td
class=
"flex justify-center items-center"
style=
"font-size: 12px;"
>
{{ item[0] }}
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item[1]}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
{{item[2]}}
</td>
<td
style=
"font-size: 12px;text-align: center;"
>
{{item[3]}}
</td>
<td
class=
"flex justify-center items-center space-x-2"
>
<td
class=
"flex justify-center items-center space-x-2"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-1"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-xl px-1"
data-hs-overlay=
"#edit-define-document-form-table-modal-edit"
(
click
)="
openEdit
()"
></i>
data-hs-overlay=
"#edit-define-document-form-table-modal-edit"
<input
type=
"checkbox"
id=
"hs-small-switch"
(
click
)="
openEdit
(
item
.
masfromEvaluationRoundModel
.
evaluationRoundId
,
item
.
apsassessy
.
employeeId
)"
></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"
>
class=
"ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 dark:checked:bg-green-600 checked:before:bg-green-200 dark:checked:before:bg-green-200 shrink-0 w-11 h-6 before:w-5 before:h-5"
>
</td>
</td>
</tr>
</tr>
...
@@ -125,44 +108,49 @@
...
@@ -125,44 +108,49 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"nav-tabs"
>
<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"
>
<ul
class=
"ti-pagination"
>
<li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</li>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a>
<li
*
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>
<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>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</li>
</li>
</ul>
</ul>
</nav>
<ul
class=
"nav-tabs mt-3"
>
</div>
<span>
Show {{((currentPage-1) * 10)+1}} to {{assessmentListFilter().length
<10
</div>
?
assessmentListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
</ul>
10
)
-
assessmentListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
assessmentListFilter
().
length
}}
<ul
class=
"nav-tabs mt-1"
>
items
</
span
>
<p>
Show 1 to 10 of 50 items
</p>
</ul>
</ul>
</
di
v>
</
na
v>
</div>
</div>
<div
#
modalEdit
id=
"edit-define-document-form-table-modal-edit"
class=
"hs-overlay hidden ti-modal"
>
<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=
"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
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
...
@@ -238,7 +226,7 @@
...
@@ -238,7 +226,7 @@
</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=
"#edit-define-document-form-table-modal-select
"
>
(
click
)="
openModalTest
('
edit-define-document-form-table-modal-select
')
"
>
<i
class=
"ri-add-line"
></i>
<i
class=
"ri-add-line"
></i>
Add
Add
</button>
</button>
...
@@ -268,7 +256,7 @@
...
@@ -268,7 +256,7 @@
<thead>
<thead>
<tr>
<tr>
<ng-container
<ng-container
*
ngFor=
"let item of ['รหัสสมรรถนะ','ชื่อสมรรถนะ','ระดับความหวัง','การจัดการ']; let f = first; let l = last; let i = index"
>
*
ngFor=
"let item of ['
','
รหัสสมรรถนะ','ชื่อสมรรถนะ','ระดับความหวัง','การจัดการ']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
||
item =
==
'ระดับความหวัง'"
>
[
class
.!
text-center
]="
f
||
l
||
item =
==
'ระดับความหวัง'"
>
...
@@ -285,13 +273,20 @@
...
@@ -285,13 +273,20 @@
['CC-03', 'ความรับผิดชอบในหน้าที่และโปร่งใส (Accountability & Ethics)','ระดับที่ 1'],
['CC-03', 'ความรับผิดชอบในหน้าที่และโปร่งใส (Accountability & Ethics)','ระดับที่ 1'],
['CC-04', 'การพัฒนาอย่างต่อเนื่อง (Readiness to Learn & Continous Improvement)','ระดับที่ 1'],
['CC-04', 'การพัฒนาอย่างต่อเนื่อง (Readiness to Learn & Continous Improvement)','ระดับที่ 1'],
['CC-05', 'การคิดอย่างเป็นระบบ (Systematic Thinking)','ระดับที่ 1']];let i = index"
>
['CC-05', 'การคิดอย่างเป็นระบบ (Systematic Thinking)','ระดับที่ 1']];let i = index"
>
<td
class=
"flex justify-center items-center"
<td>
style=
"height: 40px; font-size: 12px;"
>
<input
class=
"mr-1"
type=
"checkbox"
style=
"transform: scale(0.7);"
>
<span
style=
"display: inline-block;"
class=
"w-10"
>
{{ item[0] }}
</span>
</td>
</td>
<td
style=
"font-size: 12px; width: 60%;"
>
{{item[1]}}
</td>
<!-- <td class="text-center">
<td
style=
"font-size: 12px;text-align: center;"
>
{{item[2]}}
</td>
<input type="checkbox" class="ti-form-checkbox cursor-pointer"
id="checkbox-{{item.data.evaluationRoundId}}" [(ngModel)]="item.check"
(ngModelChange)="dataListCheck()">
</td>
<td>
<label
for="checkbox-{{item.data.evaluationRoundId}}"> {{item.data.evaluationRoundId}}</label>
</td> -->
<td
>
{{item[1]}}
</td>
<td
>
{{item[2]}}
</td>
<td
class=
"flex justify-center"
>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
></i>
data-hs-overlay=
"#edit-define-document-form-alert-delete-modal"
></i>
...
@@ -353,7 +348,7 @@
...
@@ -353,7 +348,7 @@
</div>
</div>
</div>
</div>
<div
id=
"edit-define-document-form-table-modal-select"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"edit-define-document-form-table-modal-select"
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"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
...
@@ -508,11 +503,11 @@
...
@@ -508,11 +503,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=
"#edit-define-document-form-
modal-add
"
>
data-hs-overlay=
"#edit-define-document-form-
alert-add-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=
"#edit-define-document-form-alert-add-modal"
(
click
)="
addUser
();
showSuccess
()"
>
data-hs-overlay=
"#edit-define-document-form-alert-add-modal"
(
click
)="
saveAssessmentList
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</div>
</div>
...
@@ -544,8 +539,8 @@
...
@@ -544,8 +539,8 @@
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#edit-define-document-form-
modal-edit
"
>
data-hs-overlay=
"#edit-define-document-form-
alert-edit-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=
"#edit-define-document-form-alert-edit-modal"
data-hs-overlay=
"#edit-define-document-form-alert-edit-modal"
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.ts
View file @
dee8abcf
import
{
Component
,
ElementRef
,
EventEmitter
,
Input
,
Output
,
ViewChild
}
from
'@angular/core'
;
import
{
C
hangeDetectorRef
,
C
omponent
,
ElementRef
,
EventEmitter
,
Input
,
Output
,
ViewChild
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
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
({
@
Component
({
selector
:
'app-edit-define-document-form'
,
selector
:
'app-edit-define-document-form'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
styleUrls
:
[
'./edit-define-document-form.component.scss'
]
styleUrls
:
[
'./edit-define-document-form.component.scss'
]
})
})
export
class
EditDefineDocumentFormComponent
{
export
class
EditDefineDocumentFormComponent
{
@
ViewChild
(
'modalEdit'
)
modalEdit
!
:
ElementRef
;
@
ViewChild
(
'modalEdit'
)
modalEdit
!
:
ElementRef
;
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
'จัดกลุ่มสมรรถนะ'
];
@
Input
()
evaluationRound
?:
DataModel
;
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
showFrom
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
currentPage
=
1
;
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
currentModal
=
""
;
search
=
''
;
assessmentList
:
any
[]
=
[]
loadingAssess
=
false
evaluationRoundId
=
""
apsassessy
=
""
constructor
(
private
toastr
:
ToastrService
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
cdr
:
ChangeDetectorRef
)
{
}
ngOnInit
():
void
{
if
(
this
.
evaluationRound
){
this
.
getEvaluationCycleList
()
}
}
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
{
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินสมรรถนะ'
,
'การจัดการสมรรถนะ'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
}
}
})
}
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
);
}
})
}
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
({
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
});
}
assessmentListFilter
(){
return
this
.
assessmentList
.
filter
(
x
=>
x
.
apsassessy
.
fname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
lname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
efname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
elname
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
)
}
onBack
()
{
onBack
()
{
this
.
s
endGroupShow
.
emit
(
'1'
);
// เปลี่ยนกลับไปหน้า 1
this
.
s
howFrom
.
emit
(
false
);
}
}
// การจัดการการเปิดปิด modal
// การจัดการการเปิดปิด modal
modalOptions
:
{
modalOptions
:
{
...
@@ -40,15 +122,35 @@ export class EditDefineDocumentFormComponent {
...
@@ -40,15 +122,35 @@ export class EditDefineDocumentFormComponent {
backdropClose
:
true
,
backdropClose
:
true
,
}
}
};
};
openModalTest
(
id
:
string
)
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'true'
)
document
.
getElementById
(
id
)?.
setAttribute
(
'tabindex'
,
'0'
)
},
10
);
console
.
log
(
"🚀 ~ EditDefineDocumentFormComponent ~ openModalTest ~ document.getElementById(id):"
,
document
.
getElementById
(
id
))
}
openEdit
()
{
openEdit
(
evaluationRoundId
:
string
,
apsassessy
:
string
)
{
if
(
evaluationRoundId
&&
apsassessy
){
const
modalElement
=
this
.
modalEdit
.
nativeElement
;
const
modalElement
=
this
.
modalEdit
.
nativeElement
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
modalElement
.
setAttribute
(
'aria-overlay'
,
'false'
);
modalElement
.
setAttribute
(
'aria-overlay'
,
'false'
);
console
.
log
(
"🚀 ~ EditDefineDocumentFormComponent ~ openEdit ~ modalElement:"
,
modalElement
)
},
10
);
},
10
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
}
}
}
dataListCheck
(){
console
.
log
(
this
.
assessmentList
);
}
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
...
@@ -79,10 +181,12 @@ export class EditDefineDocumentFormComponent {
...
@@ -79,10 +181,12 @@ export class EditDefineDocumentFormComponent {
addUser
()
{
addUser
()
{
}
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
currentModal
=
""
;
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
constructor
(
private
toastr
:
ToastrService
)
{
}
positionClass
:
'toast-top-right'
,
});
}
showSuccess
()
{
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle-manager.component.html
View file @
dee8abcf
...
@@ -28,10 +28,7 @@
...
@@ -28,10 +28,7 @@
</div>
</div>
<div
id=
"underline-2"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
<div
id=
"underline-2"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
*
ngIf=
"activeTab === 'underline-2'"
>
*
ngIf=
"activeTab === 'underline-2'"
>
<app-define-document-form
*
ngIf=
"groupShow=='1'"
<app-define-document-form
*
ngIf=
"groupShow=='1'"
(
sendGroupShow
)="
groupShow=
$event"
></app-define-document-form>
(
sendGroupShow
)="
groupShow=
$event"
></app-define-document-form>
<app-edit-define-document-form
*
ngIf=
"groupShow=='2'"
(
sendGroupShow
)="
groupShow=
$event"
></app-edit-define-document-form>
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle-manager.component.ts
View file @
dee8abcf
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
@
Component
({
@
Component
({
selector
:
'app-evaluation-cycle-manager'
,
selector
:
'app-evaluation-cycle-manager'
,
templateUrl
:
'./evaluation-cycle-manager.component.html'
,
templateUrl
:
'./evaluation-cycle-manager.component.html'
,
styleUrls
:
[
'./evaluation-cycle-manager.component.scss'
]
styleUrls
:
[
'./evaluation-cycle-manager.component.scss'
]
})
})
export
class
EvaluationCycleManagerComponent
{
export
class
EvaluationCycleManagerComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการรอบการประเมิน'
,
'รอบการประเมิน'
]
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'การจัดการรอบการประเมิน'
,
'รอบการประเมิน'
]
activeTab
:
string
=
'underline-
1
'
;
// Tab แรกแสดงเป็นค่าเริ่มต้น
activeTab
:
string
=
'underline-
2
'
;
// Tab แรกแสดงเป็นค่าเริ่มต้น
groupShow
=
'1'
groupShow
=
'1'
}
}
\ No newline at end of file
src/app/components/dashboard/dashboard.module.ts
View file @
dee8abcf
...
@@ -150,6 +150,7 @@ import { PmsGradeRegistrationComponent } from '../performance-management-evaluat
...
@@ -150,6 +150,7 @@ import { PmsGradeRegistrationComponent } from '../performance-management-evaluat
import
{
PmsGradeManagementComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-grade-management.component'
;
import
{
PmsGradeManagementComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-grade-management.component'
;
import
{
PmsSubGradeRegistrationComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-sub-grade-registration/pms-sub-grade-registration.component'
;
import
{
PmsSubGradeRegistrationComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-sub-grade-registration/pms-sub-grade-registration.component'
;
import
{
PmsGroupGradeComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-group-grade/pms-group-grade.component'
;
import
{
PmsGroupGradeComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-group-grade/pms-group-grade.component'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
export
const
MY_DATE_FORMATS
=
{
export
const
MY_DATE_FORMATS
=
{
parse
:
{
parse
:
{
...
@@ -330,6 +331,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
...
@@ -330,6 +331,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsMasfromEvaluationCycleService
,
PmsMasfromEvaluationCycleService
,
PmsGroupGradeService
,
PmsGroupGradeService
,
PmsSettingAssessmentService
,
PmsSettingAssessmentService
,
EvaluationAssessmentService
,
{
{
provide
:
HTTP_INTERCEPTORS
,
provide
:
HTTP_INTERCEPTORS
,
useClass
:
HttpRequestInterceptor
,
useClass
:
HttpRequestInterceptor
,
...
...
src/app/shared/services/evaluation-assessment.service.ts
0 → 100644
View file @
dee8abcf
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
EvaluationCycleModel
}
from
'../model/evaluation-cycle.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
EvaluationAssessmentService
{
api
=
"/evaluation-assessment"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
EvaluationCycleModel
[]
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getById
(
evaluationRoundId
:
string
):
Observable
<
any
[]
>
{
return
this
.
http
.
get
<
any
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
}
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
EvaluationCycleModel
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
post
(
body
:
EvaluationCycleModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
postList
(
body
:
any
[]):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/create-list"
,
body
)
}
delete
(
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
src/app/shared/services/evaluation-cycle.service.ts
View file @
dee8abcf
...
@@ -19,6 +19,9 @@ export class EvaluationCycleService {
...
@@ -19,6 +19,9 @@ export class EvaluationCycleService {
getById
(
evaluationRoundId
:
string
):
Observable
<
EvaluationCycleModel
>
{
getById
(
evaluationRoundId
:
string
):
Observable
<
EvaluationCycleModel
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
return
this
.
http
.
get
<
EvaluationCycleModel
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
}
}
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
EvaluationCycleModel
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
post
(
body
:
EvaluationCycleModel
):
Observable
<
AlertModel
>
{
post
(
body
:
EvaluationCycleModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
}
...
...
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