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
010a45cb
Commit
010a45cb
authored
Apr 16, 2025
by
Mon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เอาโค้ดส่วนที่ไม่ใช้งานออกหน้า การจัดการประสิทธิภาพ
parent
27565d13
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
80 deletions
+3
-80
assessment-types.component.html
...rfomance/assessment-types/assessment-types.component.html
+3
-3
assessment-types.component.ts
...perfomance/assessment-types/assessment-types.component.ts
+0
-77
No files found.
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-types/assessment-types.component.html
View file @
010a45cb
...
@@ -22,9 +22,9 @@
...
@@ -22,9 +22,9 @@
<div
class=
"page px-rem"
>
<div
class=
"page px-rem"
>
<app-datagrid-syncfution
[
searchSettings
]="
searchSettings
"
[
searchText
]="
search
"
[
dataSource
]="
pmstype
.
dataList
"
<app-datagrid-syncfution
[
searchSettings
]="
searchSettings
"
[
searchText
]="
search
"
[
dataSource
]="
pmstype
.
dataList
"
[
checkBoxSetting
]="
false
"
[
columns
]="
columns
"
[
selectedItems
]="
selectedItems
"
[
columns
]="
columns
"
(
sendSelectData
)="
modalStatus=
'edit'
;
selectPmstype
($
event
);
openDialog
()"
(
sendSelectedItems
)="
onSelectItemChange
($
event
)"
>
(
sendSelectData
)="
modalStatus=
'edit'
;
selectPmstype
($
event
);
openDialog
()"
>
</app-datagrid-syncfution>
</app-datagrid-syncfution>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-types/assessment-types.component.ts
View file @
010a45cb
...
@@ -62,11 +62,8 @@ export class AssessmentTypesComponent {
...
@@ -62,11 +62,8 @@ export class AssessmentTypesComponent {
this
.
pmstypeService
.
getList
().
subscribe
({
this
.
pmstypeService
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
pmstype
.
dataList
=
response
.
map
(
x
=>
{
this
.
pmstype
.
dataList
=
response
.
map
(
x
=>
{
this
.
selectedItems
.
data
.
set
(
x
.
pmsTypeId
,
false
)
return
new
MyPmstypeModel
(
x
)
return
new
MyPmstypeModel
(
x
)
})
})
this
.
selectedItems
.
key
=
'pmsTypeId'
this
.
selectedItems
.
count
=
0
this
.
pmstype
.
loading
=
false
this
.
pmstype
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
},
error
:
error
=>
{
...
@@ -117,73 +114,7 @@ export class AssessmentTypesComponent {
...
@@ -117,73 +114,7 @@ export class AssessmentTypesComponent {
}
}
})
})
}
}
deletePmstype
()
{
if
(
!
this
.
numSelectItem
())
{
this
.
showAlert
(
'กรุณาเลือกข้อมูลที่ต้องการลบ'
,
'error'
)
return
}
Swal
.
fire
({
icon
:
'question'
,
title
:
'แจ้งเตือน'
,
text
:
'ยืนยันการลบข้อมูลหรือไม่'
,
showCancelButton
:
true
,
confirmButtonText
:
'ลบข้อมูล'
,
cancelButtonText
:
'ย้อนกลับ'
,
reverseButtons
:
true
,
}).
then
((
result
)
=>
{
if
(
result
.
isConfirmed
)
{
this
.
pmstype
.
loading
=
true
const
selectedKeys
=
Array
.
from
(
this
.
selectedItems
.
data
.
keys
());
const
body
=
this
.
pmstype
.
dataList
.
filter
(
x
=>
selectedKeys
.
includes
(
x
.
pmsTypeId
)
&&
this
.
selectedItems
.
data
.
get
(
x
.
pmsTypeId
)).
map
(
x
=>
new
MyPmstypeModel
(
x
))
this
.
pmstypeService
.
delete
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmstypeList
()
this
.
closeDialog
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmstype
.
loading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmstype
.
loading
=
false
}
})
}
});
}
updatePmstype
(
typeApi
:
'post'
|
'delete'
)
{
let
body
:
PmstypeModel
|
PmstypeModel
[]
switch
(
this
.
modalStatus
)
{
case
(
'delete'
):
{
const
selectedKeys
=
Array
.
from
(
this
.
selectedItems
.
data
.
keys
());
body
=
this
.
pmstype
.
dataList
.
filter
(
x
=>
selectedKeys
.
includes
(
x
.
pmsTypeId
)
&&
this
.
selectedItems
.
data
.
get
(
x
.
pmsTypeId
)).
map
(
x
=>
new
MyPmstypeModel
(
x
))
break
;
}
default
:
{
body
=
new
MyPmstypeModel
(
this
.
pmstype
.
select
)
}
}
this
.
pmstype
.
loading
=
true
this
.
pmstypeService
[
typeApi
]((
body
as
any
)).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmstypeList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmstype
.
loading
=
false
}
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmstype
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
...
@@ -253,15 +184,7 @@ export class AssessmentTypesComponent {
...
@@ -253,15 +184,7 @@ export class AssessmentTypesComponent {
checkPrimary
()
{
checkPrimary
()
{
return
this
.
pmstype
.
dataList
.
find
(
x
=>
x
.
pmsTypeId
==
this
.
pmstype
.
select
.
pmsTypeId
)
return
this
.
pmstype
.
dataList
.
find
(
x
=>
x
.
pmsTypeId
==
this
.
pmstype
.
select
.
pmsTypeId
)
}
}
numSelectItem
()
{
const
selectedKeys
=
Array
.
from
(
this
.
selectedItems
.
data
.
keys
());
const
num
=
this
.
pmstype
.
dataList
.
filter
(
x
=>
selectedKeys
.
includes
(
x
.
pmsTypeId
)
&&
this
.
selectedItems
.
data
.
get
(
x
.
pmsTypeId
)).
length
return
num
}
onSelectItemChange
(
arg
:
any
)
{
this
.
selectedItems
=
arg
}
openDialog
()
{
openDialog
()
{
this
.
dialogRef
=
this
.
dialog
.
open
(
this
.
assessmentTypesModal
,
{
this
.
dialogRef
=
this
.
dialog
.
open
(
this
.
assessmentTypesModal
,
{
...
...
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