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
73cd9771
Commit
73cd9771
authored
Feb 28, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE รอบการประเมิน
parent
0e9ba3b9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
127 additions
and
72 deletions
+127
-72
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+1
-1
edit-evaluation-form.component.html
.../edit-evaluation-form/edit-evaluation-form.component.html
+40
-31
edit-evaluation-form.component.ts
...rm/edit-evaluation-form/edit-evaluation-form.component.ts
+72
-40
employee.model.ts
src/app/shared/model/employee.model.ts
+4
-0
evaluation-assessment.service.ts
src/app/shared/services/evaluation-assessment.service.ts
+3
-0
styles.scss
src/styles.scss
+7
-0
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
73cd9771
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
id=
"checkbox-{{item.data.evaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
id=
"checkbox-{{item.data.evaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
</td>
</td>
<td
>
<td
>
<
i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i
>
<
!-- <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>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.html
View file @
73cd9771
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
<div
id=
"form-pm-emp"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"form-pm-emp"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto mt-7"
>
<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"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content !width-80
!box-modal
"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แก้ไขรายการสมรรถนะ
แก้ไขรายการสมรรถนะ
...
@@ -239,7 +239,24 @@
...
@@ -239,7 +239,24 @@
</ng-container>
</ng-container>
</tr>
</tr>
</thead>
</thead>
<tbody>
<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=
"empassessmentListFilter().length > 0"
>
<tr
*
ngFor=
"let item of empassessmentListFilter() | slice:((currentPageRound-1) * 10) : (((currentPageRound-1) * 10) + 10);let i = index"
>
<tr
*
ngFor=
"let item of empassessmentListFilter() | slice:((currentPageRound-1) * 10) : (((currentPageRound-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
...
@@ -294,7 +311,7 @@
...
@@ -294,7 +311,7 @@
</ul>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPageRound-1) * 10)+1}} to {{empassessmentListFilter().length
<10
<span>
Show {{((currentPageRound-1) * 10)+1}} to {{empassessmentListFilter().length
<10
?
empassessmentListFilter
().
length:
(
currentPageRound=
=page.length
?
((
currentPageRound
*
10
)
-
((
currentPageRound
*
?
empassessmentListFilter
().
length:
(
currentPageRound=
=page
Round
.length
?
((
currentPageRound
*
10
)
-
((
currentPageRound
*
10
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPageRound
*
10
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
10
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPageRound
*
10
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
items
</
span
>
items
</
span
>
</ul>
</ul>
...
@@ -317,7 +334,7 @@
...
@@ -317,7 +334,7 @@
<div
id=
"form-assessment"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"form-assessment"
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=
"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"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content !width-80
!box-modal
"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<h3
class=
"text-xxl font-bold text-primary"
>
รายการสมรรถนะ
รายการสมรรถนะ
...
@@ -339,7 +356,7 @@
...
@@ -339,7 +356,7 @@
<div
class=
"relative shadow-md"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
>
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
[(
ngModel
)]="
searchIndicator
"
(
ngModelChange
)="
searchIndicatorsChange
()"
>
<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>
...
@@ -384,16 +401,10 @@
...
@@ -384,16 +401,10 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let item of[
<tr
*
ngFor=
"let item of filterIndicators() | slice:((currentPageIndicator-1) * 10) : (((currentPageIndicator-1) * 10) + 10);let i = index"
>
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','1'],
<td>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}
</td>
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','2'],
<td
>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}
</td>
['CC-01', 'จิตสำนึกด้านความปลอดภัยและคุณภาพ (Safety & Quality)','3'],
<td
class=
"!text-center"
>
{{item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}
</td>
['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"
>
<td
class=
"flex justify-center"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
<button
type=
"button"
...
@@ -409,41 +420,41 @@
...
@@ -409,41 +420,41 @@
</div>
</div>
</div>
</div>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page
Round
.length"
>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page
Indicator
.length"
>
<ul
class=
"ti-pagination"
>
<ul
class=
"ti-pagination"
>
<li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage
Round =
(currentPageRound
-1
||
1
)"
>
(
click
)="
currentPage
Indicator =
(currentPageIndicator
-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</li>
</li>
<li
*
ngFor=
"let item of page
Round
;let f = first;let l = last"
>
<li
*
ngFor=
"let item of page
Indicator
;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage
Round!=1&¤tPageRound!=2&¤tPageRound
!=3"
>
<ng-container
*
ngIf=
"item==3&¤tPage
Indicator!=1&¤tPageIndicator!=2&¤tPageIndicator
!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</a>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage
Round-1||item==currentPageRound||item==currentPageRound
+1)"
>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage
Indicator-1||item==currentPageIndicator||item==currentPageIndicator
+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage
Round
"
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage
Indicator
"
(
click
)="
currentPage
Round
=
item"
>
{{item}}
(
click
)="
currentPage
Indicator
=
item"
>
{{item}}
</a>
</a>
</ng-container>
</ng-container>
<ng-container
<ng-container
*
ngIf=
"item==page
Round.length-2&¤tPageRound!=pageRound.length&¤tPageRound!=pageRound.length-1&¤tPageRound!=pageRound
.length-2"
>
*
ngIf=
"item==page
Indicator.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
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</a>
</ng-container>
</ng-container>
</li>
</li>
<li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage
Round =
(currentPageRound
>
pageRound.length-1 ? currentPageRound: currentPageRound
+1 )">
(
click
)="
currentPage
Indicator =
(currentPageIndicator
>
pageIndicator.length-1 ? currentPageIndicator: currentPageIndicator
+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>
<ul
class=
"nav-tabs mt-3"
>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage
Round
-1) * 10)+1}} to {{empassessmentListFilter().length
<10
<span>
Show {{((currentPage
Indicator
-1) * 10)+1}} to {{empassessmentListFilter().length
<10
?
empassessmentListFilter
().
length:
(
currentPage
Round=
=page.length
?
((
currentPageRound
*
10
)
-
((
currentPageRound
*
?
empassessmentListFilter
().
length:
(
currentPage
Indicator=
=pageIndicator.length
?
((
currentPageIndicator
*
10
)
-
((
currentPageIndicator
*
10
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPage
Round
*
10
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
10
)
-
empassessmentListFilter
().
length
)
)
:
(
currentPage
Indicator
*
10
)
)
}}
of
{{
empassessmentListFilter
().
length
}}
items
</
span
>
items
</
span
>
</ul>
</ul>
</nav>
</nav>
...
@@ -454,9 +465,7 @@
...
@@ -454,9 +465,7 @@
(
click
)="
closeModalClass
('
form-assessment
')"
>
(
click
)="
closeModalClass
('
form-assessment
')"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -467,7 +476,7 @@
...
@@ -467,7 +476,7 @@
<div
id=
"modal-alert"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"modal-alert"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full
!box-modal
"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
แจ้งเตือน
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.ts
View file @
73cd9771
...
@@ -25,25 +25,32 @@ export class EditEvaluationFormComponent {
...
@@ -25,25 +25,32 @@ export class EditEvaluationFormComponent {
assessmentList
:
AppraisalModel
[]
=
[]
assessmentList
:
AppraisalModel
[]
=
[]
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
isChecked
:
boolean
=
false
;
isChecked
:
boolean
=
false
;
apsassessy
=
""
apsassessy
=
""
empassessmentList
:
AppraisalModel
[]
=
[]
empassessmentList
:
AppraisalModel
[]
=
[]
searchEmp
=
""
searchEmp
=
""
empassessmentRoundList
:
AppraisalRoundModel
[]
=
[]
empassessmentRoundList
:
AppraisalRoundModel
[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
currentPageRound
=
1
currentPageRound
=
1
pageRound
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageRound
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
searchRound
=
""
searchRound
=
""
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
numDataListChecked
=
0
numDataListChecked
=
0
msg
=
""
msg
=
""
typeForm
=
""
typeForm
=
""
selectData
:
AppraisalRoundModel
=
new
MyAppraisalRoundModel
()
selectData
:
AppraisalRoundModel
=
new
MyAppraisalRoundModel
()
loading
=
false
indicatorsList
:
AppraisalRoundModel
[]
=
[]
searchIndicator
=
""
currentPageIndicator
=
1
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
constructor
(
private
toastr
:
ToastrService
,
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
...
@@ -106,36 +113,35 @@ export class EditEvaluationFormComponent {
...
@@ -106,36 +113,35 @@ export class EditEvaluationFormComponent {
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
openModalClass
(
id
:
string
,
type
?:
string
)
{
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
typeForm
=
type
??
""
this
.
typeForm
=
type
??
""
if
(
id
==
'modal-alert'
)
{
if
(
id
==
'modal-alert'
)
{
if
(
type
==
'deleteForm'
)
{
if
(
type
==
'deleteForm'
)
{
this
.
msg
=
'ยืนยันการลบรายการ'
this
.
msg
=
'ยืนยันการลบรายการ'
}
else
if
(
type
==
'addForm'
)
{
}
else
if
(
type
==
'addForm'
)
{
this
.
msg
=
'ยืนยันการบันทึกรายการ'
this
.
msg
=
'ยืนยันการบันทึกรายการ'
}
}
}
}
if
(
id
)
{
if
(
id
)
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
)
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
)
},
10
);
},
10
);
}
}
this
.
isChecked
=
false
;
this
.
isChecked
=
false
;
this
.
numDataListChecked
=
0
;
this
.
numDataListChecked
=
0
;
}
}
closeModalClass
(
id
:
string
)
{
closeModalClass
(
id
:
string
)
{
const
modal
=
document
.
getElementById
(
id
);
const
modal
=
document
.
getElementById
(
id
);
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ closeModalClass ~ modal:"
,
modal
)
if
(
id
)
{
if
(
id
)
{
modal
?.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
modal
?.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
}
}
}
}
saveAssessmentList
()
{
saveAssessmentList
()
{
...
@@ -155,41 +161,67 @@ export class EditEvaluationFormComponent {
...
@@ -155,41 +161,67 @@ export class EditEvaluationFormComponent {
}
}
}
}
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
this
.
selectEmp
=
item
this
.
selectEmp
=
item
this
.
openModalClass
(
model
);
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ openAddRoundModel ~ this.selectEmp:"
,
this
.
selectEmp
)
this
.
evaluationRoundId
=
evaluationRoundId
this
.
openModalClass
(
model
);
this
.
apsassessy
=
apsassessy
this
.
evaluationRoundId
=
evaluationRoundId
this
.
getApsassessy
()
this
.
apsassessy
=
apsassessy
this
.
getApsassessyMini
();
this
.
getApsassessy
()
}
this
.
getApsassessyMini
();
this
.
getIndicators
();
getApsassessy
(){
}
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
getIndicators
()
{
this
.
evaluationAssessmentService
.
getIndicators
(
this
.
selectEmp
.
apsassessy
.
pl
.
plId
).
subscribe
({
next
:
response
=>
{
this
.
indicatorsList
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
filterIndicators
()
{
return
this
.
indicatorsList
.
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
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
getApsassessy
()
{
this
.
loading
=
true
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
empassessmentList
=
response
this
.
empassessmentList
=
response
this
.
cdr
.
detectChanges
();
this
.
cdr
.
detectChanges
();
this
.
loading
=
false
},
},
error
:
err
=>
{
error
:
err
=>
{
this
.
loading
=
false
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
}
})
})
}
}
getApsassessyMini
(){
getApsassessyMini
()
{
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
cdr
.
detectChanges
();
this
.
cdr
.
detectChanges
();
},
},
error
:
err
=>
{
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
}
})
})
}
}
empassessmentListFilter
()
{
empassessmentListFilter
()
{
return
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
return
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
tdesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
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
?.
edesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
))
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
))
}
}
...
@@ -204,32 +236,32 @@ export class EditEvaluationFormComponent {
...
@@ -204,32 +236,32 @@ export class EditEvaluationFormComponent {
this
.
checkempassessmentRoundListCheckbox
();
this
.
checkempassessmentRoundListCheckbox
();
}
}
checkempassessmentRoundListCheckbox
(){
checkempassessmentRoundListCheckbox
()
{
this
.
numDataListChecked
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
length
this
.
numDataListChecked
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
length
this
.
isChecked
=
this
.
numDataListChecked
?
true
:
false
this
.
isChecked
=
this
.
numDataListChecked
?
true
:
false
}
}
deleteFormOne
(
item
:
AppraisalRoundModel
)
{
deleteFormOne
(
item
:
AppraisalRoundModel
)
{
this
.
selectData
=
item
this
.
selectData
=
item
}
}
deleteAssessment
()
{
deleteAssessment
()
{
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
)
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
)
if
(
this
.
typeForm
==
'deleteFormOne'
)
{
if
(
this
.
typeForm
==
'deleteFormOne'
)
{
body
=
[
this
.
selectData
]
body
=
[
this
.
selectData
]
}
}
if
(
body
.
length
==
0
)
{
if
(
body
.
length
==
0
)
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
)
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
)
return
return
}
}
this
.
evaluationAssessmentService
.
deletemMini
(
body
,
this
.
selectEmp
.
apsassessy
.
employeeId
,
this
.
selectEmp
.
masfromEvaluationRound
.
evaluationRoundId
).
subscribe
({
this
.
evaluationAssessmentService
.
deletemMini
(
body
,
this
.
selectEmp
.
apsassessy
.
employeeId
,
this
.
selectEmp
.
masfromEvaluationRound
.
evaluationRoundId
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getApsassessyMini
();
this
.
getApsassessyMini
();
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
}
}
}
}
})
})
}
}
...
...
src/app/shared/model/employee.model.ts
View file @
73cd9771
...
@@ -110,6 +110,7 @@ export interface EmployeeModel {
...
@@ -110,6 +110,7 @@ export interface EmployeeModel {
ssoFlag
:
string
ssoFlag
:
string
thFullName
:
string
thFullName
:
string
engFullName
:
string
engFullName
:
string
pl
:
PLModel
}
}
export
class
MyEmployeeModel
implements
EmployeeModel
{
export
class
MyEmployeeModel
implements
EmployeeModel
{
...
@@ -198,6 +199,7 @@ export class MyEmployeeModel implements EmployeeModel {
...
@@ -198,6 +199,7 @@ export class MyEmployeeModel implements EmployeeModel {
ssoFlag
:
string
ssoFlag
:
string
thFullName
:
string
thFullName
:
string
engFullName
:
string
engFullName
:
string
pl
:
PLModel
constructor
(
data
?:
Partial
<
EmployeeModel
>
)
{
constructor
(
data
?:
Partial
<
EmployeeModel
>
)
{
this
.
employeeId
=
data
?.
employeeId
||
""
this
.
employeeId
=
data
?.
employeeId
||
""
this
.
prefix
=
new
MyPrefixModel
(
data
?.
prefix
||
{})
this
.
prefix
=
new
MyPrefixModel
(
data
?.
prefix
||
{})
...
@@ -284,6 +286,8 @@ export class MyEmployeeModel implements EmployeeModel {
...
@@ -284,6 +286,8 @@ export class MyEmployeeModel implements EmployeeModel {
this
.
ssoFlag
=
data
?.
ssoFlag
||
""
this
.
ssoFlag
=
data
?.
ssoFlag
||
""
this
.
thFullName
=
data
?.
thFullName
||
""
this
.
thFullName
=
data
?.
thFullName
||
""
this
.
engFullName
=
data
?.
engFullName
||
""
this
.
engFullName
=
data
?.
engFullName
||
""
this
.
pl
=
new
MyPLModel
(
data
?.
workarea
||
{})
}
}
}
}
src/app/shared/services/evaluation-assessment.service.ts
View file @
73cd9771
...
@@ -27,6 +27,9 @@ export class EvaluationAssessmentService {
...
@@ -27,6 +27,9 @@ export class EvaluationAssessmentService {
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
}
getIndicators
(
plId
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/indicators/list/"
+
plId
)
}
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
)
}
}
...
...
src/styles.scss
View file @
73cd9771
...
@@ -375,4 +375,10 @@ ngx-dropzone {
...
@@ -375,4 +375,10 @@ ngx-dropzone {
}
}
.
\
!
width-70
{
.
\
!
width-70
{
width
:
70%
!
important
;
width
:
70%
!
important
;
}
.
\
!
box-modal
{
box-shadow
:
0px
0px
0px
9999px
rgba
(
0
,
0
,
0
,
0
.25
)
!
important
;
-webkit-box-shadow
:
0px
0px
0px
9999px
rgba
(
0
,
0
,
0
,
0
.25
)
!
important
;
-moz-box-shadow
:
0px
0px
0px
9999px
rgba
(
0
,
0
,
0
,
0
.25
)
!
important
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment