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
61a21b06
Commit
61a21b06
authored
Feb 27, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การประเมินสมรรถนะ
การจัดการสมรรถนะ จัดกลุ่มสมรรถนะ แก้ไขกลุ่มสมรรถนะ
parent
2a3d1080
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
81 deletions
+21
-81
edit-group-competencies.component.ts
...t-group-competencies/edit-group-competencies.component.ts
+11
-4
round-one.component.ts
...on/supervisor-evaluation/round-one/round-one.component.ts
+6
-77
appraisal.service.ts
src/app/shared/services/appraisal.service.ts
+4
-0
No files found.
src/app/components/competency-assessment/competency-management/group-competencies/edit-group-competencies/edit-group-competencies.component.ts
View file @
61a21b06
...
...
@@ -158,10 +158,17 @@ export class EditGroupCompetenciesComponent {
}
deleteGroupAssessmentById
()
{
this
.
dataList
=
this
.
dataList
.
filter
((
item
,
i
)
=>
(
this
.
groupAssessmentIndex
==
-
1
?
!
item
.
check
:
i
!=
this
.
groupAssessmentIndex
));
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
cdr
.
detectChanges
();
if
(
this
.
groupAssessmentIndex
==
-
1
)
{
this
.
dataList
=
this
.
dataList
.
filter
(
item
=>
!
item
.
check
);
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
cdr
.
detectChanges
();
}
else
{
this
.
dataList
=
this
.
dataList
.
splice
(
this
.
groupAssessmentIndex
,
1
)
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
cdr
.
detectChanges
();
}
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
...
...
src/app/components/performance-evaluation/supervisor-evaluation/round-one/round-one.component.ts
View file @
61a21b06
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
@
Component
({
selector
:
'app-round-one'
,
templateUrl
:
'./round-one.component.html'
,
styleUrls
:
[
'./round-one.component.scss'
]
})
export
class
RoundOneComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'ทะเบียนเครื่องมือ'
,
'เครื่องมือประเมิน'
];
export
class
RoundOneComponent
{
@
Input
()
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'ทะเบียนเครื่องมือ'
,
'เครื่องมือประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPageEvalution
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
sendEmployeeId
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
isChecked
:
boolean
=
false
;
// ฟังก์ชันในการเปลี่ยนแท็บ
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินสมรรถนะ'
,
'ทะเบียนเครื่องมือ'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
toggleCheckbox
():
void
{
this
.
isChecked
=
!
this
.
isChecked
;
}
// การจัดการการเปิดปิด modal
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
};
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
document
.
body
.
style
.
overflow
=
'hidden'
;
}
closeModal
(
name
:
string
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
isAnyModalOpen
())
{
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
}
}
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
addUser
()
{
}
currentModal
=
""
constructor
(
private
toastr
:
ToastrService
)
{
}
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
constructor
(
private
appraisalService
:
AppraisalService
)
{
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
getBossList
(){
}
returnPage
(
text
:
string
)
{
this
.
sendEmployeeId
.
emit
()
...
...
src/app/shared/services/appraisal.service.ts
View file @
61a21b06
...
...
@@ -22,4 +22,7 @@ export class AppraisalService {
postCompetency
(
body
:
AppraisalCompentencyModel2
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
+
"/competency"
,
body
)
}
getBossList
():
Observable
<
AppraisalCompentencyModel2
>
{
return
this
.
http
.
get
<
AppraisalCompentencyModel2
>
(
this
.
urlApi
+
"/appraisal/boss/emp"
)
}
}
\ 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