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
6fdd5cec
Commit
6fdd5cec
authored
Sep 08, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JD (ข้อมูลทั่วไป) : เพิ่มตัวเลือกเก็บข้อมูล และแก้ไขตัวเลือกตำแหน่งผู้บังคับบัญชา
parent
d552254c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
22 deletions
+86
-22
import-data.component.html
...-detail-management/import-data/import-data.component.html
+8
-8
import-data.component.ts
...ob-detail-management/import-data/import-data.component.ts
+22
-11
job-code.model.ts
src/app/shared/model/job-code.model.ts
+56
-3
No files found.
src/app/components/job-detail-components/job-detail-management/import-data/import-data.component.html
View file @
6fdd5cec
...
...
@@ -148,28 +148,28 @@
</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
)]="
jd
"
(
ngModelChange
)="
changSupervisorJd
()"
>
<ng-select
class=
"ti-form-select"
data-trigger
name=
"choices-single-
supervisorJobCode
"
id=
"choices-single-
supervisorJobCode"
[(
ngModel
)]="
jd
"
(
ngModelChange
)="
changSupervisorJobCode
()"
>
<ng-option
*
ngFor=
"let item of jdList"
[
value
]="
item
.
jobCodeId
"
>
{{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-select
class=
"ti-form-select"
data-trigger
name=
"choices-single-
jl
"
id=
"choices-single-
jl
"
[(
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-
posi
tion"
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
class=
"ti-form-select"
data-trigger
name=
"choices-single-
expecta
tion"
id=
"choices-single-
expectation"
[(
ngModel
)]="
expectation
"
(
ngModelChange
)="
changExpectation
()"
>
<ng-option
*
ngFor=
"let item of [
1,2,3,4,5
]"
[
value
]="
item
"
>
{{item}}
</ng-option>
</ng-select>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
วัตถุประสงค์ของตำแหน่งงาน (Objective)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
selectJob
.
jobObjective
"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<button
type=
"button"
(
click
)="
save
()"
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=
"#sub-job-competency-component-modal-edit"
>
ย้อนกลับ
...
...
src/app/components/job-detail-components/job-detail-management/import-data/import-data.component.ts
View file @
6fdd5cec
...
...
@@ -9,7 +9,7 @@ import { Bu5Model, MyBu5Model } from 'src/app/shared/model/bu5.model';
import
{
Bu6Model
,
MyBu6Model
}
from
'src/app/shared/model/bu6.model'
;
import
{
Bu7Model
,
MyBu7Model
}
from
'src/app/shared/model/bu7.model'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
JobCodeModel
,
MyJobCodeModel
}
from
'src/app/shared/model/job-code.model'
;
import
{
JobCodeModel
,
MyJ
lModel
,
MyJobCodeModel
,
MySupervisorJ
obCodeModel
}
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'
;
...
...
@@ -75,7 +75,7 @@ export class ImportDataComponent {
jlList
:
PLModel
[]
=
[]
jl
=
''
e
mpLevel
=
''
e
xpectation
:
number
|
null
=
null
currentModal
:
'add'
|
'edit'
|
'delete'
=
"add"
columns
:
ColumnModel
[]
=
[{
...
...
@@ -192,7 +192,9 @@ export class ImportDataComponent {
this
.
selectJob
=
new
MyJobCodeModel
(
item
)
this
.
positionId
=
item
.
position
.
positionId
this
.
jd
=
item
.
supervisorPosition
.
positionId
this
.
jd
=
item
.
supervisorJobCode
.
jobCodeId
this
.
jl
=
item
.
jl
.
plId
this
.
expectation
=
item
.
expectation
this
.
bu1Id
=
item
.
bu1
.
bu1id
this
.
bu2Id
=
item
.
bu2
.
bu2id
this
.
bu3Id
=
item
.
bu3
.
bu3id
...
...
@@ -206,6 +208,8 @@ export class ImportDataComponent {
this
.
checkJobCodeId
=
false
this
.
positionId
=
''
this
.
jd
=
''
this
.
jl
=
''
this
.
expectation
=
null
this
.
bu1Id
=
''
this
.
bu2Id
=
''
this
.
bu3Id
=
''
...
...
@@ -219,9 +223,15 @@ export class ImportDataComponent {
clearValue
()
{
this
.
selectJob
.
jobObjective
=
''
this
.
selectJob
.
supervisor
Position
=
new
MyPosition
Model
({})
this
.
selectJob
.
supervisor
JobCode
=
new
MySupervisorJobCode
Model
({})
this
.
jd
=
''
this
.
selectJob
.
jl
=
new
MyJlModel
({})
this
.
jl
=
''
this
.
selectJob
.
expectation
=
null
this
.
expectation
=
null
this
.
selectJob
.
position
=
new
MyPositionModel
({})
this
.
positionId
=
''
...
...
@@ -251,6 +261,7 @@ export class ImportDataComponent {
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
search
=
''
this
.
getListJob
();
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
...
...
@@ -346,24 +357,24 @@ export class ImportDataComponent {
this
.
selectJob
.
position
=
new
MyPositionModel
({})
}
}
changSupervisorJ
d
()
{
changSupervisorJ
obCode
()
{
let
value
=
this
.
jdList
.
find
(
x
=>
x
.
jobCodeId
==
this
.
jd
);
if
(
value
)
{
// this.selectJob.supervisorJD
= value
this
.
selectJob
.
supervisorJobCode
=
value
}
else
{
// this.selectJob.supervisorJD = new MyJobcodeModel({}
)
this
.
selectJob
.
supervisorJobCode
=
new
MySupervisorJobCodeModel
(
)
}
}
changJl
()
{
let
value
=
this
.
jlList
.
find
(
x
=>
x
.
plId
==
this
.
jd
);
if
(
value
)
{
// this.selectJob.supervisorJD
= value
this
.
selectJob
.
jl
=
value
}
else
{
// this.selectJob.supervisorJD = new MyJobcodeModel({}
)
this
.
selectJob
.
jl
=
new
MyJlModel
(
)
}
}
changE
mpLevel
()
{
// this.selectJob.supervisorJD = this.empLevel
changE
xpectation
()
{
this
.
selectJob
.
expectation
=
this
.
expectation
}
getBu1List
()
{
...
...
src/app/shared/model/job-code.model.ts
View file @
6fdd5cec
...
...
@@ -34,7 +34,6 @@ export interface JobCodeModel {
jobObjective
:
string
supervisor
:
string
competencyWorkText
:
string
supervisorPosition
:
PositionModel
serviceWorkText
:
string
serviceWorkPercent
:
number
responsibleWorkText
:
string
...
...
@@ -50,6 +49,9 @@ export interface JobCodeModel {
cerLicensedText
:
string
especiallyTrainingText
:
string
otherAbilitiesText
:
string
jl
:
JlModel
supervisorJobCode
:
SupervisorJobCodeModel
expectation
:
number
|
null
}
export
class
MyJobCodeModel
implements
JobCodeModel
{
...
...
@@ -78,7 +80,6 @@ export class MyJobCodeModel implements JobCodeModel {
jobObjective
:
string
supervisor
:
string
competencyWorkText
:
string
supervisorPosition
:
PositionModel
serviceWorkText
:
string
serviceWorkPercent
:
number
responsibleWorkText
:
string
...
...
@@ -94,6 +95,9 @@ export class MyJobCodeModel implements JobCodeModel {
cerLicensedText
:
string
especiallyTrainingText
:
string
otherAbilitiesText
:
string
jl
:
JlModel
supervisorJobCode
:
SupervisorJobCodeModel
expectation
:
number
|
null
constructor
(
data
:
Partial
<
JobCodeModel
>
)
{
this
.
jobcodeId
=
data
.
jobcodeId
||
""
this
.
companyId
=
data
.
companyId
||
""
...
...
@@ -120,7 +124,6 @@ export class MyJobCodeModel implements JobCodeModel {
this
.
jobObjective
=
data
.
jobObjective
||
""
this
.
supervisor
=
data
.
supervisor
||
""
this
.
competencyWorkText
=
data
.
competencyWorkText
||
""
this
.
supervisorPosition
=
new
MyPositionModel
(
data
.
supervisorPosition
||
{})
this
.
serviceWorkText
=
data
.
serviceWorkText
||
""
this
.
serviceWorkPercent
=
data
.
serviceWorkPercent
??
0
this
.
responsibleWorkText
=
data
.
responsibleWorkText
||
""
...
...
@@ -136,6 +139,56 @@ export class MyJobCodeModel implements JobCodeModel {
this
.
cerLicensedText
=
data
.
cerLicensedText
||
""
this
.
especiallyTrainingText
=
data
.
especiallyTrainingText
||
""
this
.
otherAbilitiesText
=
data
.
otherAbilitiesText
||
""
this
.
jl
=
new
MyJlModel
(
data
?.
jl
)
this
.
supervisorJobCode
=
new
MySupervisorJobCodeModel
(
data
?.
supervisorJobCode
)
this
.
expectation
=
data
?.
expectation
??
null
}
}
export
interface
SupervisorJobCodeModel
{
jobCodeId
:
string
tdesc
:
string
edesc
:
string
companyId
:
string
statusCom
:
boolean
statusPms
:
boolean
}
export
class
MySupervisorJobCodeModel
implements
SupervisorJobCodeModel
{
jobCodeId
:
string
tdesc
:
string
edesc
:
string
companyId
:
string
statusCom
:
boolean
statusPms
:
boolean
constructor
(
data
?:
Partial
<
SupervisorJobCodeModel
>
)
{
this
.
jobCodeId
=
data
?.
jobCodeId
||
''
this
.
tdesc
=
data
?.
tdesc
||
''
this
.
edesc
=
data
?.
edesc
||
''
this
.
companyId
=
data
?.
companyId
||
''
this
.
statusCom
=
data
?.
statusCom
??
false
this
.
statusPms
=
data
?.
statusPms
??
false
}
}
export
interface
JlModel
{
plId
:
string
tdesc
:
string
edesc
:
string
companyId
:
string
}
export
class
MyJlModel
implements
JlModel
{
plId
:
string
tdesc
:
string
edesc
:
string
companyId
:
string
constructor
(
data
?:
Partial
<
JlModel
>
)
{
this
.
plId
=
data
?.
plId
||
''
this
.
tdesc
=
data
?.
tdesc
||
''
this
.
edesc
=
data
?.
edesc
||
''
this
.
companyId
=
data
?.
companyId
||
''
}
}
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