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
13c2c8ba
Commit
13c2c8ba
authored
Feb 27, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE การจัดการรอบการประเมิน
parent
d3b60370
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
407 additions
and
24 deletions
+407
-24
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
+15
-2
edit-evaluation-form.component.html
.../edit-evaluation-form/edit-evaluation-form.component.html
+0
-0
edit-evaluation-form.component.ts
...rm/edit-evaluation-form/edit-evaluation-form.component.ts
+107
-18
management-evaluation-cycle.component.html
...aluation-cycle/management-evaluation-cycle.component.html
+1
-1
appraisal-aps.model.ts
src/app/shared/model/appraisal-aps.model.ts
+266
-0
evaluation-assessment.service.ts
src/app/shared/services/evaluation-assessment.service.ts
+17
-2
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
13c2c8ba
...
...
@@ -358,7 +358,7 @@
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
(
click
)="
evaluationRoundId=
''
"
data-hs-overlay=
"#evaluation-cycle-person-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
13c2c8ba
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Output
,
Renderer2
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
...
...
@@ -38,15 +38,28 @@ export class EvaluationCycleComponent {
isDataListCheckedAll
=
false
numDataListChecked
=
0
evaluationRoundId
=
''
private
unlisten
!
:
()
=>
void
;
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
renderer
:
Renderer2
)
{
}
ngOnInit
():
void
{
this
.
getEvaluationCycleList
()
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
}
});
}
ngOnDestroy
()
{
if
(
this
.
unlisten
)
{
this
.
unlisten
();
// เรียกใช้งานจริง ๆ เพื่อลบ event listener
}
}
getEvaluationCycleList
()
{
this
.
dataLoading
=
true
this
.
evaluationCycleService
.
getList
().
subscribe
({
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.html
View file @
13c2c8ba
This diff is collapsed.
Click to expand it.
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.ts
View file @
13c2c8ba
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
AppraisalRoundModel
,
MyAppraisalRoundModel
}
from
'src/app/shared/model/appraisal-aps.model'
;
import
{
AppraisalFormModel
}
from
'src/app/shared/model/appraisal-form.model'
;
import
{
AppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
...
...
@@ -29,6 +30,20 @@ export class EditEvaluationFormComponent {
isChecked
:
boolean
=
false
;
apsassessy
=
""
empassessmentList
:
AppraisalModel
[]
=
[]
searchEmp
=
""
empassessmentRoundList
:
AppraisalRoundModel
[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
currentPageRound
=
1
pageRound
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
searchRound
=
""
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
numDataListChecked
=
0
msg
=
""
typeForm
=
""
selectData
:
AppraisalRoundModel
=
new
MyAppraisalRoundModel
()
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
...
...
@@ -41,6 +56,11 @@ export class EditEvaluationFormComponent {
}
ngOnChanges
():
void
{
setTimeout
(()
=>
{
document
.
getElementById
(
'form-pm-emp'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'form-assessment'
)?.
classList
.
add
(
"hidden"
)
document
.
getElementById
(
'modal-alert'
)?.
classList
.
add
(
"hidden"
)
},
10
);
if
(
this
.
evaluationRoundId
)
{
this
.
getAssessmentId
();
this
.
getAssessmentList
();
...
...
@@ -86,19 +106,33 @@ export class EditEvaluationFormComponent {
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
openModalClass
(
id
:
string
)
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'true'
)
},
10
);
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
typeForm
=
type
??
""
if
(
id
==
'modal-alert'
){
if
(
type
==
'deleteForm'
){
this
.
msg
=
'ยืนยันการลบรายการ'
}
else
if
(
type
==
'addForm'
){
this
.
msg
=
'ยืนยันการบันทึกรายการ'
}
}
if
(
id
){
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
)
},
10
);
}
this
.
isChecked
=
false
;
this
.
numDataListChecked
=
0
;
}
closeModalClass
(
id
:
string
)
{
const
modal
=
document
.
getElementById
(
id
);
if
(
modal
)
{
modal
.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ closeModalClass ~ modal:"
,
modal
)
if
(
id
)
{
modal
?.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
}
}
...
...
@@ -121,17 +155,19 @@ export class EditEvaluationFormComponent {
}
}
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
model
:
string
)
{
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
this
.
selectEmp
=
item
this
.
openModalClass
(
model
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
this
.
getApsassessyMini
();
}
getApsassessy
(){
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ this.evaluationAssessmentService.getApsassessy ~ response:"
,
response
)
this
.
empassessmentList
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
...
...
@@ -139,6 +175,65 @@ export class EditEvaluationFormComponent {
}
})
}
getApsassessyMini
(){
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
empassessmentListFilter
()
{
return
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
tdesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
edesc
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
)
||
x
.
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchRound
?.
toLowerCase
()
??
""
))
}
searchEmpassessmentListFilterChange
()
{
this
.
currentPageRound
=
1
;
const
filteredData
=
this
.
empassessmentListFilter
();
this
.
pageRound
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
this
.
empassessmentRoundListCheckbox
.
map
(
item
=>
item
.
checkbox
=
this
.
isChecked
);
this
.
checkempassessmentRoundListCheckbox
();
}
checkempassessmentRoundListCheckbox
(){
this
.
numDataListChecked
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
length
this
.
isChecked
=
this
.
numDataListChecked
?
true
:
false
}
deleteFormOne
(
item
:
AppraisalRoundModel
){
this
.
selectData
=
item
}
deleteAssessment
()
{
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
)
if
(
this
.
typeForm
==
'deleteFormOne'
){
body
=
[
this
.
selectData
]
}
if
(
body
.
length
==
0
){
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
)
return
}
this
.
evaluationAssessmentService
.
deletemMini
(
body
,
this
.
selectEmp
.
apsassessy
.
employeeId
,
this
.
selectEmp
.
masfromEvaluationRound
.
evaluationRoundId
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getApsassessyMini
();
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
}
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
...
...
@@ -148,13 +243,7 @@ export class EditEvaluationFormComponent {
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
}
addUser
()
{
}
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.html
View file @
13c2c8ba
...
...
@@ -354,7 +354,7 @@
<div
id=
"management-evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full
rounded-sm shadow-sm
"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
...
...
src/app/shared/model/appraisal-aps.model.ts
0 → 100644
View file @
13c2c8ba
export
interface
AppraisalRoundModel
{
runNo
:
number
;
companyId
:
string
;
groupAssessment1
:
GroupAssessment1
;
}
export
interface
GroupAssessment1
{
personalLevelModel
:
PersonalLevelModel
;
competencyIndicatorsCourses1Mini
:
CompetencyIndicatorsCourses1Mini
;
companyId
:
string
;
groupAssessmentMini
:
GroupAssessmentMini
;
}
export
interface
PersonalLevelModel
{
plId
:
string
;
tdesc
:
any
;
edesc
:
any
;
companyId
:
any
;
}
export
interface
CompetencyIndicatorsCourses1Mini
{
competencyIndicatorsCourses0
:
CompetencyIndicatorsCourses0
;
lineNo
:
number
;
companyId
:
string
;
competencyCourseId
:
string
;
behavioralIndicatorsList
:
BehavioralIndicatorsList
[];
}
export
interface
CompetencyIndicatorsCourses0
{
competencyTopic
:
CompetencyTopic
;
companyId
:
string
;
edesc
:
string
;
tdesc
:
string
;
indicatorsCourseDetailTh
:
string
;
indicatorsCourseDetailEn
:
string
;
expectation
:
any
;
}
export
interface
CompetencyTopic
{
competencyTopicId
:
string
;
competencyType
:
any
;
companyId
:
any
;
edesc
:
any
;
tdesc
:
any
;
competencyDetail
:
any
;
competencyFiles
:
any
;
lineNo
:
any
;
}
export
interface
BehavioralIndicatorsList
{
competencyIndicators1
:
CompetencyIndicators1
;
runNo
:
number
;
companyId
:
string
;
assessmentId
:
string
;
behavioralIndicators
:
string
;
competencyBehavioral
:
CompetencyBehavioral
;
}
export
interface
CompetencyIndicators1
{
competencyIndicatorsCourses0
:
CompetencyIndicatorsCourses02
;
lineNo
:
number
;
companyId
:
string
;
competencyCourseId
:
string
;
}
export
interface
CompetencyIndicatorsCourses02
{
competencyTopic
:
CompetencyTopic
;
companyId
:
string
;
edesc
:
string
;
tdesc
:
string
;
indicatorsCourseDetailTh
:
string
;
indicatorsCourseDetailEn
:
string
;
}
export
interface
CompetencyBehavioral
{
scoreTopicExpectation
:
number
;
companyId
:
string
;
}
export
interface
GroupAssessmentMini
{
personalLevel
:
PersonalLevel
;
competencyIndicatorsCourses1Mini
:
any
;
companyId
:
string
;
edesc
:
any
;
tdesc
:
any
;
}
export
interface
PersonalLevel
{
plId
:
string
;
tdesc
:
any
;
edesc
:
any
;
companyId
:
any
;
}
// ------------------------- Class Implementation -------------------------
export
class
MyAppraisalRoundModel
implements
AppraisalRoundModel
{
runNo
:
number
;
companyId
:
string
;
groupAssessment1
:
GroupAssessment1
;
constructor
(
data
?:
Partial
<
AppraisalRoundModel
>
)
{
this
.
runNo
=
data
?.
runNo
??
0
;
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
groupAssessment1
=
new
MyGroupAssessment1
(
data
?.
groupAssessment1
);
}
}
export
class
MyGroupAssessment1
implements
GroupAssessment1
{
personalLevelModel
:
PersonalLevelModel
;
competencyIndicatorsCourses1Mini
:
CompetencyIndicatorsCourses1Mini
;
companyId
:
string
;
groupAssessmentMini
:
GroupAssessmentMini
;
constructor
(
data
?:
Partial
<
GroupAssessment1
>
)
{
this
.
personalLevelModel
=
new
MyPersonalLevelModel
(
data
?.
personalLevelModel
);
this
.
competencyIndicatorsCourses1Mini
=
new
MyCompetencyIndicatorsCourses1Mini
(
data
?.
competencyIndicatorsCourses1Mini
);
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
groupAssessmentMini
=
new
MyGroupAssessmentMini
(
data
?.
groupAssessmentMini
);
}
}
export
class
MyPersonalLevelModel
implements
PersonalLevelModel
{
plId
:
string
;
tdesc
:
any
;
edesc
:
any
;
companyId
:
any
;
constructor
(
data
?:
Partial
<
PersonalLevelModel
>
)
{
this
.
plId
=
data
?.
plId
||
""
;
this
.
tdesc
=
data
?.
tdesc
??
null
;
this
.
edesc
=
data
?.
edesc
??
null
;
this
.
companyId
=
data
?.
companyId
??
null
;
}
}
export
class
MyCompetencyIndicatorsCourses1Mini
implements
CompetencyIndicatorsCourses1Mini
{
competencyIndicatorsCourses0
:
CompetencyIndicatorsCourses0
;
lineNo
:
number
;
companyId
:
string
;
competencyCourseId
:
string
;
behavioralIndicatorsList
:
BehavioralIndicatorsList
[];
constructor
(
data
?:
Partial
<
CompetencyIndicatorsCourses1Mini
>
)
{
this
.
competencyIndicatorsCourses0
=
new
MyCompetencyIndicatorsCourses0
(
data
?.
competencyIndicatorsCourses0
);
this
.
lineNo
=
data
?.
lineNo
??
0
;
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
competencyCourseId
=
data
?.
competencyCourseId
||
""
;
this
.
behavioralIndicatorsList
=
data
?.
behavioralIndicatorsList
?.
map
(
item
=>
new
MyBehavioralIndicatorsList
(
item
))
||
[];
}
}
export
class
MyCompetencyIndicatorsCourses0
implements
CompetencyIndicatorsCourses0
{
competencyTopic
:
CompetencyTopic
;
companyId
:
string
;
edesc
:
string
;
tdesc
:
string
;
indicatorsCourseDetailTh
:
string
;
indicatorsCourseDetailEn
:
string
;
expectation
:
any
;
constructor
(
data
?:
Partial
<
CompetencyIndicatorsCourses0
>
)
{
this
.
competencyTopic
=
new
CompetencyTopicModel
(
data
?.
competencyTopic
);
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
edesc
=
data
?.
edesc
||
""
;
this
.
tdesc
=
data
?.
tdesc
||
""
;
this
.
indicatorsCourseDetailTh
=
data
?.
indicatorsCourseDetailTh
||
""
;
this
.
indicatorsCourseDetailEn
=
data
?.
indicatorsCourseDetailEn
||
""
;
this
.
expectation
=
data
?.
expectation
??
null
;
}
}
export
class
MyBehavioralIndicatorsList
implements
BehavioralIndicatorsList
{
competencyIndicators1
:
CompetencyIndicators1
;
runNo
:
number
;
companyId
:
string
;
assessmentId
:
string
;
behavioralIndicators
:
string
;
competencyBehavioral
:
CompetencyBehavioral
;
constructor
(
data
?:
Partial
<
BehavioralIndicatorsList
>
)
{
this
.
competencyIndicators1
=
new
MyCompetencyIndicators1
(
data
?.
competencyIndicators1
);
this
.
runNo
=
data
?.
runNo
??
0
;
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
assessmentId
=
data
?.
assessmentId
||
""
;
this
.
behavioralIndicators
=
data
?.
behavioralIndicators
||
""
;
this
.
competencyBehavioral
=
new
MyCompetencyBehavioral
(
data
?.
competencyBehavioral
);
}
}
export
class
MyCompetencyIndicators1
implements
CompetencyIndicators1
{
competencyIndicatorsCourses0
:
CompetencyIndicatorsCourses02
;
lineNo
:
number
;
companyId
:
string
;
competencyCourseId
:
string
;
constructor
(
data
?:
Partial
<
CompetencyIndicators1
>
)
{
this
.
competencyIndicatorsCourses0
=
new
MyCompetencyIndicatorsCourses0
(
data
?.
competencyIndicatorsCourses0
);
this
.
lineNo
=
data
?.
lineNo
??
0
;
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
competencyCourseId
=
data
?.
competencyCourseId
||
""
;
}
}
export
class
MyCompetencyBehavioral
implements
CompetencyBehavioral
{
scoreTopicExpectation
:
number
;
companyId
:
string
;
constructor
(
data
?:
Partial
<
CompetencyBehavioral
>
)
{
this
.
scoreTopicExpectation
=
data
?.
scoreTopicExpectation
??
0
;
this
.
companyId
=
data
?.
companyId
||
""
;
}
}
export
class
MyGroupAssessmentMini
implements
GroupAssessmentMini
{
personalLevel
:
PersonalLevel
;
competencyIndicatorsCourses1Mini
:
any
;
companyId
:
string
;
edesc
:
any
;
tdesc
:
any
;
constructor
(
data
?:
Partial
<
GroupAssessmentMini
>
)
{
this
.
personalLevel
=
new
MyPersonalLevel
(
data
?.
personalLevel
);
this
.
competencyIndicatorsCourses1Mini
=
data
?.
competencyIndicatorsCourses1Mini
??
null
;
this
.
companyId
=
data
?.
companyId
||
""
;
this
.
edesc
=
data
?.
edesc
??
null
;
this
.
tdesc
=
data
?.
tdesc
??
null
;
}
}
export
class
MyPersonalLevel
implements
PersonalLevel
{
plId
:
string
;
tdesc
:
any
;
edesc
:
any
;
companyId
:
any
;
constructor
(
data
?:
Partial
<
PersonalLevel
>
)
{
this
.
plId
=
data
?.
plId
||
""
;
this
.
tdesc
=
data
?.
tdesc
??
null
;
this
.
edesc
=
data
?.
edesc
??
null
;
this
.
companyId
=
data
?.
companyId
??
null
;
}
}
export
class
CompetencyTopicModel
implements
CompetencyTopic
{
competencyTopicId
:
string
;
competencyType
:
any
;
companyId
:
any
;
edesc
:
any
;
tdesc
:
any
;
competencyDetail
:
any
;
competencyFiles
:
any
;
lineNo
:
any
;
constructor
(
data
:
Partial
<
CompetencyTopic
>
=
{})
{
this
.
competencyTopicId
=
data
.
competencyTopicId
||
""
;
this
.
competencyType
=
data
.
competencyType
??
null
;
this
.
companyId
=
data
.
companyId
??
null
;
this
.
edesc
=
data
.
edesc
??
null
;
this
.
tdesc
=
data
.
tdesc
??
null
;
this
.
competencyDetail
=
data
.
competencyDetail
??
null
;
this
.
competencyFiles
=
data
.
competencyFiles
??
null
;
this
.
lineNo
=
data
.
lineNo
??
null
;
}
}
\ No newline at end of file
src/app/shared/services/evaluation-assessment.service.ts
View file @
13c2c8ba
...
...
@@ -4,6 +4,8 @@ import { Observable } from 'rxjs';
import
{
environment
}
from
'src/environments/environment'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
EvaluationCycleModel
}
from
'../model/evaluation-cycle.model'
;
import
{
AppraisalModel
}
from
'../model/appraisal.model'
;
import
{
AppraisalRoundModel
}
from
'../model/appraisal-aps.model'
;
@
Injectable
({
providedIn
:
'root'
...
...
@@ -19,8 +21,11 @@ export class EvaluationAssessmentService {
getById
(
evaluationRoundId
:
string
):
Observable
<
any
[]
>
{
return
this
.
http
.
get
<
any
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
)
}
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
EvaluationCycleModel
>
{
return
this
.
http
.
get
<
EvaluationCycleModel
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
getApsassessy
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalModel
[]
>
{
return
this
.
http
.
get
<
AppraisalModel
[]
>
(
this
.
urlApi
+
"/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
post
(
body
:
EvaluationCycleModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
...
...
@@ -37,4 +42,14 @@ export class EvaluationAssessmentService {
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
deletemMini
(
body
:
AppraisalRoundModel
[],
apsassessy
:
string
,
evaluationRoundId
:
string
):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
+
'/delete-mini'
+
"/"
+
apsassessy
+
"/"
+
evaluationRoundId
,
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