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
ec6babb4
Commit
ec6babb4
authored
Sep 05, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ข้อมูลทั่วไป ปัจจัยการประเมินสมรรถนะ
parent
d4c487e6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
402 additions
and
17 deletions
+402
-17
competency-define-evaluation-factors.component.html
...ctors/competency-define-evaluation-factors.component.html
+174
-0
competency-define-evaluation-factors.component.scss
...ctors/competency-define-evaluation-factors.component.scss
+0
-0
competency-define-evaluation-factors.component.ts
...factors/competency-define-evaluation-factors.component.ts
+115
-0
competency-evaluation-factors.component.html
...tion-factors/competency-evaluation-factors.component.html
+26
-0
competency-evaluation-factors.component.scss
...tion-factors/competency-evaluation-factors.component.scss
+0
-0
competency-evaluation-factors.component.ts
...uation-factors/competency-evaluation-factors.component.ts
+11
-0
dashboard-routing.module.ts
src/app/components/dashboard/dashboard-routing.module.ts
+2
-0
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+0
-0
import-data.component.html
...-detail-management/import-data/import-data.component.html
+14
-3
import-data.component.ts
...ob-detail-management/import-data/import-data.component.ts
+59
-14
navservice.ts
src/app/shared/services/navservice.ts
+1
-0
No files found.
src/app/components/competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component.html
0 → 100644
View file @
ec6babb4
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<div
class=
"absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"
>
<i
class=
"ri-search-line text-gray"
></i>
</div>
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-success h-45px m-0 shadow-md"
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
>
<i
class=
"ri-save-3-line"
></i>
Save
</button>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clear
()"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
<g
id=
"SVGRepo_bgCarrier"
stroke-width=
"0"
></g>
<g
id=
"SVGRepo_tracerCarrier"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></g>
<g
id=
"SVGRepo_iconCarrier"
>
<path
d=
"M15 49A24 24 0 0 1 32 8"
></path>
<path
d=
"M49 15a24 24 0 0 1-17 41"
></path>
<polyline
points=
"15.03 40 15.03 48.97 8 48.97"
></polyline>
<polyline
points=
"48.97 24 48.97 15.03 56 15.03"
></polyline>
</g>
</svg>
Clear
</button>
</div>
<!-- <div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
Help
</button>
</div> -->
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto rounded-top-0.65rem"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<ng-container
*
ngFor=
"let item of pmsEaluationFactorsTableHeader; let f = first; let l = last"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"pmsEaluationFactors.loading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!pmsEaluationFactors.loading&&!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!pmsEaluationFactors.loading&&dataListFilter().length"
>
<tr
*
ngFor=
"let pmsEaluationFactors of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<span>
{{pmsEaluationFactors.personalLevel.plId }}
</span>
</td>
<td
*
ngFor=
"let item of pmsEaluationFactors.pmsEvaluationFactors1ModelList"
>
<input
type=
"text"
class=
"ti-form-input"
oninput=
"this.value = this.value.replace(/\D/g, '')"
[(
ngModel
)]="
item
.
pmsScore
"
>
</td>
<td
class=
"text-center"
>
{{calPmsEaluationFactors1Total(pmsEaluationFactors.pmsEvaluationFactors1ModelList) }}
</td>
</tr>
</tbody>
</table>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
<div
id=
"define-evaluation-factors-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#define-evaluation-factors-alert-modal"
(
click
)="
savePmsEaluationFactors
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component.scss
0 → 100644
View file @
ec6babb4
src/app/components/competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component.ts
0 → 100644
View file @
ec6babb4
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyPmsEvaluationFactorsModel
,
PmsEvaluationFactorsModel
}
from
'src/app/shared/model/pms-ealuation-factors.model'
;
import
{
MyPmsEaluationFactors1Model
,
PmsEaluationFactors1Model
}
from
'src/app/shared/model/pms-ealuation-factors1.model'
;
import
{
MyPmstypeModel
}
from
'src/app/shared/model/pmstype.model'
;
import
{
PmsEaluationFactorsService
}
from
'src/app/shared/services/pms-ealuation-factors.service'
;
@
Component
({
selector
:
'app-competency-define-evaluation-factors'
,
templateUrl
:
'./competency-define-evaluation-factors.component.html'
,
styleUrls
:
[
'./competency-define-evaluation-factors.component.scss'
]
})
export
class
CompetencyDefineEvaluationFactorsComponent
{
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
pmsEaluationFactors
:
{
loading
:
boolean
,
dataList
:
PmsEvaluationFactorsModel
[]
}
=
{
loading
:
false
,
dataList
:
[]
}
pmsEaluationFactorsTableHeader
:
string
[]
=
[
'ลักษณะงาน'
]
constructor
(
private
pmsEaluationFactorsService
:
PmsEaluationFactorsService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
)
{
}
ngOnInit
():
void
{
this
.
getPmsEaluationFactorsList
()
}
getPmsEaluationFactorsList
()
{
this
.
pmsEaluationFactors
.
loading
=
true
this
.
pmsEaluationFactorsTableHeader
=
[
'ลักษณะงาน'
]
this
.
pmsEaluationFactorsService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
pmsEaluationFactors
.
dataList
=
response
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
(
x
))
this
.
pmsEaluationFactors
.
loading
=
false
const
maxItem
=
this
.
pmsEaluationFactors
.
dataList
.
reduce
((
max
,
item
)
=>
item
.
pmsEvaluationFactors1ModelList
.
length
>
max
.
pmsEvaluationFactors1ModelList
.
length
?
item
:
max
,
this
.
pmsEaluationFactors
.
dataList
[
0
]
);
const
pmsTypeIds
=
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
pmsTypeId
)
||
[];
this
.
pmsEaluationFactorsTableHeader
=
this
.
pmsEaluationFactorsTableHeader
.
concat
(
maxItem
?.
pmsEvaluationFactors1ModelList
.
map
(
x
=>
x
.
pmsType
.
tdesc
)
||
[]).
concat
([
'รวม'
])
this
.
pmsEaluationFactors
.
dataList
.
forEach
(
x
=>
{
while
(
x
.
pmsEvaluationFactors1ModelList
.
length
<
5
)
{
const
usedTypes
=
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
y
.
pmsType
.
pmsTypeId
);
const
remainingTypes
=
pmsTypeIds
.
filter
(
type
=>
!
usedTypes
.
includes
(
type
));
if
(
remainingTypes
.
length
===
0
)
{
break
}
const
pmsTypeId
=
remainingTypes
[
0
];
x
.
pmsEvaluationFactors1ModelList
.
push
(
new
MyPmsEaluationFactors1Model
({
pmsType
:
new
MyPmstypeModel
({
pmsTypeId
})
})
)
}
x
.
pmsEvaluationFactors1ModelList
.
sort
((
a
,
b
)
=>
+
(
a
.
pmsType
.
pmsTypeId
)
-
+
(
b
.
pmsType
.
pmsTypeId
))
})
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
pmsEaluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
savePmsEaluationFactors
()
{
this
.
pmsEaluationFactors
.
loading
=
true
const
body
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1Model
({
...
y
,
pmsScore
:
+
(
y
.
pmsScore
)
}))
}))
this
.
pmsEaluationFactorsService
.
post
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmsEaluationFactorsList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsEaluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsEaluationFactors
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
clear
()
{
this
.
pmsEaluationFactors
.
dataList
=
this
.
pmsEaluationFactors
.
dataList
.
map
(
x
=>
new
MyPmsEvaluationFactorsModel
({
...
x
,
pmsEvaluationFactors1ModelList
:
x
.
pmsEvaluationFactors1ModelList
.
map
(
y
=>
new
MyPmsEaluationFactors1Model
({
...
y
,
pmsScore
:
0
}))
}))
}
calPmsEaluationFactors1Total
(
data
:
PmsEaluationFactors1Model
[])
{
return
data
.
reduce
((
sum
,
num
)
=>
sum
+
+
(
num
.
pmsScore
),
0
);
}
dataListFilter
()
{
return
this
.
pmsEaluationFactors
.
dataList
.
filter
(
x
=>
x
.
personalLevel
.
plId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
}
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
})
}
}
src/app/components/competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component.html
0 → 100644
View file @
ec6babb4
<app-page-header
[
pathTitle
]="
pathTitle
"
></app-page-header>
<div
class=
"bg-card-white"
>
</div>
<div
class=
"block-main-content"
>
<div
class=
"font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem"
>
ปัจจัยการประเมินสมรรถนะ
</div>
<div
class=
"page pt-0.75rem"
>
<div
class=
"border-b border-gray-200 dark:border-white/10 px-2rem"
>
<nav
class=
"-mb-0.5 flex space-x-6 rtl:space-x-reverse"
>
<a
class=
"text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
href=
"javascript:void(0);"
id=
"underline-item-1"
data-hs-tab=
"#underline-1"
aria-controls=
"underline-1"
>
กำหนดปัจจัยการประเมินสมรรถนะ
</a>
</nav>
</div>
<div
class=
"px-2rem pt-50px"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<app-competency-define-evaluation-factors></app-competency-define-evaluation-factors>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component.scss
0 → 100644
View file @
ec6babb4
src/app/components/competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component.ts
0 → 100644
View file @
ec6babb4
import
{
Component
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-competency-evaluation-factors'
,
templateUrl
:
'./competency-evaluation-factors.component.html'
,
styleUrls
:
[
'./competency-evaluation-factors.component.scss'
]
})
export
class
CompetencyEvaluationFactorsComponent
{
pathTitle
=
[
'การประเมินสมรรถนะ'
,
'ปัจจัยการประเมินสมรรถนะ'
,
'กำหนดปัจจัยการประเมินสมรรถนะ'
]
}
\ No newline at end of file
src/app/components/dashboard/dashboard-routing.module.ts
View file @
ec6babb4
...
@@ -57,6 +57,7 @@ import { ExcelReportComponent } from '../excel-report/excel-report.component';
...
@@ -57,6 +57,7 @@ import { ExcelReportComponent } from '../excel-report/excel-report.component';
import
{
SettingIndividualKpiComponent
}
from
'../setting-individual-kpi/setting-individual-kpi.component'
;
import
{
SettingIndividualKpiComponent
}
from
'../setting-individual-kpi/setting-individual-kpi.component'
;
import
{
SettingIndividualKpiSupervisorComponent
}
from
'../setting-individual-kpi-supervisor/setting-individual-kpi-supervisor.component'
;
import
{
SettingIndividualKpiSupervisorComponent
}
from
'../setting-individual-kpi-supervisor/setting-individual-kpi-supervisor.component'
;
import
{
JobDescriptionEssComponent
}
from
'../job-description-ess/job-description-ess.component'
;
import
{
JobDescriptionEssComponent
}
from
'../job-description-ess/job-description-ess.component'
;
import
{
CompetencyEvaluationFactorsComponent
}
from
'../competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component'
;
...
@@ -107,6 +108,7 @@ const routes: Routes = [
...
@@ -107,6 +108,7 @@ const routes: Routes = [
{
path
:
"ess/pms-evaluation"
,
title
:
'ประเมินผล PMS'
,
component
:
PmsFormEmployeeComponent
},
{
path
:
"ess/pms-evaluation"
,
title
:
'ประเมินผล PMS'
,
component
:
PmsFormEmployeeComponent
},
{
path
:
"admin/employee-registration"
,
title
:
'ทะเบียนพนักงาน'
,
component
:
EmployeeRegistrationComponent
},
{
path
:
"admin/employee-registration"
,
title
:
'ทะเบียนพนักงาน'
,
component
:
EmployeeRegistrationComponent
},
{
path
:
"admin/name-registration-perfomance"
,
title
:
'ทะเบียนกำหนดชื่อ'
,
component
:
NameRegistrationPerfomanceComponent
},
{
path
:
"admin/name-registration-perfomance"
,
title
:
'ทะเบียนกำหนดชื่อ'
,
component
:
NameRegistrationPerfomanceComponent
},
{
path
:
"admin/competency-evaluation-factors"
,
title
:
'ปัจจัยการประเมินสมรรถนะ'
,
component
:
CompetencyEvaluationFactorsComponent
},
{
path
:
"admin/evaluation-factors"
,
title
:
'การประเมินจัดการประสิทธิภาพ'
,
component
:
EvaluationFactorsComponent
},
{
path
:
"admin/evaluation-factors"
,
title
:
'การประเมินจัดการประสิทธิภาพ'
,
component
:
EvaluationFactorsComponent
},
{
path
:
"admin/grade-registration"
,
title
:
'ทะเบียนเกรด'
,
component
:
GradeRegistrationComponent
},
{
path
:
"admin/grade-registration"
,
title
:
'ทะเบียนเกรด'
,
component
:
GradeRegistrationComponent
},
{
path
:
"admin/grade-registration-sub"
,
title
:
'ทะเบียนเกรด'
,
component
:
PmsGradeRegistrationComponent
},
{
path
:
"admin/grade-registration-sub"
,
title
:
'ทะเบียนเกรด'
,
component
:
PmsGradeRegistrationComponent
},
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
ec6babb4
This diff is collapsed.
Click to expand it.
src/app/components/job-detail-components/job-detail-management/import-data/import-data.component.html
View file @
ec6babb4
...
@@ -149,9 +149,20 @@
...
@@ -149,9 +149,20 @@
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
ตำแหน่งผู้บังคับบัญชา
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
ตำแหน่งผู้บังคับบัญชา
</label>
<ng-select
class=
"ti-form-select"
data-trigger
name=
"choices-single-position"
<ng-select
class=
"ti-form-select"
data-trigger
name=
"choices-single-position"
id=
"choices-single-position"
[(
ngModel
)]="
supervisorPositionId
"
id=
"choices-single-position"
[(
ngModel
)]="
jd
"
(
ngModelChange
)="
changSupervisorJd
()"
>
(
ngModelChange
)="
changSupervisorPosition
()"
>
<ng-option
*
ngFor=
"let item of jdList"
[
value
]="
item
.
jobCodeId
"
>
{{item.tdesc}}
</ng-option>
<ng-option
*
ngFor=
"let item of positionList"
[
value
]="
item
.
positionId
"
>
{{item.tdesc}}
</ng-option>
</ng-select>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
ระดับพนักงาน
</label>
<ng-select
class=
"ti-form-select"
data-trigger
name=
"choices-single-position"
id=
"choices-single-position"
[(
ngModel
)]="
jl
"
(
ngModelChange
)="
changJl
()"
>
<ng-option
*
ngFor=
"let item of jlList"
[
value
]="
item
.
plId
"
>
{{item.tdesc}}
</ng-option>
</ng-select>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
ระดับความคาดหวัง
</label>
<ng-select
class=
"ti-form-select"
data-trigger
name=
"choices-single-position"
id=
"choices-single-position"
[(
ngModel
)]="
empLevel
"
(
ngModelChange
)="
changEmpLevel
()"
>
<ng-option
*
ngFor=
"let item of ['1','2','3','4','5']"
[
value
]="
item
"
>
{{item}}
</ng-option>
</ng-select>
</ng-select>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
วัตถุประสงค์ของตำแหน่งงาน (Objective)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
วัตถุประสงค์ของตำแหน่งงาน (Objective)
</label>
...
...
src/app/components/job-detail-components/job-detail-management/import-data/import-data.component.ts
View file @
ec6babb4
...
@@ -10,6 +10,8 @@ import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model';
...
@@ -10,6 +10,8 @@ import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model';
import
{
Bu7Model
,
MyBu7Model
}
from
'src/app/shared/model/bu7.model'
;
import
{
Bu7Model
,
MyBu7Model
}
from
'src/app/shared/model/bu7.model'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
JobCodeModel
,
MyJobCodeModel
}
from
'src/app/shared/model/job-code.model'
;
import
{
JobCodeModel
,
MyJobCodeModel
}
from
'src/app/shared/model/job-code.model'
;
import
{
JobcodeModel
,
MyJobcodeModel
}
from
'src/app/shared/model/jobcode.model'
;
import
{
MyPLModel
,
PLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
MyPositionModel
,
PositionModel
}
from
'src/app/shared/model/position.model'
;
import
{
MyPositionModel
,
PositionModel
}
from
'src/app/shared/model/position.model'
;
import
{
Bu1Service
}
from
'src/app/shared/services/bu1.service'
;
import
{
Bu1Service
}
from
'src/app/shared/services/bu1.service'
;
import
{
Bu2Service
}
from
'src/app/shared/services/bu2.service'
;
import
{
Bu2Service
}
from
'src/app/shared/services/bu2.service'
;
...
@@ -21,6 +23,8 @@ import { Bu7Service } from 'src/app/shared/services/bu7.service';
...
@@ -21,6 +23,8 @@ import { Bu7Service } from 'src/app/shared/services/bu7.service';
import
{
EmployeeService
}
from
'src/app/shared/services/employee.service'
;
import
{
EmployeeService
}
from
'src/app/shared/services/employee.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/job-code.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/job-code.service'
;
import
{
JobcodeService
}
from
'src/app/shared/services/jobcode.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
PositionService
}
from
'src/app/shared/services/position.service'
;
import
{
PositionService
}
from
'src/app/shared/services/position.service'
;
@
Component
({
@
Component
({
...
@@ -62,10 +66,17 @@ export class ImportDataComponent {
...
@@ -62,10 +66,17 @@ export class ImportDataComponent {
bu7List
:
Bu7Model
[]
=
[]
bu7List
:
Bu7Model
[]
=
[]
bu7Id
=
''
bu7Id
=
''
supervisorPositionId
=
''
jdList
:
JobcodeModel
[]
=
[]
jd
=
''
employeeList
:
EmployeeModel
[]
=
[]
employeeList
:
EmployeeModel
[]
=
[]
checkJobCodeId
=
false
checkJobCodeId
=
false
jlList
:
PLModel
[]
=
[]
jl
=
''
empLevel
=
''
currentModal
:
'add'
|
'edit'
|
'delete'
=
"add"
currentModal
:
'add'
|
'edit'
|
'delete'
=
"add"
columns
:
ColumnModel
[]
=
[{
columns
:
ColumnModel
[]
=
[{
field
:
"jobcodeId"
,
field
:
"jobcodeId"
,
...
@@ -92,7 +103,9 @@ export class ImportDataComponent {
...
@@ -92,7 +103,9 @@ export class ImportDataComponent {
constructor
(
constructor
(
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
fileService
:
FileService
,
private
fileService
:
FileService
,
private
jobcodeService
:
JobCodeService
,
private
jobCodeService
:
JobCodeService
,
private
jobcodeService
:
JobcodeService
,
private
pLService
:
PLService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
positionService
:
PositionService
,
private
positionService
:
PositionService
,
private
bu1Service
:
Bu1Service
,
private
bu1Service
:
Bu1Service
,
...
@@ -102,11 +115,12 @@ export class ImportDataComponent {
...
@@ -102,11 +115,12 @@ export class ImportDataComponent {
private
bu5Service
:
Bu5Service
,
private
bu5Service
:
Bu5Service
,
private
bu6Service
:
Bu6Service
,
private
bu6Service
:
Bu6Service
,
private
bu7Service
:
Bu7Service
,
private
bu7Service
:
Bu7Service
,
private
employeeService
:
EmployeeService
private
employeeService
:
EmployeeService
,
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getJlList
();
this
.
getJdList
();
this
.
getListJob
();
this
.
getListJob
();
this
.
getPositionList
();
this
.
getPositionList
();
this
.
getBu1List
();
this
.
getBu1List
();
this
.
getBu2List
();
this
.
getBu2List
();
...
@@ -129,10 +143,30 @@ export class ImportDataComponent {
...
@@ -129,10 +143,30 @@ export class ImportDataComponent {
}
}
getJdList
()
{
this
.
jobcodeService
.
getGroupAssessmentList
().
subscribe
({
next
:
response
=>
{
this
.
jdList
=
response
.
map
(
x
=>
new
MyJobcodeModel
(
x
))
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
cdr
.
detectChanges
()
}
})
}
getJlList
()
{
this
.
pLService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
jlList
=
response
.
map
(
x
=>
new
MyPLModel
(
x
))
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
cdr
.
detectChanges
()
}
})
}
getListJob
()
{
getListJob
()
{
this
.
loading
=
false
this
.
loading
=
false
this
.
selectedItems
.
data
.
clear
()
this
.
selectedItems
.
data
.
clear
()
this
.
job
c
odeService
.
getList
().
subscribe
({
this
.
job
C
odeService
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
jobCodeList
=
response
.
map
((
x
:
any
)
=>
{
this
.
jobCodeList
=
response
.
map
((
x
:
any
)
=>
{
this
.
selectedItems
.
data
.
set
(
x
.
jobcodeId
,
false
)
this
.
selectedItems
.
data
.
set
(
x
.
jobcodeId
,
false
)
...
@@ -158,7 +192,7 @@ export class ImportDataComponent {
...
@@ -158,7 +192,7 @@ export class ImportDataComponent {
this
.
selectJob
=
new
MyJobCodeModel
(
item
)
this
.
selectJob
=
new
MyJobCodeModel
(
item
)
this
.
positionId
=
item
.
position
.
positionId
this
.
positionId
=
item
.
position
.
positionId
this
.
supervisorPositionI
d
=
item
.
supervisorPosition
.
positionId
this
.
j
d
=
item
.
supervisorPosition
.
positionId
this
.
bu1Id
=
item
.
bu1
.
bu1id
this
.
bu1Id
=
item
.
bu1
.
bu1id
this
.
bu2Id
=
item
.
bu2
.
bu2id
this
.
bu2Id
=
item
.
bu2
.
bu2id
this
.
bu3Id
=
item
.
bu3
.
bu3id
this
.
bu3Id
=
item
.
bu3
.
bu3id
...
@@ -171,7 +205,7 @@ export class ImportDataComponent {
...
@@ -171,7 +205,7 @@ export class ImportDataComponent {
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
checkJobCodeId
=
false
this
.
checkJobCodeId
=
false
this
.
positionId
=
''
this
.
positionId
=
''
this
.
supervisorPositionI
d
=
''
this
.
j
d
=
''
this
.
bu1Id
=
''
this
.
bu1Id
=
''
this
.
bu2Id
=
''
this
.
bu2Id
=
''
this
.
bu3Id
=
''
this
.
bu3Id
=
''
...
@@ -186,7 +220,7 @@ export class ImportDataComponent {
...
@@ -186,7 +220,7 @@ export class ImportDataComponent {
this
.
selectJob
.
jobObjective
=
''
this
.
selectJob
.
jobObjective
=
''
this
.
selectJob
.
supervisorPosition
=
new
MyPositionModel
({})
this
.
selectJob
.
supervisorPosition
=
new
MyPositionModel
({})
this
.
supervisorPositionI
d
=
''
this
.
j
d
=
''
this
.
selectJob
.
position
=
new
MyPositionModel
({})
this
.
selectJob
.
position
=
new
MyPositionModel
({})
this
.
positionId
=
''
this
.
positionId
=
''
...
@@ -213,7 +247,7 @@ export class ImportDataComponent {
...
@@ -213,7 +247,7 @@ export class ImportDataComponent {
this
.
bu7Id
=
''
this
.
bu7Id
=
''
}
}
save
()
{
save
()
{
this
.
job
c
odeService
.
post
(
this
.
selectJob
).
subscribe
((
response
:
any
)
=>
{
this
.
job
C
odeService
.
post
(
this
.
selectJob
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
selectJob
=
new
MyJobCodeModel
({})
...
@@ -227,7 +261,7 @@ export class ImportDataComponent {
...
@@ -227,7 +261,7 @@ export class ImportDataComponent {
deleteJob
()
{
deleteJob
()
{
const
selectedKeys
=
Array
.
from
(
this
.
selectedItems
.
data
.
keys
());
const
selectedKeys
=
Array
.
from
(
this
.
selectedItems
.
data
.
keys
());
const
body
=
this
.
jobCodeList
.
filter
(
x
=>
selectedKeys
.
includes
(
x
.
jobcodeId
)
&&
this
.
selectedItems
.
data
.
get
(
x
.
jobcodeId
)).
map
(
x
=>
new
MyJobCodeModel
(
x
))
const
body
=
this
.
jobCodeList
.
filter
(
x
=>
selectedKeys
.
includes
(
x
.
jobcodeId
)
&&
this
.
selectedItems
.
data
.
get
(
x
.
jobcodeId
)).
map
(
x
=>
new
MyJobCodeModel
(
x
))
this
.
job
c
odeService
.
delete
(
body
).
subscribe
((
response
:
any
)
=>
{
this
.
job
C
odeService
.
delete
(
body
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
selectJob
=
new
MyJobCodeModel
({})
...
@@ -312,14 +346,25 @@ export class ImportDataComponent {
...
@@ -312,14 +346,25 @@ export class ImportDataComponent {
this
.
selectJob
.
position
=
new
MyPositionModel
({})
this
.
selectJob
.
position
=
new
MyPositionModel
({})
}
}
}
}
changSupervisor
Position
()
{
changSupervisor
Jd
()
{
let
value
=
this
.
positionList
.
find
(
x
=>
x
.
positionId
==
this
.
supervisorPositionI
d
);
let
value
=
this
.
jdList
.
find
(
x
=>
x
.
jobCodeId
==
this
.
j
d
);
if
(
value
)
{
if
(
value
)
{
this
.
selectJob
.
supervisorPosition
=
value
// this.selectJob.supervisorJD
= value
}
else
{
}
else
{
this
.
selectJob
.
supervisorPosition
=
new
MyPosition
Model
({})
// this.selectJob.supervisorJD = new MyJobcode
Model({})
}
}
}
}
changJl
()
{
let
value
=
this
.
jlList
.
find
(
x
=>
x
.
plId
==
this
.
jd
);
if
(
value
)
{
// this.selectJob.supervisorJD = value
}
else
{
// this.selectJob.supervisorJD = new MyJobcodeModel({})
}
}
changEmpLevel
()
{
// this.selectJob.supervisorJD = this.empLevel
}
getBu1List
()
{
getBu1List
()
{
this
.
bu1Service
.
getList
().
subscribe
({
this
.
bu1Service
.
getList
().
subscribe
({
...
...
src/app/shared/services/navservice.ts
View file @
ec6babb4
...
@@ -223,6 +223,7 @@ export class NavService implements OnDestroy {
...
@@ -223,6 +223,7 @@ export class NavService implements OnDestroy {
{
id
:
'm44'
,
path
:
'admin/tool-register'
,
title
:
'ทะเบียนเครื่องมือ'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm44'
,
path
:
'admin/tool-register'
,
title
:
'ทะเบียนเครื่องมือ'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm45'
,
path
:
'admin/course-registration'
,
title
:
'ทะเบียนหลักสูตร'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm45'
,
path
:
'admin/course-registration'
,
title
:
'ทะเบียนหลักสูตร'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm46'
,
path
:
'admin/idp-development-plan'
,
title
:
'แผนพัฒนา IDP'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm46'
,
path
:
'admin/idp-development-plan'
,
title
:
'แผนพัฒนา IDP'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm465'
,
path
:
'admin/competency-evaluation-factors'
,
title
:
'ปัจจัยการประเมินสมรรถนะ'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm47'
,
path
:
'admin/competency-management'
,
title
:
'การจัดการสมรรถนะ'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm47'
,
path
:
'admin/competency-management'
,
title
:
'การจัดการสมรรถนะ'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm48'
,
path
:
'admin/evaluation-cycle-manager'
,
title
:
'การจัดการรอบการประเมิน'
,
type
:
'link'
,
show
:
true
},
{
id
:
'm48'
,
path
:
'admin/evaluation-cycle-manager'
,
title
:
'การจัดการรอบการประเมิน'
,
type
:
'link'
,
show
:
true
},
],
],
...
...
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