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
fb87715a
Commit
fb87715a
authored
Feb 22, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การประเมินจัดการประสิทธิภาพ > รอบการประเมิน > รอบการประเมิน
parent
665ab5cd
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
85 deletions
+149
-85
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+1
-1
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+8
-0
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+2
-0
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+21
-18
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+41
-59
define-evaluation-factors.component.ts
...evaluation-factors/define-evaluation-factors.component.ts
+2
-2
pms-masfrom-evaluation.model.ts
src/app/shared/model/pms-masfrom-evaluation.model.ts
+34
-0
status-code.model.ts
src/app/shared/model/status-code.model.ts
+6
-5
pms-masfrom-evaluation.service.ts
src/app/shared/services/pms-masfrom-evaluation.service.ts
+34
-0
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
fb87715a
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
<div
class=
"w-full flex justify-end"
>
<div
class=
"w-full flex justify-end"
>
<div
class=
"absolute flex"
>
<div
class=
"absolute flex"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clear
()"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
fb87715a
...
@@ -163,6 +163,14 @@ export class EvaluationCycleComponent {
...
@@ -163,6 +163,14 @@ export class EvaluationCycleComponent {
positionClass
:
'toast-top-right'
,
positionClass
:
'toast-top-right'
,
});
});
}
}
clear
()
{
if
(
this
.
modalStatus
==
'add'
)
{
this
.
setData
()
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
setData
(
new
MyEvaluationCycleModel
({
evaluationRoundId
:
this
.
dataSelect
.
evaluationRoundId
}))
}
}
}
}
src/app/components/dashboard/dashboard.module.ts
View file @
fb87715a
...
@@ -143,6 +143,7 @@ import { PmstopicService } from 'src/app/shared/services/pmstopic.service';
...
@@ -143,6 +143,7 @@ import { PmstopicService } from 'src/app/shared/services/pmstopic.service';
import
{
PmsGroupAssessmentService
}
from
'src/app/shared/services/pms-group-assessment.service'
;
import
{
PmsGroupAssessmentService
}
from
'src/app/shared/services/pms-group-assessment.service'
;
import
{
PmsGroupApproveService
}
from
'src/app/shared/services/pms-group-approve.service'
;
import
{
PmsGroupApproveService
}
from
'src/app/shared/services/pms-group-approve.service'
;
import
{
PmsEaluationFactorsService
}
from
'src/app/shared/services/pms-ealuation-factors.service'
;
import
{
PmsEaluationFactorsService
}
from
'src/app/shared/services/pms-ealuation-factors.service'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
export
const
MY_DATE_FORMATS
=
{
export
const
MY_DATE_FORMATS
=
{
parse
:
{
parse
:
{
...
@@ -316,6 +317,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
...
@@ -316,6 +317,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsGroupAssessmentService
,
PmsGroupAssessmentService
,
PmsGroupApproveService
,
PmsGroupApproveService
,
PmsEaluationFactorsService
,
PmsEaluationFactorsService
,
PmsMasfromEvaluationCycleService
,
{
{
provide
:
HTTP_INTERCEPTORS
,
provide
:
HTTP_INTERCEPTORS
,
useClass
:
HttpRequestInterceptor
,
useClass
:
HttpRequestInterceptor
,
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
fb87715a
...
@@ -80,22 +80,23 @@
...
@@ -80,22 +80,23 @@
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&!
evaluation_cycleList
Filter().length"
>
<tbody
*
ngIf=
"!dataLoading&&!
pmsMasfromEvaluationCycle
Filter().length"
>
<tr>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
ไม่พบข้อมูล
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&
evaluation_cycleList
Filter().length"
>
<tbody
*
ngIf=
"!dataLoading&&
pmsMasfromEvaluationCycle
Filter().length"
>
<tr
<tr
*
ngFor=
"let item of
evaluation_cycleList
Filter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
*
ngFor=
"let item of
pmsMasfromEvaluationCycle
Filter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.data.evaluationRoundId}}"
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
id=
"checkbox-{{item.data.pmsEvaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
</td>
</td>
<td>
<td>
<label
for=
"checkbox-{{item.data.
evaluationRoundId}}"
>
{{item.data.e
valuationRoundId}}
</label>
<label
for=
"checkbox-{{item.data.
pmsEvaluationRoundId}}"
>
{{item.data.pmsE
valuationRoundId}}
</label>
</td>
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.apsyear}}
</td>
<td>
{{item.data.apsyear}}
</td>
...
@@ -136,7 +137,8 @@
...
@@ -136,7 +137,8 @@
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
></i>
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#management-evaluation-cycle-person-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#management-evaluation-cycle-person-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
></i>
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
></i>
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
...
@@ -197,10 +199,10 @@
...
@@ -197,10 +199,10 @@
</li>
</li>
</ul>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{
evaluation_cycleList
Filter().length
<10
<span>
Show {{((currentPage-1) * 10)+1}} to {{
pmsMasfromEvaluationCycle
Filter().length
<10
?
evaluation_cycleListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
?
pmsMasfromEvaluationCycleFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
evaluation_cycleListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
evaluation_cycleListFilter
().
length
}}
10
)
-
pmsMasfromEvaluationCycleFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
items
</
span
>
{{
pmsMasfromEvaluationCycleFilter
().
length
}}
items
</
span
>
</ul>
</ul>
</nav>
</nav>
</div>
</div>
...
@@ -223,7 +225,7 @@
...
@@ -223,7 +225,7 @@
<div
class=
"w-full flex justify-end"
>
<div
class=
"w-full flex justify-end"
>
<div
class=
"absolute flex"
>
<div
class=
"absolute flex"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clear
()"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
...
@@ -251,7 +253,7 @@
...
@@ -251,7 +253,7 @@
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัส รอบการประเมิน*
</label>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัส รอบการประเมิน*
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
e
valuationRoundId
"
>
[(
ngModel
)]="
dataSelect
.
pmsE
valuationRoundId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)*
</label>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)*
</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
)]="
dataSelect
.
tdesc
"
>
...
@@ -275,9 +277,10 @@
...
@@ -275,9 +277,10 @@
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
>
data-hs-overlay=
"#management-evaluation-cycle-page-modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
[
disabled
]="!
dataSelect
.
evaluationRoundId
||!
dataSelect
.
tdesc
||!
dataSelect
.
apsyear
||!
dataSelect
.
apsPeriodStart
||!
dataSelect
.
apsPeriodEnd
"
>
[
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
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -328,7 +331,7 @@
...
@@ -328,7 +331,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
(
click
)="
add
evaluation_cycle
()"
>
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
(
click
)="
add
PmsMasfromEvaluation
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
@@ -339,7 +342,7 @@
...
@@ -339,7 +342,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
(
click
)="
delete
evaluation_cycle
()"
>
data-hs-overlay=
"#management-evaluation-cycle-page-alert-modal"
(
click
)="
delete
PmsMasfromEvaluation
()"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
fb87715a
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
MyPmsMasfromEvaluationModel
,
PmsMasfromEvaluationModel
}
from
'src/app/shared/model/pms-masfrom-evaluation.model'
;
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
'src/app/shared/model/status-code.model'
;
import
{
PmsMasfromEvaluationCycleService
}
from
'src/app/shared/services/pms-masfrom-evaluation.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
export
interface
DataModel
{
evaluationRoundId
:
string
;
tdesc
:
string
;
edesc
:
string
;
apsyear
:
string
;
apsPeriodStart
:
string
;
apsPeriodEnd
:
string
;
statusCode
:
StatusCodeModel
;
}
@
Component
({
@
Component
({
selector
:
'app-management-evaluation-cycle'
,
selector
:
'app-management-evaluation-cycle'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
templateUrl
:
'./management-evaluation-cycle.component.html'
,
...
@@ -24,40 +15,32 @@ export class ManagementCycleComponent {
...
@@ -24,40 +15,32 @@ export class ManagementCycleComponent {
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
search
=
""
modalStatus
=
'add'
modalStatus
:
'add'
|
'edit'
|
'delete'
|
'deleteGroup'
=
'add'
evaluation_cyclelist
:
{
check
:
boolean
,
data
:
Data
Model
}[]
=
[]
pmsMasfromEvaluationlist
:
{
check
:
boolean
,
data
:
PmsMasfromEvaluation
Model
}[]
=
[]
evaluation_cycle
:
EvaluationCycleModel
=
new
MyEvaluationCycle
Model
({})
pmsMasfromEvaluation
:
PmsMasfromEvaluationModel
=
new
MyPmsMasfromEvaluation
Model
({})
dataLoading
=
false
dataLoading
=
false
dataSelect
:
DataModel
=
{
evaluationRoundId
:
""
,
tdesc
:
""
,
edesc
:
""
,
apsyear
:
""
,
apsPeriodStart
:
""
,
apsPeriodEnd
:
""
,
statusCode
:
new
MyStatusCodeModel
({})
}
dataSelect
:
PmsMasfromEvaluationModel
=
new
MyPmsMasfromEvaluationModel
()
itemToDelete
:
EvaluationCycle
Model
|
null
=
null
;
itemToDelete
:
PmsMasfromEvaluation
Model
|
null
=
null
;
isDataListChecked
=
false
isDataListChecked
=
false
isDataListCheckedAll
=
false
isDataListCheckedAll
=
false
numDataListChecked
=
0
numDataListChecked
=
0
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfrom
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
private
cdr
:
ChangeDetectorRef
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getEvaluationCycleList
()
this
.
get
PmsMasfrom
EvaluationCycleList
()
}
}
getEvaluationCycleList
()
{
get
PmsMasfrom
EvaluationCycleList
()
{
this
.
dataLoading
=
true
this
.
dataLoading
=
true
this
.
e
valuationCycleService
.
getList
().
subscribe
({
this
.
pmsMasfromE
valuationCycleService
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
evaluation_cycle
list
=
response
.
map
(
x
=>
({
this
.
pmsMasfromEvaluation
list
=
response
.
map
(
x
=>
({
check
:
false
,
check
:
false
,
data
:
{
data
:
new
MyPmsMasfromEvaluationModel
(
x
)
evaluationRoundId
:
x
.
evaluationRoundId
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
apsyear
:
x
.
apsyear
,
apsPeriodStart
:
x
.
apsPeriodStart
,
apsPeriodEnd
:
x
.
apsPeriodEnd
,
statusCode
:
new
MyStatusCodeModel
(
x
.
statusCode
||
{})
}
}));
}));
this
.
dataLoading
=
false
this
.
dataLoading
=
false
...
@@ -74,47 +57,39 @@ export class ManagementCycleComponent {
...
@@ -74,47 +57,39 @@ export class ManagementCycleComponent {
}
}
dataListCheckAll
()
{
dataListCheckAll
()
{
const
selectAll
=
this
.
isDataListCheckedAll
;
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
evaluation_cycleList
Filter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
pmsMasfromEvaluationCycle
Filter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
this
.
dataListCheck
();
}
}
dataListCheck
()
{
dataListCheck
()
{
const
dataCheck
=
this
.
evaluation_cycleList
Filter
();
const
dataCheck
=
this
.
pmsMasfromEvaluationCycle
Filter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
evaluation_cycle
list
.
filter
(
x
=>
x
.
check
).
length
;
this
.
numDataListChecked
=
this
.
pmsMasfromEvaluation
list
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
searchChange
()
{
searchChange
()
{
this
.
currentPage
=
1
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
evaluation_cycleList
Filter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
pmsMasfromEvaluationCycle
Filter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
()
this
.
dataListCheck
()
}
}
evaluation_cycleList
Filter
()
{
pmsMasfromEvaluationCycle
Filter
()
{
return
this
.
evaluation_cycle
list
.
filter
(
x
=>
{
return
this
.
pmsMasfromEvaluation
list
.
filter
(
x
=>
{
const
data
=
x
.
data
const
data
=
x
.
data
const
match
=
data
.
e
valuationRoundId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
const
match
=
data
.
pmsE
valuationRoundId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
return
match
;
return
match
;
});
});
}
}
setData
(
data
?:
DataModel
)
{
setData
(
data
?:
PmsMasfromEvaluationModel
)
{
this
.
dataSelect
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{
this
.
dataSelect
=
new
MyPmsMasfromEvaluationModel
(
data
)
evaluationRoundId
:
""
,
tdesc
:
""
,
edesc
:
""
,
apsyear
:
""
,
apsPeriodStart
:
""
,
apsPeriodEnd
:
""
,
statusCode
:
new
MyStatusCodeModel
({})
}));
}
}
add
evaluation_cycle
()
{
add
PmsMasfromEvaluation
()
{
const
body
=
new
My
EvaluationCycleModel
({
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
}
)
const
body
=
new
My
PmsMasfromEvaluationModel
(
this
.
dataSelect
)
this
.
dataLoading
=
true
this
.
dataLoading
=
true
this
.
e
valuationCycleService
.
post
(
body
).
subscribe
({
this
.
pmsMasfromE
valuationCycleService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getEvaluationCycleList
()
this
.
get
PmsMasfrom
EvaluationCycleList
()
}
else
{
}
else
{
this
.
dataLoading
=
false
this
.
dataLoading
=
false
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
...
@@ -128,19 +103,19 @@ export class ManagementCycleComponent {
...
@@ -128,19 +103,19 @@ export class ManagementCycleComponent {
})
})
}
}
delete
evaluation_cycle
()
{
delete
PmsMasfromEvaluation
()
{
let
body
:
EvaluationCycleModel
|
EvaluationCycle
Model
[]
=
[]
let
body
:
PmsMasfromEvaluationModel
|
PmsMasfromEvaluation
Model
[]
=
[]
if
(
this
.
dataSelect
.
e
valuationRoundId
)
{
if
(
this
.
dataSelect
.
pmsE
valuationRoundId
)
{
body
=
new
My
EvaluationCycleModel
({
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
}
)
body
=
new
My
PmsMasfromEvaluationModel
(
this
.
dataSelect
)
}
else
{
}
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
.
pmsMasfromEvaluationlist
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyPmsMasfromEvaluationModel
(
x
.
data
))
}
}
this
.
dataLoading
=
true
this
.
dataLoading
=
true
this
.
e
valuationCycleService
.
delete
(
body
).
subscribe
({
this
.
pmsMasfromE
valuationCycleService
.
delete
(
body
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getEvaluationCycleList
()
this
.
get
PmsMasfrom
EvaluationCycleList
()
}
else
{
}
else
{
this
.
dataLoading
=
false
this
.
dataLoading
=
false
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
...
@@ -161,6 +136,13 @@ export class ManagementCycleComponent {
...
@@ -161,6 +136,13 @@ export class ManagementCycleComponent {
positionClass
:
'toast-top-right'
,
positionClass
:
'toast-top-right'
,
});
});
}
}
clear
()
{
if
(
this
.
modalStatus
==
'add'
)
{
this
.
setData
()
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
setData
(
new
MyPmsMasfromEvaluationModel
({
pmsEvaluationRoundId
:
this
.
dataSelect
.
pmsEvaluationRoundId
}))
}
}
}
}
src/app/components/performance-management-evaluation/evaluation-factors/define-evaluation-factors/define-evaluation-factors.component.ts
View file @
fb87715a
...
@@ -57,14 +57,14 @@ export class DefineEvaluationFactorsComponent {
...
@@ -57,14 +57,14 @@ export class DefineEvaluationFactorsComponent {
}
}
savePmsEaluationFactors
()
{
savePmsEaluationFactors
()
{
this
.
pmsEaluationFactors
.
loading
=
true
this
.
pmsEaluationFactors
.
loading
=
true
this
.
pmsEaluationFactors
.
dataList
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
const
body
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
...
x
,
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1Model
({
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1Model
({
...
y
,
...
y
,
pmsScore
:
+
(
y
.
pmsScore
)
pmsScore
:
+
(
y
.
pmsScore
)
}))
}))
}))
}))
this
.
pmsEaluationFactorsService
.
post
(
this
.
pmsEaluationFactors
.
dataList
).
subscribe
({
this
.
pmsEaluationFactorsService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
...
...
src/app/shared/model/pms-masfrom-evaluation.model.ts
0 → 100644
View file @
fb87715a
import
{
MyStatusCodeModel
,
StatusCodeModel
}
from
"./status-code.model"
;
export
interface
PmsMasfromEvaluationModel
{
pmsEvaluationRoundId
:
string
companyId
:
string
tdesc
:
string
edesc
:
string
apsyear
:
string
apsPeriodStart
:
string
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
}
export
class
MyPmsMasfromEvaluationModel
implements
PmsMasfromEvaluationModel
{
pmsEvaluationRoundId
:
string
companyId
:
string
tdesc
:
string
edesc
:
string
apsyear
:
string
apsPeriodStart
:
string
apsPeriodEnd
:
string
statusCode
:
StatusCodeModel
constructor
(
data
?:
Partial
<
PmsMasfromEvaluationModel
>
)
{
this
.
pmsEvaluationRoundId
=
data
?.
pmsEvaluationRoundId
||
""
;
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
tdesc
=
data
?.
tdesc
||
""
;
this
.
edesc
=
data
?.
edesc
||
""
;
this
.
apsyear
=
data
?.
apsyear
||
""
;
this
.
apsPeriodStart
=
data
?.
apsPeriodStart
||
""
;
this
.
apsPeriodEnd
=
data
?.
apsPeriodEnd
||
""
;
this
.
statusCode
=
new
MyStatusCodeModel
(
data
?.
statusCode
)
}
}
src/app/shared/model/status-code.model.ts
View file @
fb87715a
...
@@ -9,9 +9,9 @@ export class MyStatusCodeModel implements StatusCodeModel {
...
@@ -9,9 +9,9 @@ export class MyStatusCodeModel implements StatusCodeModel {
tdesc
:
string
;
tdesc
:
string
;
edesc
:
string
;
edesc
:
string
;
constructor
(
data
:
Partial
<
StatusCodeModel
>
)
{
constructor
(
data
?
:
Partial
<
StatusCodeModel
>
)
{
this
.
code
=
data
.
code
||
""
;
this
.
code
=
data
?
.
code
||
""
;
this
.
tdesc
=
data
.
tdesc
||
""
;
this
.
tdesc
=
data
?
.
tdesc
||
""
;
this
.
edesc
=
data
.
edesc
||
""
;
this
.
edesc
=
data
?
.
edesc
||
""
;
}
}
}
}
\ No newline at end of file
src/app/shared/services/pms-masfrom-evaluation.service.ts
0 → 100644
View file @
fb87715a
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
PmsMasfromEvaluationModel
}
from
'../model/pms-masfrom-evaluation.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
PmsMasfromEvaluationCycleService
{
api
=
"/pms-masfrom-evaluation"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
PmsMasfromEvaluationModel
[]
>
{
return
this
.
http
.
get
<
PmsMasfromEvaluationModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getById
(
pmsEvaluationRoundId
:
string
):
Observable
<
PmsMasfromEvaluationModel
>
{
return
this
.
http
.
get
<
PmsMasfromEvaluationModel
>
(
this
.
urlApi
+
"/"
+
pmsEvaluationRoundId
)
}
post
(
body
:
PmsMasfromEvaluationModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
PmsMasfromEvaluationModel
|
PmsMasfromEvaluationModel
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
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