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
1c0dc14d
Commit
1c0dc14d
authored
Feb 18, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE JD
parent
5c57a862
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
65 deletions
+78
-65
sub-employee-registration.component.ts
...loyee-registration/sub-employee-registration.component.ts
+1
-1
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+1
-1
sub-job-competency.component.html
...ency/sub-job-competency/sub-job-competency.component.html
+39
-52
sub-job-competency.component.ts
...etency/sub-job-competency/sub-job-competency.component.ts
+29
-7
job-code.model.ts
src/app/shared/model/job-code.model.ts
+3
-0
job-code.service.ts
src/app/shared/services/job-code.service.ts
+5
-4
No files found.
src/app/components/company-components/employee-registration/sub-employee-registration/sub-employee-registration.component.ts
View file @
1c0dc14d
...
@@ -15,7 +15,7 @@ import { EmployeeService } from 'src/app/shared/services/employee.service';
...
@@ -15,7 +15,7 @@ import { EmployeeService } from 'src/app/shared/services/employee.service';
import
{
PLService
}
from
'src/app/shared/services/pl.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'
;
import
{
BranchService
}
from
'src/app/shared/services/่branch.service'
;
import
{
BranchService
}
from
'src/app/shared/services/่branch.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/
่
job-code.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/job-code.service'
;
export
interface
DataEmployee
{
export
interface
DataEmployee
{
loading
:
boolean
loading
:
boolean
select
:
EmployeeModel
|
any
select
:
EmployeeModel
|
any
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
1c0dc14d
...
@@ -129,7 +129,7 @@ import { MatInputModule } from '@angular/material/input';
...
@@ -129,7 +129,7 @@ import { MatInputModule } from '@angular/material/input';
import
{
DateAdapter
,
MAT_DATE_FORMATS
}
from
'@angular/material/core'
;
import
{
DateAdapter
,
MAT_DATE_FORMATS
}
from
'@angular/material/core'
;
import
{
NativeDateAdapter
}
from
'@angular/material/core'
;
import
{
NativeDateAdapter
}
from
'@angular/material/core'
;
import
{
BranchService
}
from
'src/app/shared/services/่branch.service'
;
import
{
BranchService
}
from
'src/app/shared/services/่branch.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/
่
job-code.service'
;
import
{
JobCodeService
}
from
'src/app/shared/services/job-code.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
CompetencyGroupGradeService
}
from
'src/app/shared/services/competency-group-grade.service'
;
import
{
CompetencyGroupGradeService
}
from
'src/app/shared/services/competency-group-grade.service'
;
import
{
IndicatorsCoursesService
}
from
'src/app/shared/services/indicators-courses.service'
;
import
{
IndicatorsCoursesService
}
from
'src/app/shared/services/indicators-courses.service'
;
...
...
src/app/components/job-detail-components/job-competency/sub-job-competency/sub-job-competency.component.html
View file @
1c0dc14d
...
@@ -78,16 +78,16 @@
...
@@ -78,16 +78,16 @@
</tbody>
</tbody>
<tbody
*
ngIf=
"!loading&&jobcodeFilter().length"
>
<tbody
*
ngIf=
"!loading&&jobcodeFilter().length"
>
<tr
<tr
*
ngFor=
"let item of jobcodeFilter() |slice:((currentPage-1) *
10) : (((currentPage-1) * 10) + 10
);let i = index"
>
*
ngFor=
"let item of jobcodeFilter() |slice:((currentPage-1) *
pageSize) : (((currentPage-1) * pageSize) + pageSize
);let i = index"
>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
{{((currentPage-1) *
10
)+(i+1)}}
{{((currentPage-1) *
pageSize
)+(i+1)}}
</td>
</td>
<td
class=
"text-center"
>
{{item.jobcodeId}}
</td>
<td
class=
"text-center"
>
{{item.jobcodeId}}
</td>
<td>
{{item.tdesc}}
</td>
<td>
{{item.tdesc}}
</td>
<td>
{{item.edesc}}
</td>
<td>
{{item.edesc}}
</td>
<td
class=
"flex justify-center"
>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
edit
(
item
)"
data-hs-overlay=
"#s
ection-registration
-modal-edit"
></i>
data-hs-overlay=
"#s
ub-job-competency-component
-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
currentModal=
'delete'
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
currentModal=
'delete'
data-hs-overlay=
"#section-registration-alert-delete-modal"
></i>
data-hs-overlay=
"#section-registration-alert-delete-modal"
></i>
</td>
</td>
...
@@ -125,11 +125,19 @@
...
@@ -125,11 +125,19 @@
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</a>
</li>
</li>
<li>
<select
class=
"ti-form-select"
[(
ngModel
)]="
pageSize
"
(
ngModelChange
)="
searchChange
()"
>
<option
[
value
]="
10
"
>
10
</option>
<option
[
value
]="
20
"
>
20
</option>
<option
[
value
]="
50
"
>
50
</option>
<option
[
value
]="
100
"
>
100
</option>
</select>
</li>
</ul>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) *
10)+1}} to {{jobcodeFilter().length
<10
?
jobcodeFilter
().
length:
<span>
Show {{((currentPage-1) *
pageSize)+1}} to {{(jobcodeFilter().length
<
pageSize
)
?
jobcodeFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
jobcodeFilter
().
length
)
)
(
currentPage=
=page.length
?
((
currentPage
*
pageSize
)
-
((
currentPage
*
pageSize
)
-
jobcodeFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
jobcodeFilter
().
length
}}
items
</
span
>
:
(
currentPage
*
pageSize
)
)
}}
of
{{
jobcodeFilter
().
length
}}
items
</
span
>
</ul>
</ul>
</nav>
</nav>
...
@@ -180,17 +188,13 @@
...
@@ -180,17 +188,13 @@
</div>
</div>
<div
class=
"ti-modal-body"
style=
"padding-top: 0px;"
>
<div
class=
"ti-modal-body"
style=
"padding-top: 0px;"
>
<label
for=
"input-label"
class=
"ti-form-label mt-1rem"
>
รหัสงาน
</label>
<label
for=
"input-label"
class=
"ti-form-label mt-1rem"
>
รหัสงาน
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2 bg-input-readonly"
readonly
value=
"001
"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2 bg-input-readonly"
readonly
[(
ngModel
)]="
selectJob
.
jobcodeId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-1rem"
>
ชื่อลักษณะงาน (ไทย)
</label>
<label
for=
"detail_th"
class=
"ti-form-label mt-1rem"
>
ชื่อลักษณะงาน (ไทย)
</label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input w-2/3 bg-input-readonly"
readonly
value=
"Department Manager1
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input w-2/3 bg-input-readonly"
readonly
[(
ngModel
)]="
selectJob
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ชื่อลักษณะงาน (อังกฤษ)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ชื่อลักษณะงาน (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input w-2/3 bg-input-readonly"
readonly
value=
"Department Manager1
"
>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input w-2/3 bg-input-readonly"
readonly
[(
ngModel
)]="
selectJob
.
edesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
ความรู้ ทักษะ ความสามารถในตำเเหน่งงาน ( Job Competency)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
ความรู้ ทักษะ ความสามารถในตำเเหน่งงาน ( Job Competency)
</label>
<textarea
type=
"text"
id=
"detail_eng"
class=
"ti-form-input font-bold"
rows=
"5"
cols=
"50"
>
1.
<textarea
type=
"text"
id=
"detail_eng"
class=
"ti-form-input font-bold"
rows=
"5"
cols=
"50"
[(
ngModel
)]="
selectJob
.
competencyWorkText
"
></textarea>
2.
3.
4.
5.
</textarea>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<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"
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"
...
@@ -198,7 +202,7 @@
...
@@ -198,7 +202,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-job-competency-component-alert-edi
t-modal"
>
data-hs-overlay=
"#company-registration-page-aler
t-modal"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</div>
</div>
...
@@ -208,16 +212,16 @@
...
@@ -208,16 +212,16 @@
</div>
</div>
</div>
</div>
<div
id=
"
sub-job-competency-component-alert-edi
t-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"
company-registration-page-aler
t-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=
"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-aler
t w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-conten
t w-full"
>
<div
class=
"ti-modal-header"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
แจ้งเตือน
</h3>
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-job-competency-component-alert-edi
t-modal"
>
data-hs-overlay=
"#company-registration-page-aler
t-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</button>
...
@@ -225,59 +229,42 @@
...
@@ -225,59 +229,42 @@
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการเเก้ไขข้อมูลหรือไม่
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<button
type=
"button"
<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"
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
"
>
data-hs-overlay=
"#company-registration-page-modal
"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-job-competency-component-alert-edit-modal"
(
click
)="
showSuccessEdit
()"
>
data-hs-overlay=
"#company-registration-page-alert-modal"
(
click
)="
save
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
</div>
</ng-container>
</div>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
</div>
</div>
</div>
<div
id=
"sub-job-competency-component-alert-delete-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-alert 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=
"#sub-job-competency-component-alert-delete-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"
<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"
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-alert-delete
-modal"
>
data-hs-overlay=
"#company-registration-page-alert
-modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success
"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-danger
"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-job-competency-component-alert-delete-modal"
(
click
)="
showSuccessDelete
()"
>
data-hs-overlay=
"#company-registration-page-alert-modal"
(
click
)="
deleteCompany
()"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"supjob-upload-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"supjob-upload-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md"
>
...
...
src/app/components/job-detail-components/job-competency/sub-job-competency/sub-job-competency.component.ts
View file @
1c0dc14d
...
@@ -3,7 +3,7 @@ import { ToastrService } from 'ngx-toastr';
...
@@ -3,7 +3,7 @@ import { ToastrService } from 'ngx-toastr';
import
{
JobCodeModel
,
MyJobCodeModel
}
from
'src/app/shared/model/job-code.model'
;
import
{
JobCodeModel
,
MyJobCodeModel
}
from
'src/app/shared/model/job-code.model'
;
import
{
JobModel
,
MyJobModel
}
from
'src/app/shared/model/job.model'
;
import
{
JobModel
,
MyJobModel
}
from
'src/app/shared/model/job.model'
;
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'
;
@
Component
({
@
Component
({
...
@@ -14,12 +14,16 @@ import { JobCodeService } from 'src/app/shared/services/่job-code.service';
...
@@ -14,12 +14,16 @@ import { JobCodeService } from 'src/app/shared/services/่job-code.service';
export
class
SubJobCompetencyComponent
{
export
class
SubJobCompetencyComponent
{
currentPage
=
1
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSize
=
10
search
=
""
search
=
""
jobCodeList
:
JobCodeModel
[]
=
[]
jobCodeList
:
JobCodeModel
[]
=
[]
loading
=
false
loading
=
false
selectedFile
:
File
|
null
=
null
;
selectedFile
:
File
|
null
=
null
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
selectJob
:
JobCodeModel
=
new
MyJobCodeModel
({})
modalStatus
=
''
constructor
(
constructor
(
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
fileService
:
FileService
,
private
fileService
:
FileService
,
...
@@ -34,7 +38,7 @@ export class SubJobCompetencyComponent {
...
@@ -34,7 +38,7 @@ export class SubJobCompetencyComponent {
this
.
jobcodeService
.
getList
().
subscribe
({
this
.
jobcodeService
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
jobCodeList
=
response
.
map
((
x
:
any
)
=>
new
MyJobCodeModel
(
x
))
this
.
jobCodeList
=
response
.
map
((
x
:
any
)
=>
new
MyJobCodeModel
(
x
))
console
.
log
(
"🚀 ~ SubJobCompetencyComponent ~ this.jobcodeService.getList ~ this.jobCodeList:"
,
this
.
jobCodeList
)
this
.
jobCodeList
=
this
.
jobCodeList
.
sort
((
a
,
b
)
=>
a
.
jobcodeId
.
localeCompare
(
b
.
jobcodeId
)
)
this
.
loading
=
false
this
.
loading
=
false
this
.
searchChange
()
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
...
@@ -47,9 +51,27 @@ export class SubJobCompetencyComponent {
...
@@ -47,9 +51,27 @@ export class SubJobCompetencyComponent {
searchChange
()
{
searchChange
()
{
this
.
currentPage
=
1
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
jobcodeFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
jobcodeFilter
().
length
/
this
.
pageSize
)
},
(
_
,
i
)
=>
i
+
1
);
}
edit
(
item
:
JobCodeModel
){
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
selectJob
=
new
MyJobCodeModel
(
item
)
}
save
(){
this
.
jobcodeService
.
post
(
this
.
selectJob
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
selectJob
=
new
MyJobCodeModel
({})
this
.
getListJob
();
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
}
}
this
.
cdr
.
detectChanges
()
})
}
deleteCompany
(){
}
jobcodeFilter
()
{
jobcodeFilter
()
{
return
this
.
jobCodeList
.
filter
(
x
=>
return
this
.
jobCodeList
.
filter
(
x
=>
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
...
@@ -69,19 +91,19 @@ export class SubJobCompetencyComponent {
...
@@ -69,19 +91,19 @@ export class SubJobCompetencyComponent {
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
formData
.
append
(
'file'
,
this
.
selectedFile
);
// this.bu3ListL
oading = true
this
.
l
oading
=
true
this
.
fileService
.
upload
(
formData
,
'MJOBCODE_COMPETENCY'
).
subscribe
({
this
.
fileService
.
upload
(
formData
,
'MJOBCODE_COMPETENCY'
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
// this.getBu3List()
this
.
getListJob
();
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
// this.bu3ListL
oading = false
this
.
l
oading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
// this.bu3ListL
oading = false
this
.
l
oading
=
false
}
}
})
})
}
}
...
...
src/app/shared/model/job-code.model.ts
View file @
1c0dc14d
...
@@ -32,6 +32,7 @@ export interface JobCodeModel {
...
@@ -32,6 +32,7 @@ export interface JobCodeModel {
equalification
:
string
equalification
:
string
jobObjective
:
string
jobObjective
:
string
supervisor
:
string
supervisor
:
string
competencyWorkText
:
string
}
}
export
class
MyJobCodeModel
implements
JobCodeModel
{
export
class
MyJobCodeModel
implements
JobCodeModel
{
...
@@ -58,6 +59,7 @@ export class MyJobCodeModel implements JobCodeModel {
...
@@ -58,6 +59,7 @@ export class MyJobCodeModel implements JobCodeModel {
equalification
:
string
equalification
:
string
jobObjective
:
string
jobObjective
:
string
supervisor
:
string
supervisor
:
string
competencyWorkText
:
string
constructor
(
data
:
Partial
<
JobCodeModel
>
)
{
constructor
(
data
:
Partial
<
JobCodeModel
>
)
{
this
.
jobcodeId
=
data
.
jobcodeId
||
""
this
.
jobcodeId
=
data
.
jobcodeId
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
tdesc
=
data
.
tdesc
||
""
...
@@ -82,6 +84,7 @@ export class MyJobCodeModel implements JobCodeModel {
...
@@ -82,6 +84,7 @@ export class MyJobCodeModel implements JobCodeModel {
this
.
equalification
=
data
.
equalification
||
""
this
.
equalification
=
data
.
equalification
||
""
this
.
jobObjective
=
data
.
jobObjective
||
""
this
.
jobObjective
=
data
.
jobObjective
||
""
this
.
supervisor
=
data
.
supervisor
||
""
this
.
supervisor
=
data
.
supervisor
||
""
this
.
competencyWorkText
=
data
.
competencyWorkText
||
""
}
}
}
}
src/app/shared/services/
่
job-code.service.ts
→
src/app/shared/services/job-code.service.ts
View file @
1c0dc14d
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angula
r/common/http'
;
...
@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
...
@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
import
{
Observable
}
from
'rxjs'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
JobCodeModel
}
from
'../model/job-code.model'
;
import
{
JobCodeModel
}
from
'../model/job-code.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'root'
providedIn
:
'root'
...
@@ -18,9 +19,9 @@ export class JobCodeService {
...
@@ -18,9 +19,9 @@ export class JobCodeService {
getById
(
jobcodeId
:
string
):
Observable
<
JobCodeModel
>
{
getById
(
jobcodeId
:
string
):
Observable
<
JobCodeModel
>
{
return
this
.
http
.
get
<
JobCodeModel
>
(
this
.
urlApi
+
"/"
+
jobcodeId
)
return
this
.
http
.
get
<
JobCodeModel
>
(
this
.
urlApi
+
"/"
+
jobcodeId
)
}
}
//
post(body: JobCodeModel): Observable<AlertModel> {
post
(
body
:
JobCodeModel
):
Observable
<
AlertModel
>
{
//
return this.http.post<AlertModel>(this.urlApi, body)
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
//
}
}
// delete(body: JobCodeModel | JobCodeModel[]): Observable<AlertModel> {
// delete(body: JobCodeModel | JobCodeModel[]): Observable<AlertModel> {
// const options = {
// const options = {
// headers: new HttpHeaders({
// headers: new HttpHeaders({
...
...
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