Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mySkill-x
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
mySkill-x
Commits
6f9dad8f
Commit
6f9dad8f
authored
Mar 05, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DEV' of
https://mygit.myhr.co.th/angular/myAppraisal
into DEV
parents
deaf15f9
029fca9c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
201 additions
and
82 deletions
+201
-82
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+9
-9
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+18
-45
dashboard-routing.module.ts
src/app/components/dashboard/dashboard-routing.module.ts
+3
-1
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+3
-1
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+10
-9
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+16
-14
time-attendance.component.html
...evaluation/time-attendance/time-attendance.component.html
+0
-0
time-attendance.component.scss
...evaluation/time-attendance/time-attendance.component.scss
+0
-0
time-attendance.component.ts
...t-evaluation/time-attendance/time-attendance.component.ts
+124
-0
evaluation-cycle.model.ts
src/app/shared/model/evaluation-cycle.model.ts
+4
-0
pms-masfrom-evaluation.model.ts
src/app/shared/model/pms-masfrom-evaluation.model.ts
+4
-0
navservice.ts
src/app/shared/services/navservice.ts
+1
-0
style.css
src/assets/css/style.css
+9
-3
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
6f9dad8f
...
...
@@ -254,27 +254,27 @@
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
evaluationRoundId
"
>
[(
ngModel
)]="
evaluation_cycle
.
evaluationRoundId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
evaluation_cycle
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
edesc
"
>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
evaluation_cycle
.
edesc
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ปีการประเมิน
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
dataSelect
.
apsyear
"
>
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
evaluation_cycle
.
apsyear
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
เริ่มวันที่
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
apsPeriodStart
"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
evaluation_cycle
.
apsPeriodStart
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
สิ้นสุดวันที่
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
apsPeriodEnd
"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
evaluation_cycle
.
apsPeriodEnd
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ระดับพนักงาน (JL)
</label>
<div
*
ngFor=
"let item of
pl.selectList
;let i = index;let f=first"
[
class
.
mt-2
]="!
f
"
<div
*
ngFor=
"let item of
evaluation_cycle.personalLevel
;let i = index;let f=first"
[
class
.
mt-2
]="!
f
"
class=
"col-span-6 sm:col-span-6 "
>
<div
class=
"flex"
>
<div
class=
"relative flex rounded-md"
>
...
...
@@ -302,8 +302,8 @@
ย้อนกลับ
</button>
<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
"
[
disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
[
class
.
ti-btn-disabled
]="!
evaluation_cycle
.
evaluationRoundId
||!
evaluation_cycle
.
tdesc
||!
evaluation_cycle
.
apsyear
||!
evaluation_cycle
.
apsPeriodStart
||!
evaluation_cycle
.
apsPeriodEnd
"
[
disabled
]="!
evaluation_cycle
.
evaluationRoundId
||!
evaluation_cycle
.
tdesc
||!
evaluation_cycle
.
apsyear
||!
evaluation_cycle
.
apsPeriodStart
||!
evaluation_cycle
.
apsPeriodEnd
"
>
บันทึกข้อมูล
</button>
</div>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
6f9dad8f
...
...
@@ -11,17 +11,6 @@ export interface DataModal {
currentPage
:
number
,
page
:
number
[]
}
export
interface
DataModel
{
evaluationRoundId
:
string
;
tdesc
:
string
;
edesc
:
string
;
apsyear
:
string
;
apsPeriodStart
:
string
;
apsPeriodEnd
:
string
;
statusCode
:
StatusCodeModel
;
}
@
Component
({
selector
:
'app-evaluation-cycle'
,
templateUrl
:
'./evaluation-cycle.component.html'
,
...
...
@@ -36,10 +25,9 @@ export class EvaluationCycleComponent {
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
modalStatus
=
'add'
evaluation_cyclelist
:
{
check
:
boolean
,
data
:
Data
Model
}[]
=
[]
evaluation_cyclelist
:
{
check
:
boolean
,
data
:
EvaluationCycle
Model
}[]
=
[]
evaluation_cycle
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
({})
dataLoading
=
false
dataSelect
:
DataModel
=
{
evaluationRoundId
:
""
,
tdesc
:
""
,
edesc
:
""
,
apsyear
:
""
,
apsPeriodStart
:
""
,
apsPeriodEnd
:
""
,
statusCode
:
new
MyStatusCodeModel
({})
}
itemToDelete
:
EvaluationCycleModel
|
null
=
null
;
isDataListChecked
=
false
isDataListCheckedAll
=
false
...
...
@@ -52,7 +40,7 @@ export class EvaluationCycleComponent {
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
}
pl
:
{
loading
:
boolean
,
select
List
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()]
,
selectIndex
:
-
1
,
dataList
:
[]
}
pl
:
{
loading
:
boolean
,
select
Index
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectIndex
:
-
1
,
dataList
:
[]
}
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
...
...
@@ -96,18 +84,18 @@ export class EvaluationCycleComponent {
(
x
.
plId
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
&&
!
this
.
pl
.
selectList
.
some
(
y
=>
y
.
plId
==
x
.
plId
)
!
this
.
evaluation_cycle
.
personalLevel
.
some
(
y
=>
y
.
plId
==
x
.
plId
)
);
}
selectPl
(
data
?:
PLModel
)
{
if
(
!
data
)
{
this
.
pl
.
selectList
.
splice
(
this
.
pl
.
selectIndex
,
1
);
this
.
evaluation_cycle
.
personalLevel
.
splice
(
this
.
pl
.
selectIndex
,
1
);
return
;
}
this
.
pl
.
selectList
[
this
.
pl
.
selectIndex
]
=
new
MyPLModel
(
data
);
if
(
this
.
pl
.
selectIndex
===
this
.
pl
.
selectList
.
length
-
1
)
{
this
.
pl
.
selectList
.
push
(
new
MyPLModel
());
this
.
evaluation_cycle
.
personalLevel
[
this
.
pl
.
selectIndex
]
=
new
MyPLModel
(
data
);
if
(
this
.
pl
.
selectIndex
===
this
.
evaluation_cycle
.
personalLevel
.
length
-
1
)
{
this
.
evaluation_cycle
.
personalLevel
.
push
(
new
MyPLModel
());
}
}
...
...
@@ -117,17 +105,8 @@ export class EvaluationCycleComponent {
next
:
response
=>
{
this
.
evaluation_cyclelist
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
{
evaluationRoundId
:
x
.
evaluationRoundId
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
apsyear
:
x
.
apsyear
,
apsPeriodStart
:
x
.
apsPeriodStart
,
apsPeriodEnd
:
x
.
apsPeriodEnd
,
statusCode
:
new
MyStatusCodeModel
(
x
.
statusCode
||
{})
}
data
:
new
MyEvaluationCycleModel
(
x
)
}));
this
.
dataLoading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
...
...
@@ -164,19 +143,13 @@ export class EvaluationCycleComponent {
return
match
;
});
}
setData
(
data
?:
DataModel
)
{
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{
evaluationRoundId
:
""
,
tdesc
:
""
,
edesc
:
""
,
apsyear
:
""
,
apsPeriodStart
:
""
,
apsPeriodEnd
:
""
,
statusCode
:
new
MyStatusCodeModel
({})
}));
setData
(
data
?:
EvaluationCycleModel
)
{
this
.
evaluation_cycle
=
new
MyEvaluationCycleModel
(
data
)
this
.
evaluation_cycle
.
personalLevel
.
push
(
new
MyPLModel
())
}
addevaluation_cycle
()
{
const
body
=
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
apsyear
:
this
.
dataSelect
.
apsyear
,
apsPeriodStart
:
this
.
dataSelect
.
apsPeriodStart
,
apsPeriodEnd
:
this
.
dataSelect
.
apsPeriodEnd
,
statusCode
:
this
.
dataSelect
.
statusCode
})
this
.
evaluation_cycle
.
personalLevel
.
pop
()
const
body
=
new
MyEvaluationCycleModel
(
this
.
evaluation_cycle
)
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
...
...
@@ -198,10 +171,11 @@ export class EvaluationCycleComponent {
deleteevaluation_cycle
()
{
let
body
:
EvaluationCycleModel
|
EvaluationCycleModel
[]
=
[]
if
(
this
.
dataSelect
.
evaluationRoundId
)
{
body
=
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
apsyear
:
this
.
dataSelect
.
apsyear
,
apsPeriodStart
:
this
.
dataSelect
.
apsPeriodStart
,
apsPeriodEnd
:
this
.
dataSelect
.
apsPeriodEnd
,
statusCode
:
this
.
dataSelect
.
statusCode
})
if
(
this
.
evaluation_cycle
.
evaluationRoundId
)
{
this
.
evaluation_cycle
.
personalLevel
.
pop
()
body
=
new
MyEvaluationCycleModel
(
this
.
evaluation_cycle
)
}
else
{
body
=
this
.
evaluation_cyclelist
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyEvaluationCycleModel
(
{
evaluationRoundId
:
x
.
data
.
evaluationRoundId
,
tdesc
:
x
.
data
.
tdesc
,
edesc
:
x
.
data
.
edesc
,
apsyear
:
x
.
data
.
apsyear
,
apsPeriodStart
:
x
.
data
.
apsPeriodStart
,
apsPeriodEnd
:
x
.
data
.
apsPeriodEnd
,
statusCode
:
x
.
data
.
statusCode
}
))
body
=
this
.
evaluation_cyclelist
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyEvaluationCycleModel
(
x
.
data
))
}
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
delete
(
body
).
subscribe
({
...
...
@@ -234,9 +208,8 @@ export class EvaluationCycleComponent {
if
(
this
.
modalStatus
==
'add'
)
{
this
.
setData
()
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
}))
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
evaluation_cycle
.
evaluationRoundId
}))
}
this
.
pl
.
selectList
=
[
new
MyPLModel
()]
}
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
...
...
src/app/components/dashboard/dashboard-routing.module.ts
View file @
6f9dad8f
...
...
@@ -41,6 +41,7 @@ import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluati
import
{
IdpEvalutionComponent
}
from
'../performance-evaluation/idp-evaluation/idp-evalution.component'
;
import
{
PmsGradeRegistrationComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-pms-grade-registration.component'
;
import
{
DayTypeRegistryComponent
}
from
'../company-components/day-type-registry/day-type-registry.component'
;
import
{
TimeAttendanceComponent
}
from
'../performance-management-evaluation/time-attendance/time-attendance.component'
;
...
...
@@ -89,7 +90,8 @@ const routes: Routes = [
{
path
:
"grade-registration-sub"
,
title
:
'ทะเบียนเกรด'
,
component
:
PmsGradeRegistrationComponent
},
{
path
:
"setting-performance-evalution"
,
title
:
'การตั้งค่า'
,
component
:
SettingPerformanceEvalutionComponent
},
{
path
:
"self-evaluation"
,
title
:
'ประเมินตนเอง'
,
component
:
SelfEvaluationComponent
},
{
path
:
"day-type-registry"
,
title
:
'ประเมินตนเอง'
,
component
:
DayTypeRegistryComponent
}
{
path
:
"day-type-registry"
,
title
:
'ประเมินตนเอง'
,
component
:
DayTypeRegistryComponent
},
{
path
:
"time-attendance"
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
component
:
TimeAttendanceComponent
}
]
}
];
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
6f9dad8f
...
...
@@ -155,6 +155,7 @@ import { DayTypeRegistryComponent } from '../company-components/day-type-registr
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
PmsEvaluationCycleService
}
from
'src/app/shared/services/pms-evaluation-cycle.service'
;
import
{
PmsEvaluationAssessmentService
}
from
'src/app/shared/services/pms-evaluation-assessment.service'
;
import
{
TimeAttendanceComponent
}
from
'../performance-management-evaluation/time-attendance/time-attendance.component'
;
export
const
MY_DATE_FORMATS
=
{
parse
:
{
...
...
@@ -278,7 +279,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsGradeManagementComponent
,
PmsGroupGradeComponent
,
PmsSubGradeRegistrationComponent
,
DayTypeRegistryComponent
DayTypeRegistryComponent
,
TimeAttendanceComponent
],
imports
:
[
CommonModule
,
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
6f9dad8f
...
...
@@ -254,27 +254,28 @@
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
pmsEvaluationRoundId
"
>
[(
ngModel
)]="
pmsMasfromEvaluation
.
pmsEvaluationRoundId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
pmsMasfromEvaluation
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
edesc
"
>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
pmsMasfromEvaluation
.
edesc
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ปีการประเมิน
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
dataSelect
.
apsyear
"
>
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
pmsMasfromEvaluation
.
apsyear
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
เริ่มวันที่
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
apsPeriodStart
"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
pmsMasfromEvaluation
.
apsPeriodStart
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
สิ้นสุดวันที่
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
dataSelect
.
apsPeriodEnd
"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
pmsMasfromEvaluation
.
apsPeriodEnd
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ระดับพนักงาน (JL)
</label>
<div
*
ngFor=
"let item of p
l.selectList
;let i = index;let f=first"
[
class
.
mt-2
]="!
f
"
<div
*
ngFor=
"let item of p
msMasfromEvaluation.personalLevel
;let i = index;let f=first"
[
class
.
mt-2
]="!
f
"
class=
"col-span-6 sm:col-span-6 "
>
<div
class=
"flex"
>
<div
class=
"relative flex rounded-md"
>
...
...
@@ -303,8 +304,8 @@
</button>
<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
"
[
disabled
]="!
dataSelect
.
pmsEvaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
[
class
.
ti-btn-disabled
]="!
pmsMasfromEvaluation
.
pmsEvaluationRoundId
||!
pmsMasfromEvaluation
.
tdesc
||!
pmsMasfromEvaluation
.
apsyear
||!
pmsMasfromEvaluation
.
apsPeriodStart
||!
pmsMasfromEvaluation
.
apsPeriodEnd
"
[
disabled
]="!
pmsMasfromEvaluation
.
pmsEvaluationRoundId
||!
pmsMasfromEvaluation
.
tdesc
||!
pmsMasfromEvaluation
.
apsyear
||!
pmsMasfromEvaluation
.
apsPeriodStart
||!
pmsMasfromEvaluation
.
apsPeriodEnd
"
>
บันทึกข้อมูล
</button>
</div>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
6f9dad8f
...
...
@@ -27,7 +27,6 @@ export class ManagementCycleComponent {
pmsMasfromEvaluationlist
:
{
check
:
boolean
,
data
:
PmsMasfromEvaluationModel
}[]
=
[]
pmsMasfromEvaluation
:
PmsMasfromEvaluationModel
=
new
MyPmsMasfromEvaluationModel
({})
dataLoading
=
false
dataSelect
:
PmsMasfromEvaluationModel
=
new
MyPmsMasfromEvaluationModel
()
itemToDelete
:
PmsMasfromEvaluationModel
|
null
=
null
;
isDataListChecked
=
false
isDataListCheckedAll
=
false
...
...
@@ -40,7 +39,7 @@ export class ManagementCycleComponent {
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
)
}
pl
:
{
loading
:
boolean
,
select
List
:
PLModel
[],
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectList
:
[
new
MyPLModel
()]
,
selectIndex
:
-
1
,
dataList
:
[]
}
pl
:
{
loading
:
boolean
,
select
Index
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectIndex
:
-
1
,
dataList
:
[]
}
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
...
...
@@ -84,18 +83,18 @@ export class ManagementCycleComponent {
(
x
.
plId
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
&&
!
this
.
p
l
.
selectList
.
some
(
y
=>
y
.
plId
==
x
.
plId
)
!
this
.
p
msMasfromEvaluation
.
personalLevel
.
some
(
y
=>
y
.
plId
==
x
.
plId
)
);
}
selectPl
(
data
?:
PLModel
)
{
if
(
!
data
)
{
this
.
p
l
.
selectList
.
splice
(
this
.
pl
.
selectIndex
,
1
);
this
.
p
msMasfromEvaluation
.
personalLevel
.
splice
(
this
.
pl
.
selectIndex
,
1
);
return
;
}
this
.
p
l
.
selectList
[
this
.
pl
.
selectIndex
]
=
new
MyPLModel
(
data
);
if
(
this
.
pl
.
selectIndex
===
this
.
p
l
.
selectList
.
length
-
1
)
{
this
.
p
l
.
selectList
.
push
(
new
MyPLModel
());
this
.
p
msMasfromEvaluation
.
personalLevel
[
this
.
pl
.
selectIndex
]
=
new
MyPLModel
(
data
);
if
(
this
.
pl
.
selectIndex
===
this
.
p
msMasfromEvaluation
.
personalLevel
.
length
-
1
)
{
this
.
p
msMasfromEvaluation
.
personalLevel
.
push
(
new
MyPLModel
());
}
}
...
...
@@ -145,11 +144,14 @@ export class ManagementCycleComponent {
return
match
;
});
}
setData
(
data
?:
PmsMasfromEvaluationModel
)
{
this
.
dataSelect
=
new
MyPmsMasfromEvaluationModel
(
data
)
this
.
pmsMasfromEvaluation
=
new
MyPmsMasfromEvaluationModel
(
data
)
this
.
pmsMasfromEvaluation
.
personalLevel
.
push
(
new
MyPLModel
())
}
addPmsMasfromEvaluation
()
{
const
body
=
new
MyPmsMasfromEvaluationModel
(
this
.
dataSelect
)
this
.
pmsMasfromEvaluation
.
personalLevel
.
pop
()
const
body
=
new
MyPmsMasfromEvaluationModel
(
this
.
pmsMasfromEvaluation
)
this
.
dataLoading
=
true
this
.
pmsMasfromEvaluationCycleService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
...
...
@@ -170,9 +172,10 @@ export class ManagementCycleComponent {
}
deletePmsMasfromEvaluation
()
{
let
body
:
PmsMasfromEvaluationModel
|
PmsMasfromEvaluationModel
[]
=
[]
if
(
this
.
dataSelect
.
pmsEvaluationRoundId
)
{
body
=
new
MyPmsMasfromEvaluationModel
(
this
.
dataSelect
)
let
body
:
PmsMasfromEvaluationModel
[]
=
[]
if
(
this
.
pmsMasfromEvaluation
.
pmsEvaluationRoundId
)
{
this
.
pmsMasfromEvaluation
.
personalLevel
.
pop
()
body
=
[
new
MyPmsMasfromEvaluationModel
(
this
.
pmsMasfromEvaluation
)]
}
else
{
body
=
this
.
pmsMasfromEvaluationlist
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyPmsMasfromEvaluationModel
(
x
.
data
))
}
...
...
@@ -206,9 +209,8 @@ export class ManagementCycleComponent {
if
(
this
.
modalStatus
==
'add'
)
{
this
.
setData
()
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
dataSelect
.
pmsEvaluationRoundId
}))
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
pmsMasfromEvaluation
.
pmsEvaluationRoundId
}))
}
this
.
pl
.
selectList
=
[
new
MyPLModel
()]
}
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
...
...
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.html
0 → 100644
View file @
6f9dad8f
This diff is collapsed.
Click to expand it.
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.scss
0 → 100644
View file @
6f9dad8f
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.ts
0 → 100644
View file @
6f9dad8f
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EventgrpModel
,
MyEventgrpModel
}
from
'src/app/shared/model/eventgrp.model'
;
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
interface
table
{
currentPage
:
number
,
page
:
number
[],
search
:
string
}
@
Component
({
selector
:
'app-time-attendance'
,
templateUrl
:
'./time-attendance.component.html'
,
styleUrls
:
[
'./time-attendance.component.scss'
]
})
export
class
TimeAttendanceComponent
{
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'ทะเบียนการประเมินเวลาทำงาน'
,
'การจัดการหัวข้อการประเมินเวลาทำงาน'
]
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
currentPage
=
1
;
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
''
;
modalStatus
:
"add"
|
"edit"
|
"delete"
|
"deleteGroup"
=
"add"
modal
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
search
:
""
}
eventgrp
:
{
loading
:
boolean
,
selectIndex
:
number
,
selectList
:
EventgrpModel
[],
dataList
:
{
check
:
boolean
,
data
:
EventgrpModel
}[]
}
=
{
loading
:
false
,
selectIndex
:
-
1
,
selectList
:
[
new
MyEventgrpModel
()],
dataList
:
[]
}
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
fileService
:
FileService
,
private
eventgrpService
:
EventgrpService
)
{
}
ngOnInit
():
void
{
this
.
getEventgrpList
()
}
getEventgrpList
()
{
this
.
eventgrp
.
loading
=
true
this
.
eventgrpService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
eventgrp
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyEventgrpModel
(
x
)
}))
this
.
eventgrp
.
loading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
()
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
eventgrp
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
eventgrpListFilter
()
{
return
this
.
eventgrp
.
dataList
.
filter
(
x
=>
{
const
data
=
x
.
data
const
match
=
data
.
eventgrpId
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
());
return
match
;
})
}
selectEventgrp
(
data
?:
EventgrpModel
)
{
if
(
!
data
)
{
this
.
eventgrp
.
selectList
.
splice
(
this
.
eventgrp
.
selectIndex
,
1
);
return
;
}
this
.
eventgrp
.
selectList
[
this
.
eventgrp
.
selectIndex
]
=
new
MyEventgrpModel
(
data
);
if
(
this
.
eventgrp
.
selectIndex
===
this
.
eventgrp
.
selectList
.
length
-
1
)
{
this
.
eventgrp
.
selectList
.
push
(
new
MyEventgrpModel
());
}
}
dataListFilter
()
{
// return this.pmsGrade.dataList.filter((x) => {
// const data = x.data
// const match = data.gradeId.toLowerCase().includes(this.search.toLowerCase()) || data.tdesc.toLowerCase().includes(this.search.toLowerCase()) || data.edesc.toLowerCase().includes(this.search.toLowerCase());
// return match;
// });
return
[]
}
dataListCheckAll
()
{
// const selectAll = this.isDataListCheckedAll;
// this.dataListFilter().forEach(x => x.check = selectAll);
// this.dataListCheck();
}
dataListCheck
()
{
// const dataCheck = this.dataListFilter();
// this.isDataListCheckedAll = dataCheck.length ? dataCheck.every(x => x.check) : false;
// this.numDataListChecked = this.pmsGrade.dataList.filter(x => x.check).length;
// this.isDataListChecked = Boolean(this.numDataListChecked)
}
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
();
}
selectData
()
{
}
clearData
(
modalStatus
:
string
)
{
if
(
modalStatus
==
'add'
)
{
}
else
if
(
modalStatus
==
'edit'
)
{
}
this
.
eventgrp
.
selectList
=
[
new
MyEventgrpModel
()]
}
modalSearchChange
(
dataList
:
any
)
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
src/app/shared/model/evaluation-cycle.model.ts
View file @
6f9dad8f
import
{
MyPLModel
,
PLModel
}
from
"./pl.model"
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
"./status-code.model"
;
export
interface
EvaluationCycleModel
{
...
...
@@ -9,6 +10,7 @@ export interface EvaluationCycleModel {
apsPeriodStart
:
string
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
personalLevel
:
PLModel
[]
}
...
...
@@ -21,6 +23,7 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel {
apsPeriodStart
:
string
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
personalLevel
:
PLModel
[]
constructor
(
data
?:
Partial
<
EvaluationCycleModel
>
)
{
this
.
evaluationRoundId
=
data
?.
evaluationRoundId
||
""
;
this
.
companyId
=
data
?.
companyId
||
""
;
...
...
@@ -30,6 +33,7 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel {
this
.
apsPeriodStart
=
data
?.
apsPeriodStart
||
""
;
this
.
apsPeriodEnd
=
data
?.
apsPeriodEnd
||
""
;
this
.
statusCode
=
new
MyStatusCodeModel
(
data
?.
statusCode
||
{})
this
.
personalLevel
=
data
?.
personalLevel
?.
map
(
x
=>
new
MyPLModel
(
x
))
||
[]
}
}
src/app/shared/model/pms-masfrom-evaluation.model.ts
View file @
6f9dad8f
import
{
PLModel
,
MyPLModel
}
from
"./pl.model"
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
"./status-code.model"
;
export
interface
PmsMasfromEvaluationModel
{
...
...
@@ -10,6 +11,7 @@ export interface PmsMasfromEvaluationModel {
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
active
:
boolean
personalLevel
:
PLModel
[]
}
export
class
MyPmsMasfromEvaluationModel
implements
PmsMasfromEvaluationModel
{
...
...
@@ -22,6 +24,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
active
:
boolean
personalLevel
:
PLModel
[]
constructor
(
data
?:
Partial
<
PmsMasfromEvaluationModel
>
)
{
this
.
pmsEvaluationRoundId
=
data
?.
pmsEvaluationRoundId
||
""
;
this
.
companyId
=
data
?.
companyId
||
""
;
...
...
@@ -32,6 +35,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
this
.
apsPeriodEnd
=
data
?.
apsPeriodEnd
||
""
;
this
.
active
=
data
?.
active
||
false
this
.
statusCode
=
new
MyStatusCodeModel
(
data
?.
statusCode
)
this
.
personalLevel
=
data
?.
personalLevel
?.
map
(
x
=>
new
MyPLModel
(
x
))
||
[]
}
}
src/app/shared/services/navservice.ts
View file @
6f9dad8f
...
...
@@ -151,6 +151,7 @@ export class NavService implements OnDestroy {
children
:
[
{
path
:
'/name-registration-perfomance'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
},
{
path
:
'/grade-registration-sub'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
},
{
path
:
'/time-attendance'
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
type
:
'link'
},
{
path
:
'/evaluation-factors'
,
title
:
'ปัจจัยการประเมินผล'
,
type
:
'link'
},
{
path
:
'/assessment-management'
,
title
:
'การจัดการการประเมิน'
,
type
:
'link'
},
{
path
:
'/evaluation-cycle-performance'
,
title
:
'รอบการประเมิน'
,
type
:
'link'
},
...
...
src/assets/css/style.css
View file @
6f9dad8f
...
...
@@ -24923,11 +24923,17 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
-webkit-text-security
:
disc
;
/* Safari, Chrome */
}
.cursor-not-allowed
{
cursor
:
not-allowed
.cursor-not-allowed
{
cursor
:
not-allowed
;
}
.
\
!
max-w-3
\
/
4
{
max-width
:
75%
!important
;
}
.
\
!
max-w-1
\
/
2
{
max-width
:
50%
!important
;
}
.max-w-1
\
/
2
{
max-width
:
50%
!important
;
}
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