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
029fca9c
Commit
029fca9c
authored
3 weeks ago
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
รอบการประเมิน
parent
93acff53
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
77 deletions
+61
-77
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
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
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
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
029fca9c
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
029fca9c
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
029fca9c
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
029fca9c
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/shared/model/evaluation-cycle.model.ts
View file @
029fca9c
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
))
||
[]
}
}
This diff is collapsed.
Click to expand it.
src/app/shared/model/pms-masfrom-evaluation.model.ts
View file @
029fca9c
import
{
PLModel
,
MyPLModel
}
from
"./pl.model"
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
"./status-code.model"
;
export
interface
PmsMasfromEvaluationModel
{
...
...
@@ -9,6 +10,7 @@ export interface PmsMasfromEvaluationModel {
apsPeriodStart
:
string
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
personalLevel
:
PLModel
[]
}
export
class
MyPmsMasfromEvaluationModel
implements
PmsMasfromEvaluationModel
{
...
...
@@ -20,6 +22,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
apsPeriodStart
:
string
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
personalLevel
:
PLModel
[]
constructor
(
data
?:
Partial
<
PmsMasfromEvaluationModel
>
)
{
this
.
pmsEvaluationRoundId
=
data
?.
pmsEvaluationRoundId
||
""
;
this
.
companyId
=
data
?.
companyId
||
""
;
...
...
@@ -29,6 +32,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
this
.
apsPeriodStart
=
data
?.
apsPeriodStart
||
""
;
this
.
apsPeriodEnd
=
data
?.
apsPeriodEnd
||
""
;
this
.
statusCode
=
new
MyStatusCodeModel
(
data
?.
statusCode
)
this
.
personalLevel
=
data
?.
personalLevel
?.
map
(
x
=>
new
MyPLModel
(
x
))
||
[]
}
}
This diff is collapsed.
Click to expand it.
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