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
63c6a8ac
Commit
63c6a8ac
authored
Apr 16, 2025
by
DESKTOP-E3GSHH7\myhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การประเมินจัดการประสิทธิภาพ>ทะเบียนกำหนดชื่อ
parent
64a5c116
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
50 deletions
+58
-50
assessment-topics.component.ts
...rfomance/assessment-topics/assessment-topics.component.ts
+1
-0
assessment-types.component.html
...rfomance/assessment-types/assessment-types.component.html
+0
-0
assessment-types.component.ts
...perfomance/assessment-types/assessment-types.component.ts
+57
-50
No files found.
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-topics/assessment-topics.component.ts
View file @
63c6a8ac
...
...
@@ -76,6 +76,7 @@ export class AssessmentTopicsComponent {
selectPmstype
(
data
?:
PmstypeModel
)
{
this
.
pmstopic
.
select
.
pmsType
=
new
MyPmstypeModel
(
data
)
}
getPmstopicList
()
{
this
.
pmstopic
.
loading
=
true
this
.
pmstopicService
.
getList
().
subscribe
({
...
...
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-types/assessment-types.component.html
View file @
63c6a8ac
This diff is collapsed.
Click to expand it.
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-types/assessment-types.component.ts
View file @
63c6a8ac
...
...
@@ -3,20 +3,39 @@ import { ToastrService } from 'ngx-toastr';
import
{
MyPmstypeModel
,
PmstypeModel
}
from
'src/app/shared/model/pmstype.model'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
PmstypeService
}
from
'src/app/shared/services/pmstype.service'
;
import
{
ColumnModel
}
from
'@syncfusion/ej2-grids'
;
@
Component
({
selector
:
'app-assessment-types'
,
templateUrl
:
'./assessment-types.component.html'
,
styleUrls
:
[
'./assessment-types.component.scss'
]
})
export
class
AssessmentTypesComponent
{
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pmstype
:
{
loading
:
boolean
,
select
:
PmstypeModel
,
dataList
:
PmstypeModel
[]
}
=
{
loading
:
false
,
select
:
new
MyPmstypeModel
(),
dataList
:
[]
}
modalStatus
:
"add"
|
"edit"
|
'delete'
=
"add"
columns
:
ColumnModel
[]
=
[{
field
:
"pmsTypeId"
,
headerText
:
"รหัส"
,
type
:
"string"
,
isPrimaryKey
:
true
,
},
{
field
:
"tdesc"
,
headerText
:
"ชื่อประเภท"
,
type
:
"string"
},
{
field
:
"shortName"
,
headerText
:
"ชื่อย่อ"
,
type
:
"string"
}]
searchSettings
=
{
fields
:
[
'pmsTypeId'
,
'tdesc'
,
'shortName'
],
operator
:
'contains'
,
ignoreCase
:
false
};
search
=
""
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
pmstype
:
{
loading
:
boolean
,
select
:
PmstypeModel
,
dataList
:
{
check
:
boolean
,
data
:
PmstypeModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyPmstypeModel
(),
dataList
:
[]
}
modalStatus
:
"add"
|
"edit"
|
'delete'
|
'deleteGroup'
=
"add"
selectedItems
:
{
key
:
string
,
count
:
number
,
data
:
Map
<
string
,
boolean
>
}
=
{
key
:
''
,
count
:
0
,
data
:
new
Map
<
string
,
boolean
>
()
};
selectedFile
:
File
|
null
=
null
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
...
...
@@ -33,13 +52,16 @@ export class AssessmentTypesComponent {
getPmstypeList
()
{
this
.
pmstype
.
loading
=
true
this
.
selectedItems
.
data
.
clear
()
this
.
pmstypeService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
pmstype
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyPmstypeModel
(
x
)
}))
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
pmstype
.
dataList
=
response
.
map
(
x
=>
{
this
.
selectedItems
.
data
.
set
(
x
.
pmsTypeId
,
false
)
return
new
MyPmstypeModel
(
x
)
})
this
.
selectedItems
.
key
=
'pmsTypeId'
this
.
selectedItems
.
count
=
0
this
.
pmstype
.
loading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
pmstype
.
loading
=
false
...
...
@@ -47,27 +69,24 @@ export class AssessmentTypesComponent {
}
})
}
pmstypeListFilter
()
{
return
this
.
pmstype
.
dataList
.
filter
(
x
=>
{
const
data
=
x
.
data
const
match
=
data
.
pmsTypeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
shortName
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
return
match
})
}
selectPmstype
(
data
?:
PmstypeModel
)
{
this
.
pmstype
.
select
=
new
MyPmstypeModel
(
data
)
if
(
data
)
{
this
.
pmstype
.
select
=
new
MyPmstypeModel
(
data
)
}
else
if
(
this
.
modalStatus
==
'add'
)
{
this
.
pmstype
.
select
=
new
MyPmstypeModel
()
}
else
if
(
this
.
modalStatus
==
'edit'
)
{
this
.
pmstype
.
select
=
new
MyPmstypeModel
({
pmsTypeId
:
this
.
pmstype
.
select
.
pmsTypeId
})
}
}
updatePmstype
(
typeApi
:
'post'
|
'delete'
)
{
let
body
:
PmstypeModel
|
PmstypeModel
[]
switch
(
this
.
modalStatus
)
{
case
(
'delete'
):
{
body
=
[
new
MyPmstypeModel
(
this
.
pmstype
.
select
)]
break
;
}
case
(
'deleteGroup'
):
{
body
=
this
.
pmstype
.
dataList
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyPmstypeModel
(
x
.
data
))
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
:
{
...
...
@@ -80,7 +99,6 @@ export class AssessmentTypesComponent {
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmstypeList
()
this
.
searchChange
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmstype
.
loading
=
false
...
...
@@ -152,25 +170,6 @@ export class AssessmentTypesComponent {
}
dataListCheckAll
()
{
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
pmstype
.
dataList
.
filter
(
x
=>
{
const
data
=
x
.
data
const
match
=
data
.
pmsTypeId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
shortName
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
return
match
}).
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
pmstypeListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
pmstype
.
dataList
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
clearPmstype
(
modalStatus
:
string
)
{
if
(
modalStatus
==
'add'
)
{
this
.
selectPmstype
()
...
...
@@ -178,12 +177,20 @@ export class AssessmentTypesComponent {
this
.
selectPmstype
(
new
MyPmstypeModel
({
pmsTypeId
:
this
.
pmstype
.
select
.
pmsTypeId
}))
}
}
searchChange
()
{
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
pmstypeListFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
()
checkPrimary
()
{
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
}
}
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