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
30f5cafe
Commit
30f5cafe
authored
Feb 28, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ประเมิน competency
parent
e9df7494
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
214 additions
and
99 deletions
+214
-99
department-list.component.html
...iness-unit/department-list/department-list.component.html
+2
-2
department-register.component.html
...it/department-register/department-register.component.html
+1
-1
section-registration.component.html
.../section-registration/section-registration.component.html
+2
-2
sub-department-four.component.html
...it/sub-department-four/sub-department-four.component.html
+3
-3
sub-department-one.component.html
...unit/sub-department-one/sub-department-one.component.html
+3
-3
sub-department-three.component.html
.../sub-department-three/sub-department-three.component.html
+3
-3
sub-department-two.component.html
...unit/sub-department-two/sub-department-two.component.html
+3
-3
company-registration-page.component.html
...egistration-page/company-registration-page.component.html
+1
-1
evaluation.component.html
...rformance-evaluation/evaluation/evaluation.component.html
+2
-0
evaluation.component.ts
...performance-evaluation/evaluation/evaluation.component.ts
+3
-7
self-evaluation.component.html
...evaluation/self-evaluation/self-evaluation.component.html
+5
-3
supervisor-evaluation.component.html
...upervisor-evaluation/supervisor-evaluation.component.html
+13
-11
supervisor-evaluation.component.ts
.../supervisor-evaluation/supervisor-evaluation.component.ts
+37
-25
appraisal-subordinate.model.ts
src/app/shared/model/appraisal-subordinate.model.ts
+135
-34
auth.service.ts
src/app/shared/services/auth.service.ts
+1
-1
No files found.
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.html
View file @
30f5cafe
...
...
@@ -369,7 +369,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu1Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu1Modal
.
search
"
(
ngModelChange
)="
onBu1ModalSearchChange
()"
>
<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"
>
...
...
@@ -490,7 +490,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu2Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu2Modal
.
search
"
(
ngModelChange
)="
onBu2ModalSearchChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.html
View file @
30f5cafe
...
...
@@ -18,7 +18,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.html
View file @
30f5cafe
...
...
@@ -17,7 +17,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
[(
ngModel
)]="
bu3Table
.
search
"
(
ngModelChange
)="
onBu3TableSearchChange
()"
>
<div
...
...
@@ -493,7 +493,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu3Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu3Modal
.
search
"
(
ngModelChange
)="
onBu3ModalSearchChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.html
View file @
30f5cafe
...
...
@@ -18,7 +18,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
[(
ngModel
)]="
bu7Table
.
search
"
(
ngModelChange
)="
onBu7TableSearchChange
()"
>
<div
...
...
@@ -372,7 +372,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu6Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu6Modal
.
search
"
(
ngModelChange
)="
onBu6ModalSearchChange
()"
>
<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"
>
...
...
@@ -493,7 +493,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu7Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu7Modal
.
search
"
(
ngModelChange
)="
onBu7ModalSearchChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.html
View file @
30f5cafe
...
...
@@ -18,7 +18,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
[(
ngModel
)]="
bu4Table
.
search
"
(
ngModelChange
)="
onBu4TableSearchChange
()"
>
<div
...
...
@@ -374,7 +374,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu3Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu3Modal
.
search
"
(
ngModelChange
)="
onBu3ModalSearchChange
()"
>
<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"
>
...
...
@@ -495,7 +495,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu4Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu4Modal
.
search
"
(
ngModelChange
)="
onBu4ModalSearchChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.html
View file @
30f5cafe
...
...
@@ -18,7 +18,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
[(
ngModel
)]="
bu6Table
.
search
"
(
ngModelChange
)="
onBu6TableSearchChange
()"
>
<div
...
...
@@ -374,7 +374,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu5Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu5Modal
.
search
"
(
ngModelChange
)="
onBu5ModalSearchChange
()"
>
<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"
>
...
...
@@ -495,7 +495,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu6Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu6Modal
.
search
"
(
ngModelChange
)="
onBu6ModalSearchChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.html
View file @
30f5cafe
...
...
@@ -18,7 +18,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search"
[(
ngModel
)]="
bu5Table
.
search
"
(
ngModelChange
)="
onBu5TableSearchChange
()"
>
<div
...
...
@@ -374,7 +374,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu4Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu4Modal
.
search
"
(
ngModelChange
)="
onBu4ModalSearchChange
()"
>
<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"
>
...
...
@@ -495,7 +495,7 @@
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
bu5Modal
.
search
"
placeholder=
"Search"
[(
ngModel
)]="
bu5Modal
.
search
"
(
ngModelChange
)="
onBu5ModalSearchChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/company-registration-page/company-registration-page.component.html
View file @
30f5cafe
...
...
@@ -36,7 +36,7 @@
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search
by No. or Name
"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
placeholder=
"Search"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
...
...
src/app/components/performance-evaluation/evaluation/evaluation.component.html
View file @
30f5cafe
<div
class=
"bg-card-white"
>
</div>
<ng-container
*
ngIf=
"appraisalCompentency.data"
>
<div
class=
"pb-2rem px-2rem pt-1.5rem w-full min-height-50px justify-between items-center"
>
<div
class=
"flex"
>
...
...
src/app/components/performance-evaluation/evaluation/evaluation.component.ts
View file @
30f5cafe
import
{
ChangeDetectorRef
,
Component
,
Input
,
OnIni
t
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
OnInit
,
Outpu
t
}
from
'@angular/core'
;
import
{
AppraisalCompentencyModel2
}
from
'src/app/shared/model/appraisal-competency.model'
;
import
{
SettingAssessmentModel
,
MySettingAssessmentModel
}
from
'src/app/shared/model/setting-assessment.model'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
...
...
@@ -15,6 +15,7 @@ export class EvaluationComponent implements OnInit {
@
Input
()
evaluateeId
=
""
@
Input
()
evaluaterId
=
""
@
Input
()
competencyTypeId
=
""
@
Output
()
sendReturnPath
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
canEdit
=
false
hoveredCode
:
string
|
null
=
null
;
currentDate
=
new
Date
()
...
...
@@ -211,12 +212,7 @@ export class EvaluationComponent implements OnInit {
return
isNaN
(
num
)
?
0
:
+
num
.
toFixed
(
2
);
}
returnPath
()
{
// if (this.byBoss) {
// this.returnPageEvalution()
// } else {
// this.currentTemplate = this.selfEvaluation;
// this.pathTitle = ['การประเมินผล', 'ประเมินตนเอง']
// }
this
.
sendReturnPath
.
emit
()
}
...
...
src/app/components/performance-evaluation/self-evaluation/self-evaluation.component.html
View file @
30f5cafe
...
...
@@ -14,8 +14,8 @@
<nav
class=
" flex space-x-2 rtl:space-x-reverse"
>
<a
*
ngFor=
"let item of appraisalCompentency.dataList; let i=index ; let f= first"
class=
"border justify-center rounded-top-4px hs-tab-active:!bg-primary hs-tab-active:text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center hover:text-gray-900"
[
class
.
active
]="
f
"
href=
"javascript:void(0);"
id=
"card-type-item-1
"
[
attr
.
data-hs-tab
]="'#
underline-
'+(
i
+
1
)"
aria-controls=
"underline-1
"
[
class
.
active
]="
f
"
href=
"javascript:void(0);"
[
id
]="'
card-type-item-
'+(
i
+
1
)
"
[
attr
.
data-hs-tab
]="'#
underline-
'+(
i
+
1
)"
[
attr
.
aria-controls
]="'
underline-
'+(
i
+
1
)
"
(
click
)="
selectAppraisalCompentency
(
item
)"
>
รอบการประเมินที่ {{i+1}}/{{appraisalCompentency.dataList.length}}
</a>
...
...
@@ -201,7 +201,8 @@
<ng-template
#
selfEvaluationEdit
>
<app-evaluation
[
evaluationRoundId
]="
appraisalCompentency
.
select
?.
masfromEvaluationRound
?.
evaluationRoundId
||
''"
<app-evaluation
(
sendReturnPath
)="
currentTemplate =
this.selfEvaluation"
[
evaluationRoundId
]="
appraisalCompentency
.
select
?.
masfromEvaluationRound
?.
evaluationRoundId
||
''"
[
evaluaterId
]="
evaluatee
.
data
.
employeeId
"
[
evaluateeId
]="
evaluatee
.
data
.
employeeId
"
[
competencyTypeId
]="
competencyTypeId
"
></app-evaluation>
</ng-template>
\ No newline at end of file
src/app/components/performance-evaluation/supervisor-evaluation/supervisor-evaluation.component.html
View file @
30f5cafe
...
...
@@ -7,19 +7,19 @@
ประเมินผลประจำปี {{currentDate.getFullYear()}}
</div>
<div
class=
"pt-0.75rem"
>
<div
class=
" px-2rem"
[
ngClass
]="{'
border-gray-200
border-b
'
:
subordinate
.
dataList
Round
.
length
}"
>
<div
class=
" px-2rem"
[
ngClass
]="{'
border-gray-200
border-b
'
:
subordinate
.
dataList
.
length
}"
>
<nav
class=
" flex space-x-2 rtl:space-x-reverse"
>
<a
*
ngFor=
"let item of subordinate.dataList
Round
; let i=index ; let f= first"
<a
*
ngFor=
"let item of subordinate.dataList; let i=index ; let f= first"
class=
"border justify-center rounded-top-4px hs-tab-active:!bg-primary hs-tab-active:text-white -mb-px py-2 px-3 inline-flex items-center gap-2 font-size-16px font-weight-500 text-center hover:text-gray-900"
[
class
.
active
]="
f
"
href=
"javascript:void(0);"
id=
"card-type-item-1
"
[
attr
.
data-hs-tab
]="'#
underline-
'+(
i
+
1
)"
aria-controls=
"underline-1
"
(
click
)="
selectDataList
Round
(
item
)"
>
รอบการประเมินที่ {{i+1}}/{{subordinate.dataList
Round
.length}}
[
class
.
active
]="
f
"
href=
"javascript:void(0);"
[
id
]="'
card-type-item-
'+(
i
+
1
)
"
[
attr
.
data-hs-tab
]="'#
underline-
'+(
i
+
1
)"
[
attr
.
aria-controls
]="'
underline-
'+(
i
+
1
)
"
(
click
)="
selectDataList
(
item
)"
>
รอบการประเมินที่ {{i+1}}/{{subordinate.dataList.length}}
</a>
</nav>
</div>
</div>
<div
class=
"pt-50px pb-2rem"
*
ngIf=
"subordinate.dataList
Round
.length"
>
<div
class=
"pt-50px pb-2rem"
*
ngIf=
"subordinate.dataList.length"
>
<div
class=
"header-title-type p-0 px-2rem"
>
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
...
...
@@ -105,7 +105,7 @@
<button
type=
"button"
class=
"ti-btn rounded-sm ti-btn-soft-success"
*
ngFor=
"let type of item.typeList"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(
click
)="
selectSubordinate
(
item
,
type
.
shortName
,
type
.
shortName
);
pageEvalution=
'evaluation'
"
>
(
click
)="
selectSubordinate
(
item
,
type
.
competencyTypeId
,
subordinate
.
select
?.
evaluationRoundId
);
pageEvalution=
'evaluation'
"
>
{{type.shortName}}
</button>
</div>
...
...
@@ -125,7 +125,7 @@
<td
class=
"text-center"
style=
"font-size: 12px;"
>
{{item.sumScore}}
</td>
<td
class=
"text-center"
style=
"font-size: 12px;"
>
{{item.gread}}
</td>
<td
class=
"text-center"
style=
"font-size: 12px;"
>
{{item.masfromStatusType.tdesc}}
<!-- {{item.masfromStatusType.tdesc}} -->
</td>
<td
class=
"text-center"
style=
"font-size: 12px;"
>
{{item.apsapproveType.tdesc}}
</td>
...
...
@@ -187,6 +187,7 @@
<app-pms-evalution
(
sendPageEvalution
)="
pageEvalution=
$event"
></app-pms-evalution>
</ng-container>
<ng-container
*
ngIf=
"pageEvalution=='evaluation'"
>
<app-evaluation
[
evaluationRoundId
]="
evaluationRoundId
"
[
evaluaterId
]="
evaluaterId
"
[
evaluateeId
]="
evaluateeId
"
[
competencyTypeId
]="
competencyTypeId
"
></app-evaluation>
<app-evaluation
(
sendReturnPath
)="
pageEvalution=
''
"
[
evaluationRoundId
]="
formEvaluation
.
evaluationRoundId
"
[
evaluaterId
]="
formEvaluation
.
evaluaterId
"
[
evaluateeId
]="
formEvaluation
.
evaluateeId
"
[
competencyTypeId
]="
formEvaluation
.
competencyTypeId
"
></app-evaluation>
</ng-container>
\ No newline at end of file
src/app/components/performance-evaluation/supervisor-evaluation/supervisor-evaluation.component.ts
View file @
30f5cafe
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
AppraisalSubordinateModel
,
M
yAppraisalSubordinateModel
}
from
'src/app/shared/model/appraisal-subordinate.model'
;
import
{
AppraisalSubordinateModel
,
M
asfromevaluationassessment
}
from
'src/app/shared/model/appraisal-subordinate.model'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
@
Component
({
...
...
@@ -11,27 +11,32 @@ export class SupervisorEvaluationComponent {
pathTitle
=
[
'การประเมินผล'
,
'ประเมินโดยหัวหน้า'
]
pageEvalution
=
''
currentDate
=
new
Date
()
subordinate
:
{
loading
:
false
,
select
:
AppraisalSubordinateModel
,
dataList
:
AppraisalSubordinateModel
[],
dataListRound
:
AppraisalSubordinateModel
[][]
}
=
{
loading
:
false
,
select
:
new
MyAppraisalSubordinateModel
(),
dataListRound
:
[]
,
dataList
:
[]
}
subordinate
:
{
loading
:
false
,
select
?:
AppraisalSubordinateModel
,
dataList
:
AppraisalSubordinateModel
[]
}
=
{
loading
:
false
,
select
:
undefined
,
dataList
:
[]
}
search
=
""
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
evaluateeId
=
""
evaluaterId
=
""
competencyTypeId
=
""
evaluationRoundId
=
""
formEvaluation
=
{
evaluateeId
:
""
,
evaluaterId
:
""
,
competencyTypeId
:
""
,
evaluationRoundId
:
""
}
constructor
(
private
appraisalService
:
AppraisalService
,
private
cdr
:
ChangeDetectorRef
)
{
}
ngOnInit
():
void
{
this
.
evaluaterId
=
this
.
decodeJWT
(
sessionStorage
.
getItem
(
"accessToken"
)
||
''
).
employeeid
this
.
formEvaluation
.
evaluaterId
=
this
.
decodeJWT
(
sessionStorage
.
getItem
(
"accessToken"
)
||
''
).
employeeid
this
.
getBossList
()
}
getBossList
()
{
this
.
appraisalService
.
getBossList
().
subscribe
({
next
:
response
=>
{
this
.
subordinate
.
dataListRound
=
[
response
.
map
(
x
=>
new
MyAppraisalSubordinateModel
(
x
))]
this
.
subordinate
.
dataList
=
this
.
subordinate
.
dataListRound
.
map
(
x
=>
x
.
map
(
y
=>
new
MyAppraisalSubordinateModel
(
y
)))?.[
0
]
||
[]
this
.
subordinate
.
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
response
))
this
.
cdr
.
detectChanges
()
if
(
this
.
subordinate
.
dataList
.
length
)
{
this
.
subordinate
.
select
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
subordinate
.
dataList
[
0
]))
}
console
.
log
(
" 🐒 subordinate.dataList.length:"
,
this
.
subordinate
.
dataList
.
length
)
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
...
...
@@ -39,27 +44,34 @@ export class SupervisorEvaluationComponent {
}
})
}
selectDataList
(
data
:
AppraisalSubordinateModel
)
{
this
.
subordinate
.
select
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
}
subordinateFilter
()
{
return
this
.
subordinate
.
dataList
.
filter
(
x
=>
{
return
x
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
thFullName
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
})
if
(
this
.
subordinate
.
select
)
{
return
this
.
subordinate
.
select
.
masfromevaluationassessment
.
filter
(
x
=>
{
return
x
.
apsassessy
.
employeeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
apsassessy
.
thFullName
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
})
}
return
[]
}
searchChange
()
{
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
subordinateFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
selectSubordinate
(
data
:
AppraisalSubordinateModel
,
competencyTypeId
:
string
,
evaluationRoundId
:
string
)
{
this
.
subordinate
.
select
=
new
MyAppraisalSubordinateModel
(
data
)
this
.
evaluateeId
=
this
.
subordinate
.
select
.
apsassessy
.
employeeId
this
.
competencyTypeId
=
competencyTypeId
this
.
evaluationRoundId
=
evaluationRoundId
this
.
cdr
.
detectChanges
()
}
selectDataListRound
(
data
:
AppraisalSubordinateModel
[])
{
this
.
subordinate
.
dataList
=
data
.
map
(
x
=>
new
MyAppraisalSubordinateModel
(
x
))
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
selectSubordinate
(
data
:
Masfromevaluationassessment
,
competencyTypeId
:
string
,
evaluationRoundId
?:
string
)
{
if
(
data
&&
competencyTypeId
&&
evaluationRoundId
)
{
this
.
formEvaluation
.
evaluateeId
=
data
.
apsassessy
.
employeeId
this
.
formEvaluation
.
competencyTypeId
=
competencyTypeId
this
.
formEvaluation
.
evaluationRoundId
=
evaluationRoundId
this
.
cdr
.
detectChanges
()
}
}
decodeJWT
(
token
:
string
)
{
...
...
src/app/shared/model/appraisal-subordinate.model.ts
View file @
30f5cafe
import
{
EmployeeModel
,
MyEmployeeModel
}
from
"./employee.model"
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
"./status-code.model"
export
interface
AppraisalSubordinateModel
{
evaluationRoundId
:
string
companyId
:
string
active
:
boolean
masfromStatusType
:
StatusCodeModel
apsapproveType
:
StatusCodeModel
apsassessy
:
EmployeeModel
gread
:
string
sumScore
:
number
typeList
:
{
competencyTypeId
:
string
,
shortName
:
string
}[]
tdesc
:
string
edesc
:
string
masfromevaluationassessment
:
Masfromevaluationassessment
[]
}
export
class
MyAppraisalSubordinateModel
implements
AppraisalSubordinateModel
{
export
interface
Masfromevaluationassessment
{
companyId
:
string
active
:
boolean
masfromStatusType
:
StatusCodeModel
apsapproveType
:
StatusCodeModel
apsassessy
:
EmployeeModel
masfromStatusType
:
MasfromStatusType
apsapproveType
:
ApsapproveType
apsassessy
:
Apsassessy
gread
:
string
sumScore
:
number
typeList
:
{
competencyTypeId
:
string
,
shortName
:
string
}[]
constructor
(
data
?:
Partial
<
AppraisalSubordinateModel
>
)
{
this
.
companyId
=
data
?.
companyId
||
""
this
.
active
=
data
?.
active
??
false
this
.
masfromStatusType
=
new
MyStatusCodeModel
(
data
?.
masfromStatusType
)
this
.
apsapproveType
=
new
MyStatusCodeModel
(
data
?.
apsapproveType
)
this
.
apsassessy
=
new
MyEmployeeModel
(
data
?.
apsassessy
)
this
.
gread
=
data
?.
gread
||
""
this
.
sumScore
=
data
?.
sumScore
??
0
this
.
typeList
=
data
?.
typeList
?.
map
(
x
=>
({
competencyTypeId
:
x
.
competencyTypeId
||
""
,
shortName
:
x
.
shortName
||
""
}))
||
[]
}
typeList
:
TypeList
[]
}
export
interface
MasfromStatusType
{
code
:
string
tdesc
:
string
edesc
:
string
}
export
interface
ApsapproveType
{
code
:
string
tdesc
:
string
edesc
:
string
}
export
interface
Apsassessy
{
employeeId
:
string
bossId
:
string
prefix
:
Prefix
fname
:
string
lname
:
string
efname
:
string
elname
:
string
bu1
:
Bu1
bu2
:
Bu2
bu3
:
Bu3
bu4
:
Bu4
bu5
:
Bu5
position
:
Position
job
:
Job
pl
:
Pl
status
:
Status
time0
:
Time0
resignDate
:
string
endWorkDate
:
string
thFullName
:
string
engFullName
:
string
}
export
interface
Prefix
{
prefixId
:
string
tdesc
:
string
edesc
:
string
}
export
interface
Bu1
{
bu1id
:
string
tdesc
:
string
edesc
:
string
companyId
:
string
}
export
interface
Bu2
{
bu2id
:
string
tdesc
:
string
edesc
:
string
parent
:
string
companyId
:
string
}
export
interface
Bu3
{
bu3id
:
string
tdesc
:
string
edesc
:
string
parent
:
string
companyId
:
string
}
export
interface
Bu4
{
bu4id
:
string
tdesc
:
string
edesc
:
string
parent
:
string
companyId
:
string
}
export
interface
Bu5
{
bu5id
:
string
tdesc
:
string
edesc
:
string
parent
:
string
companyId
:
string
}
export
interface
Position
{
positionId
:
string
tdesc
:
string
edesc
:
string
consolidate
:
string
shortName
:
string
companyId
:
string
}
export
interface
Job
{
jobCodeId
:
string
tdesc
:
string
edesc
:
string
}
export
interface
Pl
{
plId
:
string
tdesc
:
string
edesc
:
string
companyId
:
string
}
export
interface
Status
{
statusCode
:
string
statusType
:
string
tdesc
:
string
edesc
:
string
}
export
interface
Time0
{
time0id
:
string
tdesc
:
string
edesc
:
string
stickTm
:
string
hourD
:
number
}
export
interface
TypeList
{
statusType
:
string
competencyTypeId
:
string
shortName
:
string
}
\ No newline at end of file
src/app/shared/services/auth.service.ts
View file @
30f5cafe
...
...
@@ -63,7 +63,7 @@ export class AuthService {
logout
(){
sessionStorage
.
clear
()
localStorage
.
clear
()
this
.
router
.
navigate
([
'/login'
]);
this
.
router
.
navigate
([
'/
auth/
login'
]);
}
}
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