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
73cd9771
Commit
73cd9771
authored
Feb 28, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE รอบการประเมิน
parent
0e9ba3b9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
41 deletions
+87
-41
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+1
-1
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
+72
-40
employee.model.ts
src/app/shared/model/employee.model.ts
+4
-0
evaluation-assessment.service.ts
src/app/shared/services/evaluation-assessment.service.ts
+3
-0
styles.scss
src/styles.scss
+7
-0
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
73cd9771
...
...
@@ -95,7 +95,7 @@
id=
"checkbox-{{item.data.evaluationRoundId}}"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
>
</td>
<td
>
<
i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#evaluation-cycle-person-modal"
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i
>
<
!-- <i class="ti ti-user cursor-pointer i-gray fs-l px-1" data-hs-overlay="#evaluation-cycle-person-modal" (click)="openModal('evaluation-cycle-person-modal',item.data.evaluationRoundId)"></i> --
>
<label
for=
"checkbox-{{item.data.evaluationRoundId}}"
>
{{item.data.evaluationRoundId}}
</label>
</td>
<td>
{{item.data.tdesc}}
</td>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/document-form/edit-evaluation-form/edit-evaluation-form.component.html
View file @
73cd9771
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 @
73cd9771
...
...
@@ -25,25 +25,32 @@ export class EditEvaluationFormComponent {
assessmentList
:
AppraisalModel
[]
=
[]
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
isChecked
:
boolean
=
false
;
isChecked
:
boolean
=
false
;
apsassessy
=
""
empassessmentList
:
AppraisalModel
[]
=
[]
searchEmp
=
""
empassessmentRoundList
:
AppraisalRoundModel
[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
empassessmentRoundListCheckbox
:
{
checkbox
:
boolean
,
item
:
AppraisalRoundModel
}[]
=
[]
currentPageRound
=
1
pageRound
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
searchRound
=
""
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
selectEmp
:
AppraisalModel
=
new
MyAppraisalModel
()
numDataListChecked
=
0
msg
=
""
typeForm
=
""
selectData
:
AppraisalRoundModel
=
new
MyAppraisalRoundModel
()
loading
=
false
indicatorsList
:
AppraisalRoundModel
[]
=
[]
searchIndicator
=
""
currentPageIndicator
=
1
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
...
...
@@ -106,36 +113,35 @@ export class EditEvaluationFormComponent {
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
typeForm
=
type
??
""
if
(
id
==
'modal-alert'
)
{
if
(
type
==
'deleteForm'
)
{
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
typeForm
=
type
??
""
if
(
id
==
'modal-alert'
)
{
if
(
type
==
'deleteForm'
)
{
this
.
msg
=
'ยืนยันการลบรายการ'
}
else
if
(
type
==
'addForm'
)
{
}
else
if
(
type
==
'addForm'
)
{
this
.
msg
=
'ยืนยันการบันทึกรายการ'
}
}
if
(
id
)
{
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
);
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ closeModalClass ~ modal:"
,
modal
)
if
(
id
)
{
modal
?.
classList
.
add
(
"hidden"
);
// ซ่อน Modal
}
}
saveAssessmentList
()
{
...
...
@@ -155,41 +161,67 @@ export class EditEvaluationFormComponent {
}
}
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
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
({
console
.
log
(
"🚀 ~ EditEvaluationFormComponent ~ openAddRoundModel ~ this.selectEmp:"
,
this
.
selectEmp
)
this
.
openModalClass
(
model
);
this
.
evaluationRoundId
=
evaluationRoundId
this
.
apsassessy
=
apsassessy
this
.
getApsassessy
()
this
.
getApsassessyMini
();
this
.
getIndicators
();
}
getIndicators
()
{
this
.
evaluationAssessmentService
.
getIndicators
(
this
.
selectEmp
.
apsassessy
.
pl
.
plId
).
subscribe
({
next
:
response
=>
{
this
.
indicatorsList
=
response
this
.
cdr
.
detectChanges
();
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
filterIndicators
()
{
return
this
.
indicatorsList
.
filter
(
x
=>
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
tdesc
?.
toLowerCase
()?.
includes
(
this
.
searchIndicator
?.
toLowerCase
()
??
""
)
||
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
edesc
?.
toLowerCase
()?.
includes
(
this
.
searchIndicator
?.
toLowerCase
()
??
""
)
||
x
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
?.
toLowerCase
()?.
includes
(
this
.
searchIndicator
?.
toLowerCase
()
??
""
))
}
searchIndicatorsChange
()
{
this
.
currentPageIndicator
=
1
;
const
filteredData
=
this
.
filterIndicators
();
this
.
pageIndicator
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
getApsassessy
()
{
this
.
loading
=
true
this
.
evaluationAssessmentService
.
getApsassessy
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
empassessmentList
=
response
this
.
cdr
.
detectChanges
();
this
.
loading
=
false
},
error
:
err
=>
{
this
.
loading
=
false
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
})
}
})
}
getApsassessyMini
(){
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
getApsassessyMini
()
{
this
.
evaluationAssessmentService
.
getApsassessyMini
(
this
.
evaluationRoundId
,
this
.
apsassessy
).
subscribe
({
next
:
response
=>
{
this
.
empassessmentRoundList
=
response
this
.
empassessmentRoundListCheckbox
=
this
.
empassessmentRoundList
.
map
(
item
=>
({
checkbox
:
false
,
item
}))
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
?.
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
()
??
""
))
}
...
...
@@ -204,32 +236,32 @@ export class EditEvaluationFormComponent {
this
.
checkempassessmentRoundListCheckbox
();
}
checkempassessmentRoundListCheckbox
(){
checkempassessmentRoundListCheckbox
()
{
this
.
numDataListChecked
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
length
this
.
isChecked
=
this
.
numDataListChecked
?
true
:
false
}
deleteFormOne
(
item
:
AppraisalRoundModel
)
{
deleteFormOne
(
item
:
AppraisalRoundModel
)
{
this
.
selectData
=
item
}
deleteAssessment
()
{
let
body
=
this
.
empassessmentRoundListCheckbox
.
filter
(
x
=>
x
.
checkbox
).
map
(
x
=>
x
.
item
)
if
(
this
.
typeForm
==
'deleteFormOne'
)
{
if
(
this
.
typeForm
==
'deleteFormOne'
)
{
body
=
[
this
.
selectData
]
}
if
(
body
.
length
==
0
)
{
if
(
body
.
length
==
0
)
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
)
return
}
this
.
evaluationAssessmentService
.
deletemMini
(
body
,
this
.
selectEmp
.
apsassessy
.
employeeId
,
this
.
selectEmp
.
masfromEvaluationRound
.
evaluationRoundId
).
subscribe
({
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'
)
}
}
}
})
}
...
...
src/app/shared/model/employee.model.ts
View file @
73cd9771
...
...
@@ -110,6 +110,7 @@ export interface EmployeeModel {
ssoFlag
:
string
thFullName
:
string
engFullName
:
string
pl
:
PLModel
}
export
class
MyEmployeeModel
implements
EmployeeModel
{
...
...
@@ -198,6 +199,7 @@ export class MyEmployeeModel implements EmployeeModel {
ssoFlag
:
string
thFullName
:
string
engFullName
:
string
pl
:
PLModel
constructor
(
data
?:
Partial
<
EmployeeModel
>
)
{
this
.
employeeId
=
data
?.
employeeId
||
""
this
.
prefix
=
new
MyPrefixModel
(
data
?.
prefix
||
{})
...
...
@@ -284,6 +286,8 @@ export class MyEmployeeModel implements EmployeeModel {
this
.
ssoFlag
=
data
?.
ssoFlag
||
""
this
.
thFullName
=
data
?.
thFullName
||
""
this
.
engFullName
=
data
?.
engFullName
||
""
this
.
pl
=
new
MyPLModel
(
data
?.
workarea
||
{})
}
}
src/app/shared/services/evaluation-assessment.service.ts
View file @
73cd9771
...
...
@@ -27,6 +27,9 @@ export class EvaluationAssessmentService {
getApsassessyMini
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/mini/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
getIndicators
(
plId
:
string
):
Observable
<
AppraisalRoundModel
[]
>
{
return
this
.
http
.
get
<
AppraisalRoundModel
[]
>
(
this
.
urlApi
+
"/indicators/list/"
+
plId
)
}
post
(
body
:
EvaluationCycleModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
...
...
src/styles.scss
View file @
73cd9771
...
...
@@ -375,4 +375,10 @@ ngx-dropzone {
}
.
\
!
width-70
{
width
:
70%
!
important
;
}
.
\
!
box-modal
{
box-shadow
:
0px
0px
0px
9999px
rgba
(
0
,
0
,
0
,
0
.25
)
!
important
;
-webkit-box-shadow
:
0px
0px
0px
9999px
rgba
(
0
,
0
,
0
,
0
.25
)
!
important
;
-moz-box-shadow
:
0px
0px
0px
9999px
rgba
(
0
,
0
,
0
,
0
.25
)
!
important
;
}
\ No newline at end of file
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